ValveSoftware / SteamVR-for-Linux

Issue tracker for the Linux port of SteamVR
918 stars 45 forks source link

[BUG] Failed to create VkDevice with high priority queue #342

Open feilen opened 4 years ago

feilen commented 4 years ago

Describe the bug When launching SteamVR with a vanilla kernel, the following logs are printed:

Wed Apr 01 2020 18:10:55.277967 - Attempting to enable async support...
Wed Apr 01 2020 18:10:55.277977 - Enabling async support!
Wed Apr 01 2020 18:10:55.278262 - Failed to create VkDevice with high priority queue.
Wed Apr 01 2020 18:10:55.278285 - Disabling async support and retrying.

Installing (in my case, by downloading and dpkg -i-ing the debs) the linux-steamvr kernel resolves the issue.

There's a noticable difference with and without it, in that severely underperforming games (NMS with several settings turned up) will give a flickering double-vision unless 'Use legacy reprojection mode' is enabled, and games which previously would be pretty underperforming (VRChat in certain worlds) have much smoother rotation.

To Reproduce Steps to reproduce the behavior:

  1. Install default kernel (linux 5.4) and start steam web console.
  2. Logs (above) are consistently printed, and severely underperforming games have significant judder (turning your head makes everything flicker as frames are updated)
  3. Install linux-steamvr kernel
  4. Errors above are no longer printed, somewhat-underperforming games are smoother and significantly-underperforming games have the double-vision mentioned unless explicitly set to legacy reprojection mode.

Expected behavior Since steamvr-launcher has setcap enabled, it should be able to set the priority properly regardless of kernel version or hacks, but it's not presently able to.

System Information (please complete the following information):

Screenshots N/A

Additional context Possibly related (and more information) in #107

Note: Commenters who are also experiencing this issue are encouraged to include the "System Information" section in their replies.

nrndda commented 4 years ago

Also had this but after sudo setcap CAP_SYS_NICE=eip ~/.local/share/Steam/steamapps/common/SteamVR/bin/linux64/vrcompositor-launcher async reprojection works.

Graphics: Device-1: Advanced Micro Devices [AMD/ATI] Vega 10 XL/XT [Radeon RX Vega 56/64] driver: amdgpu v: kernel Display: x11 server: X.Org 1.20.8 driver: amdgpu resolution: 2560x1080~60Hz OpenGL: renderer: Radeon RX Vega (VEGA10 DRM 3.36.0 5.6.13+ LLVM 10.0.0) v: 4.6 Mesa 20.1.0-rc3

John-Gee commented 4 years ago

@nrndda that worked here as well, thank you!

I hope in the future we won't need to do that though.

nrndda commented 4 years ago

Steam client does this automatically by asking root access in zenity, but for me it didn't work. Probably some tool was missing. Also I prefer to know why and what will be done with root access and not give it blindly.

John-Gee commented 4 years ago

I don't remember seeing such window, strange. I agree with not giving blind root access of course, especially after #3671

ChristophHaag commented 4 years ago

fun fact, you're not giving super user access to an opaque binary, you can see in ~/.local/share/Steam/SteamApps/common/SteamVR/bin/vrstartup.sh that after the zenity dialog pops up, it simply uses polkit's pkexec to run setcap CAP_SYS_NICE=eip $STEAMVR_TOOLSDIR/bin/linux64/vrcompositor-launcher as root.

    if ! ${STEAM_ZENITY} --no-wrap --question --text="SteamVR requires superuser access to finish setup. Proceed?"; then
        pErr 'Error: user declined superuser request.'
        return 1
    fi

    pkexec setcap CAP_SYS_NICE=eip $STEAMVR_TOOLSDIR/bin/linux64/vrcompositor-launcher
nrndda commented 4 years ago

Oh, that's why it didn't work for me. I don't have polkit installed in my systemd-nspawn container, but have zenity and saw those attempts to run something as root.

John-Gee commented 4 years ago

Oh I had polkit but not zenity (qarma instead), I installed zenity and it worked. Thanks!

feilen commented 4 years ago

I should mention I've tried this before, doing sudo setcap CAP_SYS_NICE=eip and checking that it worked has no impact, reprojection still doesn't work and the above error message is still produced (except on the hacked kernel)

(See: #107)

feilen commented 3 years ago

Issue still persists after upgrade to Ubuntu 20.10.

> uname -a
Linux MAWnster 5.8.0-25-generic #26-Ubuntu SMP Thu Oct 15 10:30:38 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.10
Release:        20.10
Codename:       groovy