Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] asynchronous reprojection - Insufficient permission to create high priority queue. #660

Open
Links2004 opened this issue Dec 14, 2023 · 7 comments
Labels

Comments

@Links2004
Copy link

Describe the bug
cap_sys_nice is set but Insufficient permission to create high priority queue. is shown in the log and asynchronous reprojection is "not supported"

$ getcap ~/.steam/steam/steamapps/common/SteamVR/bin/linux64/vrcompositor-launcher
/home/links/.steam/steam/steamapps/common/SteamVR/bin/linux64/vrcompositor-launcher cap_sys_nice=eip

the only simmular issue i found is: NixOS/nixpkgs#217119 since it looks like that Steam Linux Runtime is using bwrap too.

$ ps aux | grep bwrap
links      48707  0.0  0.0   4592  1536 ?        S    11:24   0:00 /home/links/.local/share/Steam/steamapps/common/SteamLinuxRuntime_sniper/pressure-vessel/bin/pv-bwrap --args 27 /usr/lib/pressure-vessel/from-host/bin/pressure-vessel-adverb --generate-locales --fd 18 --regenerate-ld.so-cache /run/pressure-vessel/ldso --add-ld.so-path /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu --add-ld.so-path /usr/lib/pressure-vessel/overrides/lib/i386-linux-gnu --set-ld-library-path /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/aliases:/usr/lib/pressure-vessel/overrides/lib/i386-linux-gnu/aliases --exit-with-parent --subreaper --assign-fd=1=6 --assign-fd=2=7 --shell=none --terminal=none --ld-preload=libgamemodeauto.so.0 -- /home/links/.local/share/Steam/steamapps/common/SteamLinuxRuntime_sniper/pressure-vessel/bin/steam-runtime-launcher-interface-0 container-runtime /home/links/.local/share/Steam/steamapps/common/SteamVR/bin/vrstartup.sh

To Reproduce
Steps to reproduce the behavior:

  1. Go to start SteamVR with steam linux runtime
  2. look in log or settings page

Expected behavior
the steam linux runtime chroot / isolation do allow the use of cap_sys_nice and as a result asynchronous reprojection can be enabled.

System Information (please complete the following information):

Screenshots
image

Additional context

Thu Dec 14 2023 11:25:01.226004 [Info] - Selected mode 3.
Thu Dec 14 2023 11:25:01.464403 [Info] - Acquired xlib display!
Thu Dec 14 2023 11:25:01.464436 [Info] - Direct mode surface: 0x56019a1b5070
Thu Dec 14 2023 11:25:01.464466 [Info] - Requesting 10 device extensions:
Thu Dec 14 2023 11:25:01.464477 [Info] -  - VK_KHR_swapchain
Thu Dec 14 2023 11:25:01.464486 [Info] -  - VK_KHR_maintenance1
Thu Dec 14 2023 11:25:01.464496 [Info] -  - VK_KHR_dedicated_allocation
Thu Dec 14 2023 11:25:01.464505 [Info] -  - VK_KHR_get_memory_requirements2
Thu Dec 14 2023 11:25:01.464514 [Info] -  - VK_KHR_external_memory
Thu Dec 14 2023 11:25:01.464524 [Info] -  - VK_KHR_external_semaphore
Thu Dec 14 2023 11:25:01.464533 [Info] -  - VK_EXT_display_control
Thu Dec 14 2023 11:25:01.464542 [Info] -  - VK_KHR_external_memory_fd
Thu Dec 14 2023 11:25:01.464551 [Info] -  - VK_KHR_external_semaphore_fd
Thu Dec 14 2023 11:25:01.464568 [Info] -  - VK_EXT_global_priority
Thu Dec 14 2023 11:25:01.464579 [Info] - Global priority query enabled: 1
Thu Dec 14 2023 11:25:01.464588 [Info] - Attempting to enable async support...
Thu Dec 14 2023 11:25:01.464598 [Info] - Enabling async support!
Thu Dec 14 2023 11:25:01.464745 [Error] - Insufficient permission to create high priority queue.
Thu Dec 14 2023 11:25:01.464758 [Error] - Failed to create VkDevice with high priority queue.
Thu Dec 14 2023 11:25:01.464768 [Error] - Disabling async support and retrying.
Thu Dec 14 2023 11:25:01.505361 [Info] - m_pVkInstance : 0x56019a16da20
Thu Dec 14 2023 11:25:01.505393 [Info] - m_pVkPhysicalDevice : 0x56019a1a9060
Thu Dec 14 2023 11:25:01.505412 [Info] - m_pVkDevice : 0x56019a259da0
Thu Dec 14 2023 11:25:01.505423 [Info] - m_pVkGraphicsQueue : 0x56019a473d60
Thu Dec 14 2023 11:25:01.505432 [Info] - m_pVkComputeQueue : (nil)

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

