Skip to content

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!

2 points11 comments
Open on Reddit
About this post
Posted
Archived
Score
2 · 100% up
Kind
Text
ID
dc173m

Author

7
posts
26
comments
0
media
View profile

12 comments

Use journalctl to 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 nvidia driver 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).

2 points

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.

It might be worth mentioning how you're running the vulkan application

I'm using optimus-manager to switch cards. Is this an acceptable method?

1 points

optimus-manager

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-xrun for 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

2 points

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.

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.