ValveSoftware / SteamVR-for-Linux

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

HTC Vive not detected: error 108 in Ubuntu 18.04 #156

Closed ghost closed 4 years ago

ghost commented 5 years ago

Below is a guide I wrote on how I fixed this issue HTC Vive Not connecting in Ubuntu 18.04 Solution. I have only tried this in Ubuntu 18.04 and can confirm this fixes the 108 error where the headset is not recognized by the system.

Important: Read This! It seems that every time I reboot I have to repeat step 2 commands in order to get the device recognized again.


You must type these commands every time on reboot in order for HTC Vive to be Recognized

Step 2 commands (Must be re entered on reboot):

Paste these four lines in terminal:

sudo chmod a+rw /dev/hidraw*

echo KERNEL=="hidraw*", ATTRS{idVendor}=="0bb4", MODE="0666"

echo KERNEL=="hidraw*", ATTRS{idVendor}=="28de", MODE="0666"

sudo udevadm control --reload-rules



Links I used to help me get this solution:

Driver: (This driver was actually uninstalled when I got it working initially) https://launchpad.net/~kisak/+archive/ubuntu/steamvr

Setup OpenVR: OpenVR Linux Forked Version: https://github.com/ChristophHaag/openvr

  1. Download openvr-master folder and follow the build instructions

  2. Enable the usb with the instructions here: https://www.gamingonlinux.com/articles/first-steps-with-openvr-and-the-vive-on-linux.7229/



Commands: (Paste these four lines in terminal)

sudo chmod a+rw /dev/hidraw*

echo KERNEL=="hidraw*", ATTRS{idVendor}=="0bb4", MODE="0666"

echo KERNEL=="hidraw*", ATTRS{idVendor}=="28de", MODE="0666"

sudo udevadm control --reload-rules



  1. Create steamvr.sh Script


Command: (Type this into terminal in the folder you want to save this script in):

sudo nano steamvr.sh



Then paste this:

!/bin/bash

export openvr=~/openvr

export steam=~/.local/share/Steam

export steamvr=$steam/SteamApps/common/OpenVR

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:\

/usr/lib/:\

/usr/lib32/:\

$openvr/lib/linux32/:\

$openvr/lib/linux64/:\

$steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/:\

$steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu/:\

$steamvr/bin/linux32/:\

$steamvr/bin/linux64/:\

$steamvr/drivers/lighthouse/bin/linux32/:\

$steamvr/drivers/lighthouse/bin/linux64/



  1. Run this command

source ./steamvr.sh

If the source ./steamvr.sh gives you a bunch of errors like this below, don't worry you can still get your vive to work.

What I got when I input the source ./steamvr.sh command:

bash: /usr/lib/:: No such file or directory bash: /usr/lib32/:: No such file or directory bash: /openvr/lib/linux32/:: No such file or directory bash: /openvr/lib/linux64/:: No such file or directory bash: /.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/:: No such file or directory



  1. Launch Steam

SteamVR should now recognize the original HTC Vive Headset in Ubuntu 18.04.

Winstead Works

Notes: --I did not have the amdgpu-pro driver installed when I got this to work.

--When I reinstalled I thought that the pro driver was the cause for getting the 108 error again. This is not the case, any time there is a reboot the step 2 commands need to be entered again.

--SteamVR will continue to work correctly if closed and re opened.

--Steam VR performance is poor for me at the moment and also the HTC Vive is not giving me feedback when I look into it, but the compositor is showing that the device is atleast being recognized and is working as far as tracking goes.

--Steam VR should recognize the Vive regardless if it is launched via terminal or through the dock.

--I am not sure if the steamvr.sh step is necessary or not to fix this issue, but I put that step in just incase since that is what I originally did to get the Vive working.

--I have had a crash where the screen froze on me and I had to reboot, but have not had this issue repeat itself.

--My computer is definitely running much slower with the compositor running. Will update with a solution if I figure out a fix for this.

System Information

SteamVR is not detecting my HTC Vive**** My Vive is not detected in SteamVR, although the light on my headset is green

I have tried to: uninstall and reinstall driver Install a fresh copy of Ubuntu 18.04 Re plug all of my usb devices and hdmi cables Re installing Steam and SteamVR multiple times with reboots

