SteamVR semaphores are now namespaced into separate sessions in order to fix this issue.
I sometimes still have this issue with SteamVR 1.7.9
System Report: SteamVR-2019-08-27-AM_01_43_41.txt
strace of vrcompositor: vrcompositor_semaphores.txt
Though today I know I had started SteamVR stable on the other account which probably does not have the fix. Do both SteamVR versions need it?
Still an issue btw. Ran SteamVR on one user, quit, switched users, started SteamVR "A key comonent is not working etc."
This terrible one liners cleans it up thanks to all the semaphores from SteamVR having 666 permissions
ipcs -s | grep 666 | while read LINE; do [[ -d $(ipcs -s -i $(echo $LINE | awk '{print $2}') | tail -n +9 | head -n +1 | while read PIDLINE; do ls -l /proc/$(echo $PIDLINE | awk '{print $5}')/self; done;) ]] || sudo ipcrm -s $(echo $LINE | awk '{print $2}'); done
Nothing extracted yet.
Sometimes SteamVR doesn't properly clean up (maybe when it crashes) and leaves files in /dev/shm or semaphores around. That's often not a problem because on startup it cleans up, except when you switch linux users and start SteamVR as another user, those resources can't be cleaned up.
The shared memory files can be easily cleaned up:
For the semaphores it's a bit more work. You have to start vrcompositor
and look for a line like this
then you can remove the semaphore with
sudo ipcrm -s 1769473An okay solution would be for SteamVR to ask for the user's password who owns the resources and clean up as that user.
A better solution would be for every user account to have its own set of resources, so the conflict is not there in the first place.