Monday, July 31, 2023

Samsung Odyssey + and SteamVR in xubuntu 22.04

*caveat There are things that I did, that I'm not posting here.I can't remember everything, but I searched synaptic for broad terms, and searched through to find what I needed. Or just googled. Or just installed what ever lib was complaining.  Check your logs for clues. vrserver.txt is where I first saw the libcurl error. the other vr*.txt logs have useful info as well if you get stuck, you should be able to find help on the discord. (searching the discord is where I got the clue for the fix for the libcurl error as well.)

*Edit, I referenced this page for a bunch of things, and couldn't find it again, when I did my reinstall.
https://gitlab.freedesktop.org/monado/webpage/-/merge_requests/41/diffs

First install video Drivers.
I have an Nvidia RTX 2060, so I've installed the latest tested proprietary drivers from ubuntu. (You can google if you don't know how... it's easy) (if you can't save xorg.conf, google "nvidia polkit")


Then install these:

   sudo apt install cmake ninja-build build-essential git wget unzip libeigen3-dev curl patch python3 pkg-config libx11-dev libx11-xcb-dev libxxf86vm-dev libxrandr-dev libxcb-randr0-dev libvulkan-dev glslang-tools libglvnd-dev libgl1-mesa-dev ca-certificates libusb-1.0-0-dev libudev-dev libhidapi-dev libwayland-dev libuvc-dev libavcodec-dev libopencv-dev libv4l-dev libcjson-dev libsdl2-dev libegl1-mesa-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libbluetooth-dev libsystemd-dev xr-hardware

Download and compile/install Monado

    git clone https://gitlab.freedesktop.org/monado/monado.git

    cd monado/

    cmake -G Ninja -B build -DCMAKE_INSTALL_PREFIX=/usr

    sudo ninja -C build install


create /etc/X11/xorg.conf.d/99-HMD.conf and insert this into contents


   sudo nano /etc/X11/xorg.conf.d/99-HMD.conf


Section "Device"

    Identifier     "Device0"

    Driver         "nvidia"


    Option "AllowHMD" "yes"

EndSection

xrandr --output HDMI-0 --prop --set non-desktop 1

now run monado-service with your headset plugged in and you should get a grey output on the goggles.

press enter to exit monado-service

monado-service

Install Steam and devices(again, lots of how tos on this)
sudo apt install steam-installer steam-devices
log in, and install steamvr 

There were a bunch of other steps that I did not include, as most were not necessary. Most of it was troubleshooting, and I think the next line is what would have saved me hours...


Libcurl is installed with steam, and it's corrupt? incorrect? dunno... link it to actual, and all works fine.


   cd /home/$USER/.steam/steam/ubuntu12_32/steam-runtime/pinned_libs_64

   mv libcurl.so.4 libcurl.so.4.bak

   ln -s /usr/lib/x86_64-linux-gnu/libcurl.so.4 libcurl.so.4
Then,

~/.steam/steam/steamapps/common/SteamVR/bin/vrpathreg.sh adddriver /usr/share/steamvr-monado

Run steamvr

This works with multiple monitors. Maybe older versions had issues, but this did not.

Installed these, but not sure if I needed them.
 python3 vulkan-tools libvulkan1 

OpenXR-SDK

sudo apt install mesa-common-dev libxxf86vm-dev libxcb-randr0-dev libxcb-keysyms1-dev libxcb-icccm4-dev libxcb-glx0-dev libxcb-dri2-0-dev libx11-xcb-dev libvulkan-dev libgl1-mesa-dev 

git clone https://github.com/KhronosGroup/OpenXR-SDK.git
cd OpenXR-SDK
cmake . -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -Bbuild
sudo ninja -C build install

sudo mkdir -p /etc/xdg/openxr/1/
sudo ln -s /usr/share/openxr/1/openxr_monado.json /etc/xdg/openxr/1/active_runtime.json
mkdir -p ~/.config/openxr/1
ln -s /usr/share/openxr/1/openxr_monado.json ~/.config/openxr/1/active_runtime.json

Installed basalt according to readme/ https://gitlab.freedesktop.org/monado/webpage/-/merge_requests/41/diffs
and now 6dof works? either way, my terminology may be wrong, but it's good.

### For SLAM tracking support, using Basalt 

Some other dependencies are needed.

  sudo apt install libtbb-dev libglew-dev libpng-dev liblz4-dev libbz2-dev libboost-dev libboost-regex-dev libboost-filesystem-dev libboost-date-time-dev libboost-program-options-dev libboost-serialization-dev libgtest-dev libfmt-dev libuvc-dev

git clone --recurse-submodules https://gitlab.freedesktop.org/mateosss/basalt
cd basalt
cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
sudo ninja -C build install

recompile monado

cd monado/

    cmake -G Ninja -B build -DCMAKE_INSTALL_PREFIX=/usr

    sudo ninja -C build install

A bit about this xrandr command. I could make this load on login, but I run multiple monitors and my hdmi port uses one, so I switch it. also, I don't leave my headset plugged in, to save it's life. even plugged in and off, it's warm, so I leave it unplugged when not using, and then run this when I plug in, and test with monado-service.

xrandr --output HDMI-0 --prop --set non-desktop 1
test with
monado-service

check the readme's for info on this line as well, as you may have a different setup than mine, and your variables will be different.

No comments:

Post a Comment