Steps for reproducing this issue:

  1. Install Ubuntu 18.04, update drivers and software
  2. Download Steam + Steam VR and launch application
  3. Error 108, HTC Vive not found
kisak-valve commented 5 years ago

Hello @winsteadworks, there's a decent chance this is a video driver related issue and you should have better results with https://launchpad.net/~kisak/+archive/ubuntu/steamvr.

ghost commented 5 years ago

when I installed this earlier before you even commented the link my screen started the blinking under dash with a black screen on reboot. Will this driver work with an Rx 580? @kisak-valve

ghost commented 5 years ago

Looks like I must have had a conflicting driver issues when installing last time. It booted fine after installing the driver this time but I am still getting the same 108 error @kisak-valve

ChristophHaag commented 5 years ago

Okay, this guide on gamingonlinux.com is severely outdated. It was written before SteamVR had proper Linux support.

Setup OpenVR: OpenVR Linux Forked Version: https://github.com/ChristophHaag/openvr

You don't need this. I made this fork purely to get the examples like hellovr_opengl compiling before SteamVR had proper Linux support. As you can see I have not updated it in 2 years, because Valve's OpenVR repository now works on Linux. If you want to compile it, you should use their repository. But just to get SteamVR working, you don't need this at all.

Paste these four lines in terminal: sudo chmod a+rw /dev/hidraw echo KERNEL=="hidraw", ATTRS{idVendor}=="0bb4", MODE="0666" echo KERNEL=="hidraw*", ATTRS{idVendor}=="28de", MODE="0666" sudo udevadm control --reload-rules

Actually only the first line gives permission to users to use the USB device directly, just echo of the udev rules doesn't really do anything. You need to put these lines into a .conf file in /usr/lib/udev/rules.d/. Personally I use this one that sets the permissions for user level access with hidraw and libusb: https://aur.archlinux.org/cgit/aur.git/plain/83-vive.rules?h=vive-udev. Just download it and move it sudo cp 83-vive.rules /usr/lib/udev/rules.d.

The error 108 Vive not detected error is usually caused by steamvr not having the permissions to read and write to the raw usb device, so this is likely the fix.

I believe if you install steam with Valve's steam package from the website https://store.steampowered.com/about/, this package should install the appropriate udev rules so you don't have to do this, but I have to admit that I have not tried it.

edit: A reddit thread just reminded me that there's a separate Ubuntu package for the udev rules: If you install the package steam-devices you should not have to install any rules manually.

steamvr.sh

Should not be needed, almost all of the paths have moved/don't exist anymore anyway.

--Steam VR performance is poor for me at the moment and also the HTC Vive is not giving me feedback when I look into it, but the compositor is showing that the device is atleast being recognized and is working as far as tracking goes.

What you get on stock ubuntu is what has been dubbed "extended mode". In this mode, the vrcompositor will run as a standard window in the X.org session and you're supposed to enable the Vive like a standard monitor in whatever monitor settings application Ubuntu comes with. The compositor window is supposed to go full screen on the Vive when it is enabled (hopefully automatically).

The preferred way to run VR stuff with X is "direct mode", though it will need a newer graphics driver stack than what is available in stock Ubuntu 18.04, that's what kisak's PPA provides.

I don't know if this is the case on Ubuntu 18.04 but there may be an unfortunate situation where the Vive "monitor" is already hidden from the desktop configuration but the rest of the driver stack is not new enough to use direct mode, in which case you can disable the "non-desktop" randr property with a command to get the extended mode behavior back. I wrote it a little bit more detailed at https://haagch.frickel.club/#!drmlease.md

--I did not have the amdgpu-pro driver installed when I got this to work.

Good, Valve is focusing on supporting the open source driver that is installed by default, or at least a more recent version of them. amdgpu-pro comes with its own Vulkan driver that may not work very well with SteamVR.

ghost commented 5 years ago

@ChristophHaag Thanks for all of the info. I managed to fix the 108 error but now my Vive displays my desktop (except it looks terrible, like you are looking at it with crossed eyes on steroids). The VR Compositor display the output when I pick up my headset and move it around. I can see steamvr home via the compositor. However, steamvr is VERY laggy and causes my entire system to lag. When I am typing with steamvr running my letters will be delayed and everything runs slow. Is this an issue with amdgpu-pro drivers?

I tried setting SteamVR to direct mode through the gui in settings but when it restarts it seems like it isn't actually applying the settings. If it is, they are not making a difference at all.

