Skip to content

Instantly share code, notes, and snippets.

@feldim2425
feldim2425 / steamvr_dev.md
Created July 23, 2021 19:46
How to debug SteamVR Drivers on Linux

SteamVR Driver Dev (Linux)

Installing your driver

To install your driver on Linux you have to drop it into $STEAM_HOME/steamapps/common/SteamVR/drivers where STEAM_HOME depends on your Steam settings and distro. Usually it is located at ~/.steam or ~/.local/share/Steam. However it can also be located on an external drive depending on where SteamVR is installed.

The in the drivers folder you have to drop a folder named after your module. This folder has to contain the following structure:

driver/
 ├─ example/
 │ ├─ bin /
# MediaPipe graph that performs face mesh with TensorFlow Lite on CPU.
# Input image. (ImageFrame)
input_stream: "input_video"
# Output image with rendered results. (ImageFrame)
output_stream: "output_video"
# Collection of detected/processed faces, each represented as a list of
# landmarks. (std::vector<NormalizedLandmarkList>)
output_stream: "multi_face_landmarks"
# This modification allow ZSH to be set as a default terminal
# without breaking getty terminals (Ctrl+Alt+F[x])
# Other terminals can be excluded here or changed to inclusive.
# All that matters is that ZSH_PRIMITIVE equates to "true" for primitive terminals.
ZSH_PRIMITIVE="false"
if [ "x${TERM}" = "xlinux" ]; then
ZSH_PRIMITIVE="true"
fi
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Allows scripts running as www-data (NginX or Apache Webserver) to reboot the machine
#
# Execute "systemctl reboot -i" as a shell command (PHP: shell_exec)
# This policy has been tested on Ubuntu 20.04 Server Version (Policy kit 0.105 which is also used in Debian stretch)
#
# Copy this content into "/etc/polkit-1/localauthority/50-local.d/99-www-reboot.pkla"
# To apply the changes restart the policykit with "systemctl restart polkit.service"
#
# Note: The "localauthority" direcotry can only be viewed by root.
#!/bin/sh
COUNT_SWAP=0 # Set this to 1 if you want to count free swapspace as free memory
WARN=$(( 2 * 1024 * 1024 )) # 2GB has to be in KB so multiply with 1024 2-times
INTERVAL=10 # check every 10 seconds
INTERVAL_N=30 # check every 30 seconds after the first notification
AVAILABLE_MEM=$((`awk '/MemAvailable/{print $2}' /proc/meminfo`)) # get available memory
AVAILABLE_SWAP=$((`awk '/SwapFree/{print $2}' /proc/meminfo`)) # get swap memory
INTV_C=$INTERVAL
#!/bin/bash
# Author: FeldiM2425
# Licence: MIT
# Description:
# This Bashscript is used to detect the ssh-agent
# on a specific Unix-Socket (defined by the SSH_AUTH_SOCK environment variable)
# and start it when the ssh-agent is not running. If "-f" is passed as argument
# the socket file will be deleted before the ssh-agent is started even if a ssh-agent
# was detectet. The agent WILL NOT GET shut down before this operation