protonscr

Freeze when window loses focus when using Vulkan

protonclosed
ValveSoftware/Proton#4042 · opened 2020-07-03 by andrfgs · updated 2020-08-22 · 12 comments · github
Aandrfgs 2020-07-03 github

Distro: Arch Linux
Linux Kernel Version: 5.7.2
KDE Version: 5.19.0
KDE Framework Version: 5.70
Qt Version: 5.15
Computer: Laptop, MSI GP73 Leopard 8RF
GPU: Nvidia GTX 1070
Proton Version: Tested both Proton 4.11-13 and Proton 5.0-9

Steam Proton causes Kwin/KDE to freeze horribly when the game is running and some other KDE GUI element comes in (notifications) or when attempting to minimize/switch to other windows (switching is impossible as each frame takes almost 30 sec to render. This makes Kwin and Steam Proton unusable together. Dragging the window works after it is not maximized, but the transition between maximized and resizable window takes a lot of time (almost 30 seconds).

This happens both in Fullscreen and in Windowed mode, with or without the compositor effects turned on. If I click back in the game so that the window regains focus, the game becomes normal again after almost a minute or two.

I'm not really sure who's the culprit here: Kwin/KDE or Proton, so I opened a bug report on both places. I apologize in advance for this inconvenient but I can't find what causes this. I know that Gnome's Compositor, Mutter, does not suffer from this at least when I last tested it.

EDIT: Not sure if this has to do with window focus or cursor enter/leave. Maybe it's not the window losing focus but the cursor going inside/outside the viewport.

EDIT: This is also happening in LXQT using OpenBox and Picom

Kkisak-valve maintainer 2020-07-03 github

Possibly an nVidia driver issue related to Fixed a visual glitch of Vulkan applications when they stop flipping due to a window change, such as when alt-tab is used to change window focus. in drivers before nVidia 450.51.

Aandrfgs 2020-07-03 github

I updated the drivers an now it broke Steam. I reinstalled it and removed:
~/.steam
~/.local/share/Steam

But now Steam is completely broken and reinstalling won't do anything.

> steam

Setting up Steam content in /home/andre/.local/share/Steam
gio: Não é suportada a definição do atributo metadata::trusted
Running Steam on arch rolling 64-bit
STEAM_RUNTIME is enabled automatically
Pins potentially out-of-date, rebuilding...
Can't find 'steam-runtime-check-requirements', continuing anyway
/home/andre/.local/share/Steam/ubuntu12_32/steam
[2020-07-03 02:09:53] Startup - updater built Jun  4 2020 05:50:42
ILocalize::AddFile() failed to load file "public/steambootstrapper_english.txt".
Installing breakpad exception handler for appid(steam)/version(0)
SteamUpdateUI: An X Error occurred
X Error of failed request:  BadValue (integer parameter out of range for operation)

After running steam again:
> steam

Running Steam on arch rolling 64-bit
STEAM_RUNTIME is enabled automatically
Pins up-to-date!
Can't find 'steam-runtime-check-requirements', continuing anyway
/home/andre/.local/share/Steam/ubuntu12_32/steam

Is the new Steam version in arch broken?

Aandrfgs 2020-07-03 github

This either is an Arch package related problem or is yet again another bug introduced by an Nvidia driver update.

Kkisak-valve maintainer 2020-07-03 github

Friendly reminder that the running nvidia kernel module version, the 64 bit userspace version, and the 32 bit userspace version must have the exact same version to work properly, otherwise Steam, and other OpenGL applications can stall waiting on nvidia's video driver.

Aandrfgs 2020-07-03 github

Arch is x86_64 only so should that issue happen? It doesn’t say whether it’s the 64 or 32 bit version of the driver but I think it is the 64 bit one.

I am using nvidia-beta from the AUR (https://aur.archlinux.org/packages/nvidia-beta)

According to a user, this doesnt seem to be a Vulkan package, might that be it? But I don’t understand, don’t all recent Nvidia drivers include Vulkan support?

Is there a more detailed log I can check?

Kkisak-valve maintainer 2020-07-03 github

I'm not familiar with this AUR package, but https://aur.archlinux.org/packages/lib32-nvidia-utils-beta/ looks related.

Aandrfgs 2020-07-03 github

I tried that package and it failed. I switched to this AUR package (https://aur.archlinux.org/packages/nvidia-beta-all/) that contains all the beta libraries and the driver, including that one. By doing that I could run Steam again.

Still... This problem persists with the 450.51 drivers. Nothing has changed, not even disabling the compositor effects helps. So the question now is: who is the culprit? KDE/KWIN or Proton?

IiWeaker 2020-07-05 github

@andrfgs
Use the TK-Glitch installer, it is more efficient than AUR.

Unzip, open your terminal inside the folder, and write.
makepkg -si
and select version 450 with your numeric keys.
select dkms and voila, you wait for it to install, it will ask you for your password after packing what is necessary.

https://github.com/Frogging-Family/nvidia-all/tree/255a126463068d949c30b16f59fb12a9239cb9db

Aandrfgs 2020-07-08 github

Thanks for the suggestion but I already have the 450 driver. It doesn't solve my issue unfortunately.

Aandrfgs 2020-07-31 github

This issue also seems to occur in LXQt using Openbox. I tried with both a compositor (Picom) and without it. It happens either way.

Currently using Nvidia's 450.57 drivers. I am now sure this is a Proton/Wine issue. What can be the reason for a freeze every time the DE has to draw both the DE windows and Proton/Wine windows?

Aandrfgs 2020-07-31 github

This issue seems to go away when not using the Vulkan backend and using OpenGL instead (by using the following launch parameter PROTON_USE_WINED3D=1 %command%). But it's not really an option for most games.

Can this be a Vulkan buffer issue?

Aandrfgs 2020-08-22 github

Finally solved! This was driver issue after all. It is solved by the new Nvidia 450.66 driver! It still happens in some games, but that is definetely another issue because most games I tested no longer suffer from this.

Proton versions

Launch options

Launch lines