I am downloading steam from their website like you suggested rather than installing via Ubuntu Software Store and am trying all of the suggestions you made currently. Will update this comment with improvements/issues.

Here is my new link discussing the problems I am now facing. https://github.com/ValveSoftware/SteamVR-for-Linux/issues/157

ghost commented 5 years ago

@ChristophHaag as far as kisak driver goes..

When I input this: sudo apt install linux-generic-steamvr-18.04

I get: Reading package lists... Done Building dependency tree
Reading state information... Done E: Unable to locate package linux-generic-steamvr-18.04 E: Couldn't find any package by glob 'linux-generic-steamvr-18.04' E: Couldn't find any package by regex 'linux-generic-steamvr-18.04'

sudo apt install linux-lowlatency-steamvr-18.04

I get: Reading package lists... Done Building dependency tree
Reading state information... Done E: Unable to locate package linux-lowlatency-steamvr-18.04 E: Couldn't find any package by glob 'linux-lowlatency-steamvr-18.04' E: Couldn't find any package by regex 'linux-lowlatency-steamvr-18.04' These have given me this result since first install attempt ^^^

I already did this a few times trying to figure all of this out several hours ago. I deleted the drivers a few times with the commands on https://launchpad.net/~kisak/+archive/ubuntu/steamvr. Even after purging when I enter sudo apt install xserver-xorg-core xserver-xorg-input-libinput xserver-xorg-video-amdgpu or sudo apt install mesa-vulkan-drivers mesa-vulkan-drivers:i386 I get 0 upgrade, 0 newly installed etc..

I ran this command as well sudo mv /usr/share/vulkan/icd.d/intel_icd.x86_64.json /usr/share/vulkan/icd.d/intel_icd.x86_64.json.disabled

kisak-valve commented 5 years ago

This reads like something went wrong with the PPA and you're using the stock mesa driver.

With the PPA, apt policy mesa-vulkan-drivers should return something like

$ apt policy mesa-vulkan-drivers
mesa-vulkan-drivers:
  Installed: 1:18.2.4-steamvr2
  Candidate: 1:18.2.4-steamvr2
  Version table:
 *** 1:18.2.4-steamvr2 500
        500 http://ppa.launchpad.net/kisak/steamvr/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status
     18.0.5-0ubuntu0~18.04.1 500
        500 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
     18.0.0~rc5-1ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages

Please ppa-purge the PPA and re-add it with something like:

sudo apt install ppa-purge
sudo ppa-purge ppa:kisak/steamvr
sudo apt install xserver-xorg-video-all
sudo add-apt-repository ppa:kisak/steamvr
sudo apt-get update

Then try again.

ghost commented 5 years ago

@kisak-valve I am now getting this with apt policy mesa-vulkan-drivers:

mesa-vulkan-drivers: Installed: 1:18.2.5-steamvr1 Candidate: 1:18.2.5-steamvr1 Version table: *** 1:18.2.5-steamvr1 500 500 http://ppa.launchpad.net/kisak/steamvr/ubuntu bionic/main amd64 Packages 100 /var/lib/dpkg/status 18.0.5-0ubuntu0~18.04.1 500 500 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages 18.0.0~rc5-1ubuntu1 500 500 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages

However, When I have updated the drivers my vive headset has no output. The compositor is working but the vive display still isn't.

I have had to reinstall Ubuntu many times now trying to get this to work. One of the times when I tried though I installed just the kernel low latency, The vive actually worked for the first time in forever. BUT it looked like I was looking cross eyed into the headset. It was at least showing movement and also the compositor was working. Of course then after installing the other parts like the xorg experimental/ vulkan bits and then rebooting I got no display on the vive

ghost commented 5 years ago

Also if I don't install lightdm, the headset will turn on just when logging into ubuntu. After though the headset display turns off. This happens after driver is installed @kisak-valve

ghost commented 5 years ago

Also if I don't install lightdm, the headset will turn on just when logging into ubuntu. After though the headset display turns off. This happens after driver is installed @kisak-valve

The headset light will be green while logging into to ubuntu, but then turns red once logged in with no display

kisak-valve commented 5 years ago

