313 drivers crash Quake Live [but not when I'm running dual-head]

Hello, as you can see, my problems with 300 drivers continue!

My main game is Quake Live, I play it competitively on middle level.

Quake Live has no problems running on drivers up to 295 and I think it was running on 304.48 too when I tested.

But with 313.09 and 313.18, Quake Live crashes when

  • going from full screen to window mode
  • quitting the game (technically it’s also leaving full screen)
    and when that happens, I get following errors in the console:

###!!! ABORT: XF86VidModeSwitchToMode: BadValue (integer parameter out of range for operation); 4 requests ago: file /builddir/build/BUILD/xulrunner16-16.0.2/mozilla-release/toolkit/xre/nsX11ErrorHandler.cpp, line 157
###!!! ABORT: XF86VidModeSwitchToMode: BadValue (integer parameter out of range for operation); 4 requests ago: file /builddir/build/BUILD/xulrunner16-16.0.2/mozilla-release/toolkit/xre/nsX11ErrorHandler.cpp, line 157

Obviously has to do with switching back to my desktop video mode.

It works if I’m running dual-head (1152x864 + 1920x1080), game can switch back to the dual-display config somehow. But if I’m running pure 1152x864 with second display disabled, it will crash all the time.

Looks like the desktop mode is now reported as having some strange value.

I’ve tried combinations of NoVesaModes, NoXServerModes, NoEdidModes, NoPredefinedModes to limit number of modes available, thinking that maybe that’s it, but it didn’t help either.

Is this XF86VidModeSwitchToMode: BadValue error common?

Can I somehow change the modes that X reports to the game? Add some mapping maybe?

Looks like QL is not the only game having problems.

ezQuake doesn’t crash (because it handles the error somehow?), but still gets it when quitting:
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 129
Minor opcode of failed request: 10
Serial number of failed request: 350

And just like in case of QL, this happens only if I run with one display enabled.

So I’ve tried with:

Option “nvidiaXineramaInfo” “false”

And this kind of helps, because the game won’t crash anymore, however this makes the window manager really confused, maximizing windows to width 3072, putting new windows on wrong screen etc. Absolutely unusable for the desktop.

What I’m looking for is either to restore the behavior of older drivers, or work around that XF86VidModeSwitchToMode: BadValue problem with some other magic.

Re-tested with 310.32. This appears to have the same behavior as 200 series still. So the change that breaks my games happened in 313.09.

There are more differences regarding my games changing between full screen and window mode / desktop resolution:

One display enabled:

  1. 310 and older:
  • switching to full screen and back to desktop is instant
  • nothing crashes
  • 313:
    • switching to/from full screen makes my CRT re-sync, even though it's the same video mode (or should be!)
    • the game crashes getting XF86VidModeSwitchToMode: BadValue

    Two displays enabled:

    1. 310 and older:
    • switching to full screen disables the second display (and CRT re-syncs)
    • switching back gives me a virtual desktop of 3072x1080 with panning, second display remains disabled. The CRT doesn't need a resync which tells me XF86VidModeSwitchToMode only changed virtual desktop resolution and nothing else
  • 313:
    • switching to full screen also disables the second display but...
    • switching back actually goes back to the original configuration. Second display gets enabled, there's no "virtual desktop" panning effect.

    I really appreciate what the 313 driver provides, I’m looking forward to upgrading to it.

    However, it needs some different way of exposing my single-monitor mode to X programs that switch between modes using that older XF86Mode* API.

    This probably won’t help much, but Quake Live does work for me with the 313 drivers without any crashes. I’m not using any sort of multi-monitor setup, however. You might be able to work around this by forcing a specific resolution with Quake Live, i.e. not using auto resolution mode (can’t remember the exact setting)

    Other possible ideas:

    -Could be something to do with bad/missing MetaModes or GPU scaling because of the changes in recent driver revisions.
    -Unlikely to help, but you might try QLPrism or an older/newer version of firefox just as a test.

    No, it doesn’t appear to depend on the browser and it’s not full-screen operation (controlled by r_mode which you suggested) that crashes. Instead, it’s when the game tries to set the desktop resolution back.

    There’s no setting in the game that says “after quit, set mode X”. The game is supposed to detect and remember the desktop resolution and automatically switch back to it. And this last part is failing.

    But your setup obviously has less modes available and different meta-mode to start with, which can explain why it won’t crash for you. I must have hit some special value that either my games can’t store, or they store it correctly, but drivers somehow report a value that is invalid for XF86VidModeSwitchToMode.

    Maybe I can try this with one display connected tomorrow, but even if that works, it’s not what I’m looking for :)

    I don’t know what I did… but now I can’t make the 313.18 driver to behave like it used to. Now it’s just like on older drivers, switches to this huge virtual desktop (instead of re-enabling second display) but doesn’t crash the game under no conditions.

    I’ve tried changing back the stuff I did to xorg.conf lately [1] but can’t get it back to the way it was :)

    Is there something I can be missing?

    [1] mainly metamodes, explained here

    Now it’s crashing again.

    What I did is reboot my system with HDMI detached, then attached the TV after few hours.

    This magically expanded my desktop and also almost enabled the mode I was looking for. Now the game was able to switch to full screen mode, and then exit to dual-screen mode. However, the full-screen mode was 100 Hz instead of proper 120 Hz.

    So I’ve started playing with nvidia-settings…

    Now whatever I do:

    • For full screen mode, the game switches to semi-random mode. It always requests 1152x864, but either gets 100 Hz refresh rate, or gets 1280x960 mode with border on top and right.

    • Going out of full screen, it gets random between nvidia-settings invocations. It gave me 1152x864 at 100, 95 and 75 Hz. One time it thought it’s a good idea to switch my CRT to 1920x1080. Another time that 1280x960 stuck. And of course, the game is crashing all the time.

    So I thought: attaching HDMI broke it, so I’ll just detach it. Well now the game works in proper mode (120 Hz) and doesn’t switch to anything stupid when crashing… but yes, still crashes.

    I’m going for a reboot and hope it helps.