Games freeze when I press alt-tab

Hello.
Razer Blade 14 (Ryzen 9 8945HS, NVIDIA 4070). Fresh Arch linux, or now Gentoo linux - same situation.
Games (SQUAD, Sandstorm) freeze when I press alt-tab. Fullscreen, Borderless, Ultra/Low, AC/Battery, nvidia modesetting=1/0 - never mind at all. But everything works fine on embedded AMD graphics.
Unreal Engine 5 project too, I just can’t even work.

Linux 6.10.11-gentoo-dist SMP PREEMPT_DYNAMIC
Gentoo: x11-drivers/nvidida-drivers: 560.35.03-r1
Fluxbox

After some nvidia-drier update it was broken completely. So it’s not a random situation.

Processing: nvidia-bug-report.log.gz…

That driver version has too many problems, you’re not the only experiencing all kinds of problems with it. The only solution I can offer you (and which works for me with Arch Linux) is this: LTS kernel 6.6.35 + 555.58. These two work together so well as if they were written for each other. Best install nvidia-dkms 555.58 for Arch because dkms runs mkinitcpio on its own and all you need to do after that is reboot. And wait for drivers with that sequence of numbers: XXX.XX. My personal observation is that drivers with 3 sequences of numbers always have some kind of problems, especially combined with the rolling kernel. If I install the driver and/or the kernel you’re using, the panel of my DE (Cinnamon) turns into a useless picture - nothing on it can be clicked, not even the menu.

I am aware the solution I offer is older versions of both kernel and driver (and LTS on top of that) but until nvidia fixes all the bugs with the latest driver, there isn’t much else you can do. Knowing how “fast” they work on the drivers for linux, it will be a while before a fix arrives.

Also, you don’t mention whether these games are native linux games or Windows games, so I’m gonna assume they are Windows games.
For Windows games there is something you can try which I have discovered to do wonders when alt+tabbing: enable “emulate virtual desktop” in winecfg. Also click to disable window decorations in wine (that is known to cause problems sometimes) and then run the game. It doesn’t matter if the game setting is fullscreen or windowed because the virtual desktop is a window in itself, so alt+tabbing always works like a charm. If even that doesn’t fix it for your case, you can downgrade wine to v8.9 - that’s the version I’m using in Arch because every other version from 9.0 and above is full of annoying glitches and running a game becomes a pain in the “A”.
For native linux games you can use Windowed Borderless - that’s in case you experience game freezes even with native linux games.

I’m new to Gentoo, so don’t even know how to downgrade kernel and nvidia drivers without manual . Will figure it out later.
Windowed mode in proton didn’t help.
I use Proton-GE-9.12. And the only way to play is to use gamescope, but it has a few side effects. It works at least.

Thank You very much for the detailed answer!

Next time I will choose AMD…

My reply was about Arch Only. I’m not a fan of Gentoo and of compiling everything for yourself for hours… Thus, I can’t help you with Gentoo.

As for the compatibility layer, I wouldn’t rely on Proton that much. It’s capable indeed but it’s not better than wine. I’ve seen Steam games for which Proton fails whereas wine (with my method of running games, too long to explain here) works. I made “GRID 2” playable in Arch Linux 2 years before Valve made it playable on Steam.

I’ma take a wild guess here about downgrading: if it works any similar as on Arch, you can download the packages nvidia-dkms nvidia-utils nvidia-settings lib32-nvidia-utils - all with v555.58, issue a command to your package manager to install from local source (on Arch the command is “sudo pacman -U *.zst”). The nvidia drivers are proprietary, so I doubt you’ll have to compile anything. That should effectively downgrade nvidia and the process is the same with linux-lts and linux-lts-headers.
And one more thing which IDK if you know: first downgrade the kernel, reboot and then downgrade the driver! The other way around is a nightmare you don’t wanna walk into.

1 Like