The X packages in the PPA are to get you onto a version that is new enough to understand drm-leases and let vrcompositor drive the HMD directly instead of through the regular desktop environment. With that in mind, it's normal for your Vive to go into standby because the kernel tells X that it is a non-desktop display. For testing, you can extend the desktop onto the HMD with something like xrandr --output HDMI-1 --set non-desktop 0 (and take it away from the desktop by setting it back to 1).

Assuming you otherwise repeated the instructions in the PPA, my guess is you need to check the last step and disable the 64 bit intel vulkan icd again.

ChristophHaag commented 5 years ago

That the HMD turns on at the Ubuntu log in screen is most likely due to gdm running on wayland by default, and gnome shell on wayland does not implement the "non-desktop" stuff that is used to exclude the HMD from the desktop.

Changing #WaylandEnable=false to WaylandEnable=false in /etc/gdm/custom.conf would make gdm use X11 which should exclude the HMD from the desktop.

This is not a requirement, the HMD should work just as well after it has been activated for gdm on wayland and then deactivated when starting the desktop on X. It would be just for improving the user experience a little by not having taking the chance of the gdm login mask and mouse cursor appear on the HMD instead of a monitor.

Replacing gdm with lightdm is another way to achieve the same. As far as I know gdm is the only major login manager that runs on wayland by default, lightdm etc. run on X.

ghost commented 5 years ago

@kisak-valve if I put xrandr --output HDMI-1 --set non-desktop 0 in terminal I get this:

warning: output HDMI-1 not found; ignoring X Error of failed request: BadRROutput (invalid Output parameter) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 15 (RRGetOutputProperty) Serial number of failed request: 44 Current serial number in output stream: 44

Still do display. @ChristophHaag I have already tried going to lightdm and still no display for me. Also I do not have the directory /etc/gdm/, is there something I need to install? I know gdm comes with ubuntu but I am not seeing this directory.

Also even with lightdm the vive is not seen as a display in my settings --> Devices

ghost commented 5 years ago

Ok @kisak-valve I have turned the vive display back on. It looks like I am looking at the display cross eyed though and is very choppy. My computer will even go as far as freezing

aidygus commented 5 years ago

When I got my Vive last week I spent 2 days trying to get it to work. My problem was my main .steam folder had been migrated from computer to computer over the last few years and may have picked up some corruption that stopped SteamVR working properly. Renaming .steam to create a new main library fixed my issue.

ghost commented 5 years ago

Are you using linux? @aidygus

rwbaumg commented 5 years ago

This is all very similar to #131, and since I'm having error 108 with Vive Pro under Bionic as well, I'll try the advice posted here and let everyone know if I have any success.

rwbaumg commented 5 years ago

See my post to #131 - this error is version related.

The Vive Pro works just fine on kernel 4.18 + Xorg 1.20.1, included in Ubuntu 18.10 (cosmic).

ghost commented 5 years ago

On AMD Cards?

On Tue, Feb 19, 2019 at 11:02 PM Robert W. Baumgartner < notifications@github.com> wrote:

See my post to #131 https://github.com/ValveSoftware/SteamVR-for-Linux/issues/131 - this error is version related.

The Vive Pro works just fine on kernel 4.18 + Xorg 1.20.1, included in Ubuntu 18.10 (cosmic).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ValveSoftware/SteamVR-for-Linux/issues/156#issuecomment-465425301, or mute the thread https://github.com/notifications/unsubscribe-auth/AkUvrdNCu0UeGlk8MUFfTvvwPL84xarGks5vPNcAgaJpZM4Ye-rs .

rwbaumg commented 5 years ago

@winsteadworks I would assume so but am not certain - I don't have any AMD cards to test with, but so long as you're using the latest binary drivers with Xorg >= 1.20 and kernel >= 4.15 you should be good to go.

And BTW, I get the cross-eyed thing as well with some games running under Proton - try a native Linux VR game and see if that works better for you.

kedodrill commented 4 years ago

@kisak-valve The account that made this issue has been deleted - they do mention that they ended up fixing the 108 error though. Might be a good one to close.

Additionally, this other issue was opened by presumably the same user. That one might also be good to close as there are no other comments.

@rwbaumg As for the cross-eyed thing, does that still happen to you? I do not have a Vive so I can't test that out, but if it's still happening maybe moving it to another new separate issue would be good.

kisak-valve commented 4 years ago

Closing per the last comment and because the reporting user has turned into a ghost.