@Links2004 Links2004 added the bug label Dec 14, 2023
@Scrumplex
Copy link

I don't think SteamVR runs inside a pressure-vessel based runtime by default, so I don't think this is a problem with CAP_SYS_NICE. I thought NVIDIA didn't support async reprojection in general yet

@Links2004
Copy link
Author

Links2004 commented Dec 31, 2023

the NVIDIA driver supports it since a long time (2021) see:

https://www.nvidia.com/download/driverResults.aspx/176525/en-us/

Added support for VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT from the VK_EXT_global_priority extension. This enables support for asynchronous reprojection in SteamVR.

VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT is supported on Pascal GPUs and newer.

Global priorities other than VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT require root privileges or the CAP_SYS_NICE capability.

and vulkaninfo shows support.

sudo vulkaninfo  | grep -i global
	VK_EXT_global_priority                        : extension revision 2
	VK_EXT_global_priority_query                  : extension revision 1
	VK_KHR_global_priority                        : extension revision 1
		VkQueueFamilyGlobalPriorityPropertiesKHR:
				QUEUE_GLOBAL_PRIORITY_LOW_KHR
				QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR
				QUEUE_GLOBAL_PRIORITY_HIGH_KHR
				QUEUE_GLOBAL_PRIORITY_REALTIME_KHR
		VkQueueFamilyGlobalPriorityPropertiesKHR:
				QUEUE_GLOBAL_PRIORITY_LOW_KHR
				QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR
				QUEUE_GLOBAL_PRIORITY_HIGH_KHR
		VkQueueFamilyGlobalPriorityPropertiesKHR:
				QUEUE_GLOBAL_PRIORITY_LOW_KHR
				QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR
				QUEUE_GLOBAL_PRIORITY_HIGH_KHR
				QUEUE_GLOBAL_PRIORITY_REALTIME_KHR
		VkQueueFamilyGlobalPriorityPropertiesKHR:
				QUEUE_GLOBAL_PRIORITY_LOW_KHR
				QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR
				QUEUE_GLOBAL_PRIORITY_HIGH_KHR
		VkQueueFamilyGlobalPriorityPropertiesKHR:
				QUEUE_GLOBAL_PRIORITY_LOW_KHR
				QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR
				QUEUE_GLOBAL_PRIORITY_HIGH_KHR
				QUEUE_GLOBAL_PRIORITY_REALTIME_KHR
VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR:
	globalPriorityQuery = true

@edwin-v
Copy link

edwin-v commented May 16, 2024

The same thing started happening on a working 1.27.5 install. So it's something the Steam client did. I see that vrstartup.sh / vrsetup.sh is no started under Sniper, so I assume this is what broke a bunch of things.

Edit:
Conclusions after a short investigation.

  • /usr/sbin is not in the path inside the container.
  • caps set in the source filesystem do not transfer into the container.
  • pkexec (and a bunch of libraries it needs) is not available in the container.

I'm unsure if it's even possible to elevate your permission in the container.

If I have more time, I may try to wrap srt-bwrap in a script that skips the container for vrstartup.sh.

@cyberkitsune
Copy link

Just commenting to +1 this, also getting:

Tue May 21 2024 23:02:34.355714 [Info] - Enabling async support!
Tue May 21 2024 23:02:34.355965 [Error] - Insufficient permission to create high priority queue.
Tue May 21 2024 23:02:34.355984 [Error] - Failed to create VkDevice with high priority queue.
Tue May 21 2024 23:02:34.356001 [Error] - Disabling async support and retrying.

