Vulkan freezes the system when losing focus
Hello! First of all, sorry for my bad English: it's not my native language, and I'm writing this in the middle of the night.
I've ran into a problem with the Vulkan on my Nvidia Optimus laptop (GPU: GTX 1050 Ti). When Vulkan applications lose focus (alt+tab or notification pop-ups), they completely freeze the system, sometimes for a couple of minutes, sometimes permanently. I've tried nvidia-vulkan packages from AUR, but they didn't help.
Google led me to a bunch of similar problems, but all of them occurred before 396.24 nvidia driver was released, currently I'm using 435-21-7. Could you please help me or at least point in the right direction?
Thanks!
About this post
- Posted
- Archived
- Score
- 2 · 100% up
- Kind
- Text
- ID
- dc173m
12 comments
Use
journalctlto see if you can recover any useful information when the system can recover since your situation potentially indicates the graphics driver soft-locking your kernel.You can try avoiding the issue by using a different compositor (or none at all), or different driver versions. Fixing the issue may prove difficult if it is rooted in the
nvidiadriver itself, since you're at the mercy of how quickly they choose to tackle a bug report that you will have to submit.It might be worth mentioning how you're running the vulkan application since offloading with vulkan is a bit dodgy at the moment (ie. primus_vk, using
nvidia-xrun, or strictly using discrete card).Thanks for the answer! I will try to use journalctl as soon as I get to the PC.
The issue is persistent across several desktop environments and window managers that I've tried, so I'm not sure they're at fault.
I'm using optimus-manager to switch cards. Is this an acceptable method?
This is probably the source of your issue since it relies on what has been considered buggy or broken vulkan support with hardware offloading. You are probably stuck with either using
nvidia-xrunfor a nested X11 server instead, software offloading (primus_vk, could be slow), or praying that Nvidia will do something about the bleak situation with optimus laptops and linux.If you're willing to abandon dynamic switching you can also try the proprietary driver's built-in PRIME support. See here: http://download.nvidia.com/XFree86/Linux-x86_64/435.17/README/primerenderoffload.html
Make sure you're not using Nvidia DRM module (their vsync solution). It took me half a year to find the issue of this incredibly annoying issue.