kondrak / vkQuake2

id Software's Quake 2 v3.21 with mission packs and Vulkan support (Windows, Linux, macOS, FreeBSD, Raspberry Pi 4)
GNU General Public License v2.0
896 stars 90 forks source link

Linux Screen Resolution Change / Mouse+Keyboard Capture #167

Closed Cygon closed 6 months ago

Cygon commented 8 months ago

I just compiled vkQuake2 1.5.9 for Linux and tried a few things with it. In 2560x1440 on an RTX 3090, it ran rather choppy (much worse than q2rtx even) and the "fullscreen" and "multisampling" options returned to being unset.

Next, I quit and tried one of the mission packs (launched via ./quake2 +set game xatrix. Then the following happened:

  1. Out of my 4 screens, 3 went dark.
  2. I heard the Quake2 menu sounds, but the game was not on the screen that remained
  3. Alt+Tab and Alt+F4 seemed to be captured as well and produced more menu sounds (are we really still doing that in 2023?)
  4. Hitting Ctrl+Alt+F1 to switch to another console session wasn't possible for me (nothing to do w/vkQuake2, some NVidia driver issues allocating virtual consoles combined with a militant kernel developer)
  5. So I couldn't quit the game and had to hit the physical reset button

I lost 14 hours of 7 running ffmpeg encodes, 3 partitions with file system errors and I'm now forced to sit through a full RAID resync and my display settings are still messed up (only one screen active, after rearranging and rotating all screens back in place, my KDE toolbars are left on the wrong screens, my landscape/portrait backgrounds got mixed up, etc. etc.). Sorry, I'm very, very frustrated as I'm writing this...

In short, vkQuake2 seems to permanently change my desktop resolution, disable screens it isn't supposed to touch and locks me out from using Alt+Tab, Alt+F4, Alt+F2, the Windows key and more.

Would it be possible to have vkQuake2 act a little less aggressively, or give it a command line switch where it at least doesn't take full and exclusive control of mouse and keyboard?

kondrak commented 6 months ago

Hi! Thanks for being patient with me, this project is mostly in low-maintenance mode these days. Really sorry to hear about the frustrations it caused you - unfortunately this is the consequence of having the old window handling code in vkQuake2 which goes all the way back to the original release. It's really a bare-minimum setup to get it working on most configurations, though it doesn't of course take into account the 20+ of developments in window managers on Linux. Because of this, for a more stable experience I'd suggest using some other source port (like Yamagi) which has an updated way of handling the window and rendering context. An overhaul of this magnitude is beyond the scope of this project.

Once again: sorry for all the inconveniences!