Distribution: Fedora 40
SteamVR version: 2.6.1 beta
Steam client version: 1716242052
Opted into Steam client beta?: Yes
Graphics driver version: NVIDIA 550.78
Gist for SteamVR System Information: https://gist.github.com/cyberkitsune/daa3332e369056298004d5bae3ec6439

@vsTerminus
Copy link

vsTerminus commented Jul 5, 2024

Also just commenting to +1 as the issue is still affecting me.

I can work around the issue by launching ~/.steam/steam/steamapps/common/SteamVR/bin/vrstartup-helper.sh manually instead of from inside Steam and then async reprojection works perfectly, but, often times when I shut down SteamVR after it has been launched this way it just crashes my entire computer and that's no good.

However, games like DCS and Microsoft Flight Simulator are unplayable without async, so finding a better solution to this problem that doesn't risk hard crashing my computer would be nice.

(Edit: System-wide crash doesn't seem to happen on Wayland.)

When I launch SteamVR the normal way (through Steam) I see this in vrcompositor.txt

Thu Jul 04 2024 22:03:32.107047 [Info] - Global priority query enabled: 1
Thu Jul 04 2024 22:03:32.107056 [Info] - Attempting to enable async support...
Thu Jul 04 2024 22:03:32.107065 [Info] - Enabling async support!
Thu Jul 04 2024 22:03:32.107245 [Error] - Insufficient permission to create high priority queue.                                                                                                                                                                                                                        
Thu Jul 04 2024 22:03:32.107257 [Error] - Failed to create VkDevice with high priority queue.
Thu Jul 04 2024 22:03:32.107266 [Error] - Disabling async support and retrying.

System Info
Distribution: Arch Linux
SteamVR Version: 2.7.2
Steam Beta Branch: Steam Beta Update
Steam Version: 1719967667
Steam Client Build Date: Tue, Jul 2 17:38 UTC -08:00
Steam Web Build Date: Tue, Jul 2 19:35 UTC -08:00
Steam API Version: SteamClient021
Graphics Driver Version: nvidia-dkms 555.58.02-1
Gist for SteamVR System Information
GPU: NVIDIA RTX 3090 Ti
CPU: AMD Ryzen 9 5950X
RAM: 64GB DDR4-3200
HMD: Valve Index

@exuvo
Copy link

exuvo commented Nov 16, 2024

Running as steam-native in the console i get:
vrstartup.sh[581849]: Steam Linux Runtime: sniper_platform_0.20241008.104210
vrstartup.sh[581849]: call /home/exuvo/.local/share/Steam/steamapps/common/SteamVR/bin/vrsetup.sh
vrsetup.sh[581873]: Detected Steam Linux Runtime pressure-vessel launch in sniper_platform_0.20241008.104210
vrsetup.sh[581873]: Error: steam launcher service not available, vrcompositor-launcher will execute inside the container with no privileges.

And Insufficient permission to create high priority queue in the vrcompositor log.

But running with steam-runtime it works. UI still says it is not supported but log does not say it failed and actually playing is very smooth now.

System Info
Arch Linux
GPU: AMD RX 7900 XTX
HMD: Valve Index

@edwin-v
Copy link

edwin-v commented Jan 9, 2025

Did a clean Ubuntu install with a clean SteamVR install. Despite the startup setting the capability on the vrcompositor-launcher executable, it kept saying that permissions were not sufficient.

Took me way to much time, but I figured out what was happening. I have a different drive mounted as my home volume. When you add that to your system in Ubuntu UI, it adds the "nosuid" mount option to it. And as it turns out, this nullifies all capabilities set on files. Unfortunately not something that the setup warns you about.

So if you encounter the "Insufficient permission ..." error in the vrcompositor logs, then check your mount options!

Didn't help though. Turns out that SteamVR wouldn't work at all after that. But that's a problem for a different issue.
Edit: Ok, that issue is fixed by the betas. After that it's just unusable due to the already existing reprojection issues of SteamVR2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants