Bug 24532 - xserver segfault on gamma change with different res cloned displays one disabled
Summary: xserver segfault on gamma change with different res cloned displays one disabled
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/DDX/Xorg (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-14 12:14 UTC by Andy Furniss
Modified: 2010-02-26 15:39 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
xserver backtrace (880 bytes, text/plain)
2009-10-14 12:16 UTC, Andy Furniss
no flags Details
RandR compat output paranoia (2.42 KB, patch)
2009-11-05 02:56 UTC, Michel Dänzer
no flags Details | Splinter Review

Description Andy Furniss 2009-10-14 12:14:14 UTC
RV670 AGP using git drm-next, ddx, mesa, xserver (6 days ago).

Happens with kms or ums.

If X is started with 1280x1024 in xorg.conf monitor will get that but s-video tv-out will be @ 1024x768 and the displays in clone mode.

I notice that xgamma is disabled at this point.

With this setup I notice that my old metacity will not maximise windows beyond 1024x768 and the game enemy territory will fail to get fullscreen on the monitor. Other games and apps can get fullscreen on monitor OK.

If I turn off DIN with xrandr to allow full screen for ET I will get a segfault when it tries to change gamma - I can also recreate with xgamma.

If I startx with both screens at 1024x768, disable DIN and then xrandr monitor to 1280x1024 the segfault does not occur.

Backtrace attached.
Comment 1 Andy Furniss 2009-10-14 12:16:03 UTC
Created attachment 30411 [details]
xserver backtrace
Comment 2 Michel Dänzer 2009-11-05 02:56:37 UTC
Created attachment 30978 [details] [review]
RandR compat output paranoia

Does this xserver patch fix the crash?
Comment 3 Andy Furniss 2009-11-05 15:34:41 UTC
(In reply to comment #2)
> 
> Does this xserver patch fix the crash?
> 

Yes the patch fixes the crash.

What happens now when I startx @ 1280x1024 and disable TV is maximising an xterm gets full screen OK, but xgamma/game gamma don't work and the game still can't get full screen.

By accident I found that all I then need to do to get them to work is just run xrandr - no options needed. After that everything works OK.

Comment 4 Michel Dänzer 2009-11-05 15:45:47 UTC
(In reply to comment #3)
> What happens now when I startx @ 1280x1024 and disable TV is maximising an
> xterm gets full screen OK, but xgamma/game gamma don't work and the game still
> can't get full screen.

Does the game fail to go fullscreen due to the gamma failure, or something else?

> By accident I found that all I then need to do to get them to work is just run
> xrandr - no options needed. After that everything works OK.

Hmm, sounds like maybe the compat output information isn't (fully) updated when you disable TV, but should be. Then running xrandr again updates it. If that's the case fixing that may make this patch superfluous, but that's going out of my area of expertise.
Comment 5 Andy Furniss 2009-11-05 17:31:09 UTC
(In reply to comment #4)
> Does the game fail to go fullscreen due to the gamma failure, or something
> else?

Comparing the outputs of the game in both cases -

 diff et-out-window et-out-full
< XFree86-VidModeExtension: No acceptable modes found
---
> XFree86-VidModeExtension Activated at 1280x1024

> Hmm, sounds like maybe the compat output information isn't (fully) updated when
> you disable TV, but should be. Then running xrandr again updates it. If that's
> the case fixing that may make this patch superfluous, but that's going out of
> my area of expertise.

Yes could be - I guess my original workaround of starting both screens @ 1024x768, diabling TV then xrandr monitor to 1280x1024 maybe only worked because of the xrandr res change.

One thing I forgot to mention about when I do the above, is that when the game quits I end up back @ 1024x768, locked in the bottom right of a 1280x1024 desktop.

This happens with openarena as well - the games are really running at 1280x1024 - I can see that with OSD on my monitor.
Comment 6 Michel Dänzer 2009-11-23 07:12:05 UTC
So this doesn't seem like a good solution overall. Would be good to get some input from an RandR expert.
Comment 7 Andy Furniss 2009-11-24 04:28:33 UTC
(In reply to comment #6)
> So this doesn't seem like a good solution overall. Would be good to get some
> input from an RandR expert.
> 

One caveat - I tried and failed to reproduce the crash with a F12 beta live cd at the weekend. Xserver was 1.7.1 with IIRC -7-fc appended as well.

So now I am paranoid that it could be something to do with me running everything from git in a dir under ~/ while my system xorg is is quite old (7.2).

Though someone on #radeon did report an et crash and I pointed him here for a possible workaround, but didn't hear whether it worked for him.

I am currently running without the patch, so can confirm that an extra run of xrandr does fix both the gamma crash and also stops me getting dumped back in the previous res when games quit.
Comment 8 Michel Dänzer 2010-02-26 00:18:06 UTC
The crash should be fixed in xserver Git master and will hopefully be backported to the 1.7 branch. The other issues possibly remain but should be tracked in a separate report if necessary.
Comment 9 Andy Furniss 2010-02-26 15:39:08 UTC
(In reply to comment #8)
> The crash should be fixed in xserver Git master and will hopefully be
> backported to the 1.7 branch. The other issues possibly remain but should be
> tracked in a separate report if necessary.
> 

Confirmed the segfault is fixed, but the other issues still exist. I'll test some more over the weekend and open a new bug.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.