I haven't had this problem with alt tabbing in the vast majority of my games however my software setup is slightly different. I use a newer version of the linux kernel(5.6) and my distro is manjaro(kde flavor) which due to the fact that it's rolling release gets package updates sooner. Try using a newer version of the kernel and updating your packages and see if that fixes your issues with alt tabbing.
Thanks for the input
Apparently it's a legitimate Nvidia bug. It appears to be fixed in their beta driver a few months ago: https://forums.developer.nvidia.com/t/hangs-freezes-when-vulkan-v-sync-vk-present-mode-fifo-khr-is-enabled/67751/25
UPDATE: I've installed the beta driver instead, and can confirm the issue goes away :+1:
PROTON_NO_ESYNC=1`x1 2020-07PROTON_NO_FSYNC=1`x1 2020-07
This appears to be a general issue for me, in the sense that it pretty much applies to all games that runs with Proton.
Proton version tested: 4.11-13 and 5.0-9
CPU: Intel i7-6700HQ (Skylake)
GPU: Nvidia GTX 960M
Driver tested: 450.57 and 440.100
Vulkan: 1.1.126
OS: KDE neon 5.19 / Ubuntu 18.04
Kernel tested: 5.4.0-42-lowlatency and 5.4.0-42-general
DE tested: Openbox and KDE Plasma
Titles tested:
Sid Meier's Civilization V (native version works fine, but alt-tab hangs happen if run with Steam Play)
Dungeons 3 (this game also has native version, same issue as above)
BeamNG.drive
Basically after alt-tabbing, it hangs for 3~5 seconds, then it renders the Desktop. Another interesting thing I noted was that, after I'm on the Desktop and I hover onto anything that will pop out tooltips (taskbar item for example), it hangs again before the tooltip gets rendered. It's as if, any redraws outside of the game will hang. If I only stay on the game window, the game runs just fine.
I mainly game on a barebone Openbox. KDE Plasma has a lot worse experience, which I suppose due to it having plenty more draws.
I mainly use lowlatency kernel, but I don't think the type of kernel had much to do with it either, as I also had the issue with general kernel.
I've tried disabling Steam Overlay, but that didn't seem to be related either.
I've also tried
PROTON_NO_ESYNC=1andPROTON_NO_FSYNC=1by themselves and together, but none of them seemed to help.