GNOME Bugzilla – Bug 170292
Resolution won't reset after a game changes it and crashes
Last modified: 2010-12-07 16:12:49 UTC
Please describe the problem: When playing a game that changes the resolution on you (say, Neverwinter Nights), sometimes they crash and drop you back to the desktop. This leaves you in a resolution that wasn't what you had before launching the game, although you have a virtual desktop of your old resolution that you can scroll around. Going to the screen resolution switch applet uncovers this bug. Steps to reproduce: 1. Play a game like Neverwinter Nights which changes the screen resolution and have it crash on you. 2. Notice your virtual desktop is 1600x1200 but the displayed resolution is lower. 3. Try and switch resolution to 1600x1200, click apply, and have nothing happen Actual results: Nothing happens, probably because of code that says not to do anything if this is the "current" resolution. Expected results: The screen resolution should switch to 1600x1200, just like what happens if I set the resolution to something else and then BACK to 1600x1200 (a workaround). Does this happen every time? Yes Other information:
Thanks for your bug. The capplet only writes the configuration to gconf, reassigning the bug.
The resolution capplet does use randr to change the resolution. So if there's a bug, it's either in the capplet or in xrandr.
Scott, please, after a crash of your game try opening a terminal and run the xrandr command, then look at the list of resolutions. Find the line starting with an '*', which is your current resolution, and run a second time xrandr, but with the -s X option, where X is the SZ parameter of the line with the asterisk (the first parameter, look at the list and you will understand :). Then tell us if this fixes your screen resolution, in this case the problem is with the if check inside the apply_config function in Screen Resolution Preferences.
This seems to be a (ancient and known) bug in xrandr. The xrandr command line app doesn't switch either, and there is apparently no way for an application to tell those two resolutions apart, ie. a 1024x768 desktop with a 1024x768 viewport is exactly the same as a 1024x768 desktop with an 800x600 viewport (which is what happens when an app that changed the resolution quits without restoring state).
*** Bug 507556 has been marked as a duplicate of this bug. ***
Doesn't this mean that the bug is NOTGNOME?
Yes and no. Right now, we're depending on xrandr to be fixed, but when that's done, we probably need to adapt.
You cannot use viewports with more recent versions of XRandR, so "problem solved", in a way.