Utilities for SteamVR on Linux

Overview

SteamVR Utils for Linux

This project contains scripts to improve the functionally of SteamVR on Linux:

  • Turning Base Stations (V1 or V2) on/off (via Bluetooth)
  • Changing the audio output of games to the headset and back to the normal audio device

A daemon can start automatically with SteamVR (via launch options), once SteamVR is closed the Base Stations are turned off again. Alternatively the scripts can be executed manually.

  • Currently, this is known to work with a Valve Index, V2 Base Stations and V1 Base Stations. Other headsets might work.
  • For the Base Station component a Bluetooth device capable of btle (Bluetooth Low Energy) is required.
  • For the audio component PulseAudio (more specifically pactl, which is installed by default) is required.

This project is not affiliated with SteamVR, Steam or Valve.

Install

Download:

git clone https://github.com/DavidRisch/steamvr_utils.git

Install dependencies (the last command is required for bluepy to run without root privileges):

sudo apt install pip3 libglib2.0-dev
sudo pip3 install bluepy psutil
sudo setcap 'cap_net_raw,cap_net_admin+eip' /usr/local/lib/python3.?/dist-packages/bluepy/bluepy-helper

Get launch options to configure SteamVr with and create desktop shortcuts:

./scripts/install.py

Usage

Depending on your setup some configuration (see section below) may be required before these commands work. Try out what works before changing the default configuration.

Start daemon automatically when SteamVr starts:

Follow the instruction returned by ./scripts/install.py.

Start daemon manually:

./scripts/steamvr_utils.py daemon

Turn Base Stations on and switch audio to the headset:

./scripts/steamvr_utils.py on

Turn Base Stations off and switch audi to the normal device:

./scripts/steamvr_utils.py off

Configuration

First make a copy of the default config file:

cp ./config/config_template.yaml ./config/config.yaml

If you chose a name other than config.yaml you will have to specify its location (--config argument).

The default config file contains explanations on each available field. Some config values are regular expressions (regexes), to get help with configuring them correctly see the output of:

./scripts/steamvr_utils.py config-help

For usage with V1 Base Stations some configuration is required, V2 Base Stations work out-of-the-box.

Acknowledgments

Comments
  • Not working on arch linux

    Not working on arch linux

    So I tried to run it on garuda linux and I'm unable to make it work. I installed all dependacy. I did manage to start my base station but since then I was never able to turn them off. Bluepy is always unable to connect to my base base station evens if he find them.. I'm going mad... I also I'm using pipewire but I disable the audio component since It make problem

    stale 
    opened by marclemieux64 21
  • Runtime Error

    Runtime Error "No default sink was found"

    When i try to run steamvr_utils.py on/off/daemon, i get the follwing output:

    ~/.../steamvr_utils/scripts >>> ./steamvr_utils.py daemon                                                                                        [2]
    2021-01-10 15:57:12 [DEBUG]: dry_run: False
    2021-01-10 15:57:12 [DEBUG]: 'pactl list short sinks':
    0       alsa_output.usb-Astro_Gaming_Astro_A50-00.stereo-game   module-alsa-card.c      s16le 2ch 48000Hz       SUSPENDED
    1       alsa_output.usb-Astro_Gaming_Astro_A50-00.stereo-chat   module-alsa-card.c      s16le 2ch 48000Hz       SUSPENDED
    4       alsa_output.pci-0000_12_00.4.analog-stereo      module-alsa-card.c      s16le 2ch 44100Hz       RUNNING
    5       alsa_output.usb-Creative_Technology_Ltd_Sound_Blaster_E5_040D00B00EX-00.analog-stereo   module-alsa-card.c      s24le 2ch 48000Hz       SUSPENDED
    8       alsa_output.pci-0000_10_00.1.hdmi-stereo-extra4 module-alsa-card.c      s16le 2ch 44100Hz       SUSPENDED
    
    2021-01-10 15:57:12 [ERROR]: 
    Traceback (most recent call last):
      File "/home/termy/projects/git/steamvr_utils/scripts/./steamvr_utils.py", line 101, in main
        steamvr_utils = SteamvrUtils(
      File "/home/termy/projects/git/steamvr_utils/scripts/./steamvr_utils.py", line 31, in __init__
        self.audio_switcher = AudioSwitcher(config)
      File "/home/termy/projects/git/steamvr_utils/scripts/audio_switcher.py", line 51, in __init__
        default_sink_name = self.get_default_sink_name()
      File "/home/termy/projects/git/steamvr_utils/scripts/audio_switcher.py", line 211, in get_default_sink_name
        raise RuntimeError('No default sink was found.')
    RuntimeError: No default sink was found.
    
    

    pactl list cards: https://pastebin.com/bw7Rynyf

    i'm not sure what i could try? Let me know if you need any other info :)

    opened by Termuellinator 12
  • Failed to execute management command 'scanend'

    Failed to execute management command 'scanend'

    Hello everyone. After finding out that the lightouses on steam vr for linux are borked i wanted to give this script a try. But unfortunately it seems like my computer hates bluethoot with a passion and it just refuses to work. Whenever I launch the scrip for turning on the base stations the following error pops up:

    2021-01-16 20:19:31 [DEBUG]: dry_run: False
    2021-01-16 20:19:31 [INFO ]: SteamvrUtils turning on:
    2021-01-16 20:19:31 [ERROR]: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
    2021-01-16 20:19:31 [ERROR]: Failure of attempt 1 of 5
    2021-01-16 20:19:31 [ERROR]: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
    2021-01-16 20:19:31 [ERROR]: Failure of attempt 2 of 5
    2021-01-16 20:19:32 [ERROR]: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
    2021-01-16 20:19:32 [ERROR]: Failure of attempt 3 of 5
    2021-01-16 20:19:32 [ERROR]: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
    2021-01-16 20:19:32 [ERROR]: Failure of attempt 4 of 5
    2021-01-16 20:19:33 [ERROR]: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
    2021-01-16 20:19:33 [ERROR]: Failure of attempt 5 of 5
    2021-01-16 20:19:33 [ERROR]: No successful attempt in any of the 5 attempts. Last error:
    2021-01-16 20:19:33 [ERROR]: 
    Traceback (most recent call last):
      File "./steamvr_utils.py", line 110, in main
        steamvr_utils.action(selected_action)
      File "./steamvr_utils.py", line 35, in action
        self.turn_on()
      File "./steamvr_utils.py", line 60, in turn_on
        self.basestation_power_interface.robust_action(BasestationPowerInterface.Action.ON)
      File "/home/firestorm7893/Desktop/steamvr_utils/scripts/basestation_interface.py", line 124, in robust_action
        attempt_loop(lambda: self.scan(), self.config.basestation_attempt_count_scan())
      File "/home/firestorm7893/Desktop/steamvr_utils/scripts/basestation_interface.py", line 122, in attempt_loop
        raise last_error
      File "/home/firestorm7893/Desktop/steamvr_utils/scripts/basestation_interface.py", line 110, in attempt_loop
        return function()
      File "/home/firestorm7893/Desktop/steamvr_utils/scripts/basestation_interface.py", line 124, in <lambda>
        attempt_loop(lambda: self.scan(), self.config.basestation_attempt_count_scan())
      File "/home/firestorm7893/Desktop/steamvr_utils/scripts/basestation_interface.py", line 63, in scan
        raise e
      File "/home/firestorm7893/Desktop/steamvr_utils/scripts/basestation_interface.py", line 49, in scan
        scanner.scan(2)
      File "/usr/local/lib/python3.8/dist-packages/bluepy/btle.py", line 852, in scan
        self.start(passive=passive)
      File "/usr/local/lib/python3.8/dist-packages/bluepy/btle.py", line 797, in start
        self._mgmtCmd(self._cmd()+"end")
      File "/usr/local/lib/python3.8/dist-packages/bluepy/btle.py", line 312, in _mgmtCmd
        raise BTLEManagementError("Failed to execute management command '%s'" % (cmd), rsp)
    bluepy.btle.BTLEManagementError: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
    
    

    It would be really cool if I managed to get it working

    opened by Firestorm7893 10
  • Test V1 Base Station Support

    Test V1 Base Station Support

    @Firestorm7893 I added support for V1 Base Stations in cb58f334. Can you please test if works? Your config:

    basestation:
      enabled: true  # Boolean. Enable the Base Station component.
    
      # ==== FOR V1 AND V2 BASE STATIONS ====
      attempt_count_set: 5  # Int >0. Number of attempts to set the power state of Base Station.
    
      # ==== FOR V2 BASE STATIONS (from Valve) ONLY ====
      type: 'v1'  # Enum(v1, v2). Version of your Base Stations.
      attempt_count_scan: 5  # Int >0. Maximum number of attempts to find Base Stations.
    
      # ==== FOR V1 BASE STATIONS (from VIVE) ONLY ====
      lh_b_mac: '40:4E:36:BD:A8:45'  # String(XX:XX:XX:XX:XX:XX). Bluetooth MAC address of Lighthouse B.
      lh_b_id: '62F5DDD9'  # String(XXXXXXXX). ID of Lighthouse B (printed on the back).
      lh_c_mac: '40:4E:36:BD:A1:38'  # String(XX:XX:XX:XX:XX:XX). Bluetooth MAC address of Lighthouse C.
      lh_c_id: '0E97C927'  # String(XXXXXXXX). ID of Lighthouse C (printed on the back).
      # See https://github.com/risa2000/lhctrl for details.
    opened by DavidRisch 9
  • Issues with audio automatic switching

    Issues with audio automatic switching

    Sorry for bugging you again, but I'm having some troubles with the audio component. I adapted your script to work with the Vive lighthouses so I got that part figured out, what's missing for this setup to be perfect is the automatic audio switch. For sure i configured something wrong (even though the debug strings it prints makes it look like it chose the right sinks) but whenever i start VrUtils it crashes with this error:

    firestorm7893@firestorm7893-desktop:~/.steamvr_utils/scripts$ ./steamvr_utils.py on
    2021-01-17 20:01:36 [DEBUG]: dry_run: False
    2021-01-17 20:01:36 [DEBUG]: 'pactl list short sinks':
    0	alsa_output.pci-0000_01_00.1.hdmi-stereo	module-alsa-card.c	s16le 2ch 44100Hz	SUSPENDED
    1	alsa_output.usb-Corsair_Corsair_VOID_PRO_Wireless_Gaming_Headset-00.analog-stereo	module-alsa-card.c	s16le 2ch 44100Hz	IDLE
    2	alsa_output.pci-0000_00_1f.3.analog-stereo	module-alsa-card.c	s16le 2ch 44100Hz	SUSPENDED
    4	PulseEffects_apps	module-null-sink.c	s16le 2ch 44100Hz	IDLE
    5	PulseEffects_mic	module-null-sink.c	s16le 2ch 44100Hz	SUSPENDED
    
    2021-01-17 20:01:36 [DEBUG]: normal sink: alsa_output.usb-Corsair_Corsair_VOID_PRO_Wireless_Gaming_Headset-00.analog-stereo
    2021-01-17 20:01:36 [DEBUG]: vr sink: alsa_output.pci-0000_01_00.1.hdmi-stereo
    2021-01-17 20:01:36 [INFO ]: SteamvrUtils turning on:
    2021-01-17 20:01:36 [ERROR]: 
    Traceback (most recent call last):
      File "./steamvr_utils.py", line 110, in main
        steamvr_utils.action(selected_action)
      File "./steamvr_utils.py", line 35, in action
        self.turn_on()
      File "./steamvr_utils.py", line 63, in turn_on
        self.audio_switcher.switch_to_vr()
      File "/home/firestorm7893/.steamvr_utils/scripts/audio_switcher.py", line 87, in switch_to_vr
        self.port = self.get_port()
      File "/home/firestorm7893/.steamvr_utils/scripts/audio_switcher.py", line 215, in get_port
        cards = pactl_interface.Card.get_all_cards()
      File "/home/firestorm7893/.steamvr_utils/scripts/pactl_interface/card.py", line 157, in get_all_cards
        cards.append(cls(card_dict))
      File "/home/firestorm7893/.steamvr_utils/scripts/pactl_interface/card.py", line 86, in __init__
        self.ports.append(self.Port(port_dict, self))
      File "/home/firestorm7893/.steamvr_utils/scripts/pactl_interface/card.py", line 31, in __init__
        self.name = match.group(1)
    AttributeError: 'NoneType' object has no attribute 'group'
    

    I'll also add my current configuration:

    # copy to config.yaml to customize
    
    dry_run: false  # Boolean. Do not change anything.
    
    log:
      enabled: true  # Boolean. Write a log for each execution.
    
    basestation:
      enabled: false  # Boolean. Enable the Base Station component.
      attempt_count_scan: 5  # Int >0. Maximum number of attempts to find Base Stations.
      attempt_count_set: 5  # Int >0. Number of attempts to set the power state of Base Station.
    
    audio:
      enabled: true  # Boolean. Enable the Base Station component.
      vr_sink_regex: '.*hdmi.*'  # Regex. Used to find the audio sink of the vr headset.
      normal_sink_regex: ''  # Regex. Used to find the audio sink of the regular audio device. Leave empty to detect automatically (not recomme>
      excluded_clients_regexes: # List of regexes. Used to ignore some audio clients. Intended for application not needed in vr.
        - 'firefox'
      set_card_port: true  # Boolean. Enable automatic changing the correct port.
      card_port_product_name_regex: 'Valve VR Radio & HMD Mic'  # Regex. Used to find the card and port on that card which the vr headset is co>
      # Use `pactl list cards | grep 'device.product.name'` while SteamVR is running to find the name of your vr headset.
      card_rescan_pause_time: 10  # Float. Number of seconds to wait between suspending and resuming a sink to rescan the ports of its card.
    
    daemon:
      watch_process_name: 'vrcompositor'  # String. Name of the process which indicated SteamVR is running.
      wait_after_quit: 60  # Float. Number of seconds to wait after SteamVR exits until Base Stations are turned off (and audio is switched). U>
    
    
    opened by Firestorm7893 8
  • Base stations turning on and off repeating 5 times (attempt_count_set count)

    Base stations turning on and off repeating 5 times (attempt_count_set count)

    Was just going to look into something in VR today and have been using steamvr_utils for some time now without problems. click vr icon in steam where the master base station spins up (at a louder / faster mirror spin rate than normal) then stops, then repeats the same count as is stated in the config for attempt_count_set.

    I tried switching from the current latest linux steamvr version to the linux beta version, same problem.

    waited for the base station to spin down (fail out), then started steamvr without starting the base stations, then unplugged and replugged the power for the master base station (station b), it spins up (at a normal mirror spin rate) and triggers station c like it normaly would.

    Now, this started happening only today so I suspect it might be something that changed with some f'ing update from ubuntu that messed with it.

    Ubuntu 20.04.3 Kernel 5.17.1 generic (Mainline) Mesa 22.1.0-devel

    Any suggestions to what could be causing this ?

    opened by panmarco83 7
  • Feature request: External commands for basestation management

    Feature request: External commands for basestation management

    My PC that I use for VR doesn't have any bluetooth capabilities but I have lots of running raspberry pis which I could use for this.

    Would it be possible to have a configuration for an external command to execute instead of the regular bluetooth to switch the basestation on/off? Then I could set up a copy of this on a rpi and execute the command over ssh.

    I understand if it's way out of scope for this project.

    opened by buxxi 5
  • [question] BS power toggling as a user (no sudo)

    [question] BS power toggling as a user (no sudo)

    Hello again, this isn't a direct problem and more of a question. I recently got a Vive Pro since I was suspecting my old Vive was starting to fail (It wasn't, but that's fine). Now, with the new BS V2(?) they connect and operate in a different way then the V1(?) BS's. They require that I run this utility as root (sudo) for it to work because of BLE.

    I'm wondering if you have any method that would allow the user to be able to toggle the BS's power on and off without needing root (sudo) ?

    It's not an actual problem, but more a hindrance to the automation of this script being run on SteamVR startup/shutdown since I now must run the script as root with on/off to power the BS's on/off.

    opened by panmarco83 4
  • The Daemon is intefering with OBS Audio Device Capture

    The Daemon is intefering with OBS Audio Device Capture

    When using OBS the Daemon will constantly switch my input devices back to the Radio Mic. We need a way to disable this portion of the switching as I cannot use steamvr_utils while streaming now. Even newly added capture sources have this issue. Specifically it will automatically set my desktop capture to the Radio Mic instead of the HDMI output and changing it in pavucontrol will see it change right back the next time the daemon makes it's check

    opened by HadetTheUndying 3
  • Valve Index sink not found

    Valve Index sink not found

    I've just recently switched from Win10 to Manjaro and am encountering some major audio issues for the VR (everything worked fine back in Win10). I tried setting the vr_sink_regex in the config.yaml to .displayport. since the hmd is connected via DisplayPort to my computer. But even after trying this, the device wasn't found. My hmd is connected properly as I can play with it in vr - just without any sound. The output from the hmd is also not listed within the OS sound settings, however the input mic is shown there.

    Output from using 'pactl list cards'

    [blue@Blue-Desktop scripts]$ python steamvr_utils.py on
    2021-03-19 19:51:31 [DEBUG]: dry_run: False
    2021-03-19 19:51:31 [DEBUG]: 'pactl list short sinks':
    0       alsa_output.pci-0000_28_00.1.hdmi-stereo        module-alsa-card.c      s16le 2ch 44100Hz       RUNNING
    1       alsa_output.pci-0000_2a_00.4.analog-stereo      module-alsa-card.c      s16le 2ch 44100Hz       RUNNING
    2       combined        module-combine-sink.c   s16le 2ch 44100Hz       RUNNING
    
    2021-03-19 19:51:31 [DEBUG]: normal sink: alsa_output.pci-0000_2a_00.4.analog-stereo
    2021-03-19 19:51:31 [DEBUG]: vr sink: alsa_output.pci-0000_28_00.1.hdmi-stereo
    2021-03-19 19:51:31 [INFO ]: SteamvrUtils turning on:
    2021-03-19 19:51:31 [INFO ]: Scanning for Base Stations:
    2021-03-19 19:51:31 [INFO ]: Found Base Station LHB-EBEFA780 at address f0:34:ed:b1:8a:dc
    2021-03-19 19:51:31 [INFO ]: Found Base Station LHB-8437B878 at address c4:dd:da:8f:dd:d1
    2021-03-19 19:51:33 [INFO ]: Changing power state of Base Stations:
    2021-03-19 19:51:33 [INFO ]: Connecting to f0:34:ed:b1:8a:dc
    2021-03-19 19:51:33 [INFO ]: Turning on
    2021-03-19 19:51:33 [INFO ]: Connecting to c4:dd:da:8f:dd:d1
    2021-03-19 19:51:33 [INFO ]: Turning on
    2021-03-19 19:51:33 [INFO ]: Success of attempt 1 of 5
    2021-03-19 19:51:34 [INFO ]: Connecting to f0:34:ed:b1:8a:dc
    2021-03-19 19:51:34 [INFO ]: Turning on
    2021-03-19 19:51:34 [INFO ]: Connecting to c4:dd:da:8f:dd:d1
    2021-03-19 19:51:34 [INFO ]: Turning on
    2021-03-19 19:51:34 [INFO ]: Success of attempt 2 of 5
    2021-03-19 19:51:34 [INFO ]: Connecting to f0:34:ed:b1:8a:dc
    2021-03-19 19:51:34 [INFO ]: Turning on
    2021-03-19 19:51:34 [INFO ]: Connecting to c4:dd:da:8f:dd:d1
    2021-03-19 19:51:34 [INFO ]: Turning on
    2021-03-19 19:51:34 [INFO ]: Success of attempt 3 of 5
    2021-03-19 19:51:35 [INFO ]: Connecting to f0:34:ed:b1:8a:dc
    2021-03-19 19:51:35 [INFO ]: Turning on
    2021-03-19 19:51:35 [INFO ]: Connecting to c4:dd:da:8f:dd:d1
    2021-03-19 19:51:35 [INFO ]: Turning on
    2021-03-19 19:51:35 [INFO ]: Success of attempt 4 of 5
    2021-03-19 19:51:35 [INFO ]: Connecting to f0:34:ed:b1:8a:dc
    2021-03-19 19:51:36 [INFO ]: Turning on
    2021-03-19 19:51:36 [INFO ]: Connecting to c4:dd:da:8f:dd:d1
    2021-03-19 19:51:36 [INFO ]: Turning on
    2021-03-19 19:51:36 [INFO ]: Success of attempt 5 of 5
    2021-03-19 19:51:36 [WARNI]: Failed to find any port on any card matching "(Index HMD)|(VIVE)". Name of the product at every port:
    alsa_card.pci-0000_28_00.1
        -
    alsa_card.usb-Valve_Corporation_Valve_VR_Radio___HMD_Mic_C57E1219BC-LYM-01
        -
    alsa_card.usb-MICE_MICROPHONE_USB_MICROPHONE_201308-00
        -
    alsa_card.pci-0000_2a_00.4
        -
        -
        -
        -
        -
        -
    
    2021-03-19 19:51:36 [DEBUG]: set_suspend_state pactl suspend-sink alsa_output.pci-0000_28_00.1.hdmi-stereo true
    2021-03-19 19:51:46 [DEBUG]: set_suspend_state pactl suspend-sink alsa_output.pci-0000_28_00.1.hdmi-stereo false
    2021-03-19 19:51:46 [DEBUG]: 'pactl list short sink-inputs':
    212     2       11      protocol-native.c       s16le 2ch 44100Hz
    214     1       259     protocol-native.c       float32le 2ch 44100Hz
    217     1       264     protocol-native.c       float32le 2ch 44100Hz
    232     0       -       module-combine-sink.c   s16le 2ch 44100Hz
    233     1       -       module-combine-sink.c   s16le 2ch 44100Hz
    
    2021-03-19 19:51:46 [ERROR]: 'pactl move-sink-input 217 alsa_output.pci-0000_28_00.1.hdmi-stereo' (client_name: java) failed (count: 1), stderr:
    Failure: Invalid argument
    
    2021-03-19 19:51:46 [DEBUG]: last_pactl_sinks:
    0       alsa_output.pci-0000_28_00.1.hdmi-stereo        module-alsa-card.c      s16le 2ch 44100Hz       RUNNING
    1       alsa_output.pci-0000_2a_00.4.analog-stereo      module-alsa-card.c      s16le 2ch 44100Hz       RUNNING
    2       combined        module-combine-sink.c   s16le 2ch 44100Hz       RUNNING
    
    2021-03-19 19:51:46 [DEBUG]: last_pactl_sink_inputs:
    212     2       11      protocol-native.c       s16le 2ch 44100Hz
    214     1       259     protocol-native.c       float32le 2ch 44100Hz
    217     1       264     protocol-native.c       float32le 2ch 44100Hz
    232     0       -       module-combine-sink.c   s16le 2ch 44100Hz
    233     1       -       module-combine-sink.c   s16le 2ch 44100Hz
    
    2021-03-19 19:51:46 [DEBUG]: last_pactl_clients:
    None
    2021-03-19 19:51:46 [ERROR]: 'pactl move-sink-input 233 alsa_output.pci-0000_28_00.1.hdmi-stereo' (client_name: None) failed (count: 1), stderr:
    Failure: Invalid argument
    
    2021-03-19 19:51:46 [DEBUG]: last_pactl_sinks:
    0       alsa_output.pci-0000_28_00.1.hdmi-stereo        module-alsa-card.c      s16le 2ch 44100Hz       RUNNING
    1       alsa_output.pci-0000_2a_00.4.analog-stereo      module-alsa-card.c      s16le 2ch 44100Hz       RUNNING
    2       combined        module-combine-sink.c   s16le 2ch 44100Hz       RUNNING
    
    2021-03-19 19:51:46 [DEBUG]: last_pactl_sink_inputs:
    212     2       11      protocol-native.c       s16le 2ch 44100Hz
    214     1       259     protocol-native.c       float32le 2ch 44100Hz
    217     1       264     protocol-native.c       float32le 2ch 44100Hz
    232     0       -       module-combine-sink.c   s16le 2ch 44100Hz
    233     1       -       module-combine-sink.c   s16le 2ch 44100Hz
    
    2021-03-19 19:51:46 [DEBUG]: last_pactl_clients:
    None
    [blue@Blue-Desktop scripts]$ pactl list cards          
    Card #0
            Name: alsa_card.pci-0000_28_00.1
            Driver: module-alsa-card.c
            Owner Module: 6
            Properties:
                    alsa.card = "0"
                    alsa.card_name = "HDA ATI HDMI"
                    alsa.long_card_name = "HDA ATI HDMI at 0xf7a40000 irq 74"
                    alsa.driver_name = "snd_hda_intel"
                    device.bus_path = "pci-0000:28:00.1"
                    sysfs.path = "/devices/pci0000:00/0000:00:03.2/0000:28:00.1/sound/card0"
                    device.bus = "pci"
                    device.vendor.id = "1002"
                    device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
                    device.product.id = "aa68"
                    device.product.name = "Cedar HDMI Audio [Radeon HD 5400/6300/7300 Series]"
                    device.string = "0"
                    device.description = "Cedar HDMI Audio [Radeon HD 5400/6300/7300 Series]"
                    module-udev-detect.discovered = "1"
                    device.icon_name = "audio-card-pci"
            Profiles:
                    output:hdmi-stereo: Digital Stereo (HDMI) Output (sinks: 1, sources: 0, priority: 5900, available: yes)
                    off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
            Active Profile: output:hdmi-stereo
            Ports:
                    hdmi-output-0: HDMI / DisplayPort (type: HDMI, priority: 5900, latency offset: 0 usec, available)
                            Properties:
                                    device.icon_name = "video-display"
                            Part of profile(s): output:hdmi-stereo
    
    Card #1
            Name: alsa_card.usb-Valve_Corporation_Valve_VR_Radio___HMD_Mic_C57E1219BC-LYM-01
            Driver: module-alsa-card.c
            Owner Module: 7
            Properties:
                    alsa.card = "3"
                    alsa.card_name = "Valve VR Radio & HMD Mic"
                    alsa.long_card_name = "Valve Corporation Valve VR Radio & HMD Mic at usb-0000:2a:00.3-1.3.3, full spee"
                    alsa.driver_name = "snd_usb_audio"
                    device.bus_path = "pci-0000:2a:00.3-usb-0:1.3.3:1.1"
                    sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:2a:00.3/usb7/7-1/7-1.3/7-1.3.3/7-1.3.3:1.1/sound/card3"
                    udev.id = "usb-Valve_Corporation_Valve_VR_Radio___HMD_Mic_C57E1219BC-LYM-01"
                    device.bus = "usb"
                    device.vendor.id = "28de"
                    device.vendor.name = "Valve Software"
                    device.product.id = "2102"
                    device.product.name = "Valve VR Radio & HMD Mic"
                    device.serial = "Valve_Corporation_Valve_VR_Radio___HMD_Mic_C57E1219BC-LYM"
                    device.string = "3"
                    device.description = "Valve VR Radio & HMD Mic"
                    module-udev-detect.discovered = "1"
                    device.icon_name = "audio-card-usb"
            Profiles:
                    input:mono-fallback: Mono Input (sinks: 0, sources: 1, priority: 1, available: yes)
                    input:multichannel-input: Multichannel Input (sinks: 0, sources: 1, priority: 1, available: yes)
                    off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
            Active Profile: input:multichannel-input
            Ports:
                    analog-input: Analog Input (type: Analog, priority: 10000, latency offset: 0 usec, availability unknown)
                            Part of profile(s): input:mono-fallback
    
    Card #2
            Name: alsa_card.usb-MICE_MICROPHONE_USB_MICROPHONE_201308-00
            Driver: module-alsa-card.c
            Owner Module: 8
            Properties:
                    alsa.card = "2"
                    alsa.card_name = "USB MICROPHONE"
                    alsa.long_card_name = "MICE MICROPHONE USB MICROPHONE at usb-0000:2a:00.3-2, full speed"
                    alsa.driver_name = "snd_usb_audio"
                    device.bus_path = "pci-0000:2a:00.3-usb-0:2:1.0"
                    sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:2a:00.3/usb7/7-2/7-2:1.0/sound/card2"
                    udev.id = "usb-MICE_MICROPHONE_USB_MICROPHONE_201308-00"
                    device.bus = "usb"
                    device.vendor.id = "0d8c"
                    device.vendor.name = "C-Media Electronics, Inc."
                    device.product.id = "0005"
                    device.product.name = "Blue Snowball"
                    device.serial = "MICE_MICROPHONE_USB_MICROPHONE_201308"
                    device.string = "2"
                    device.description = "Blue Snowball"
                    module-udev-detect.discovered = "1"
                    device.icon_name = "audio-card-usb"
            Profiles:
                    input:mono-fallback: Mono Input (sinks: 0, sources: 1, priority: 1, available: yes)
                    input:multichannel-input: Multichannel Input (sinks: 0, sources: 1, priority: 1, available: yes)
                    off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
            Active Profile: input:mono-fallback
            Ports:
                    analog-input-mic: Microphone (type: Mic, priority: 8700, latency offset: 0 usec, availability unknown)
                            Properties:
                                    device.icon_name = "audio-input-microphone"
                            Part of profile(s): input:mono-fallback
    
    Card #3
            Name: alsa_card.pci-0000_2a_00.4
            Driver: module-alsa-card.c
            Owner Module: 9
            Properties:
                    alsa.card = "1"
                    alsa.card_name = "HD-Audio Generic"
                    alsa.long_card_name = "HD-Audio Generic at 0xf7400000 irq 91"
                    alsa.driver_name = "snd_hda_intel"
                    device.bus_path = "pci-0000:2a:00.4"
                    sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:2a:00.4/sound/card1"
                    device.bus = "pci"
                    device.vendor.id = "1022"
                    device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
                    device.product.id = "1487"
                    device.product.name = "Starship/Matisse HD Audio Controller"
                    device.string = "1"
                    device.description = "Starship/Matisse HD Audio Controller"
                    module-udev-detect.discovered = "1"
                    device.icon_name = "audio-card-pci"
            Profiles:
                    input:analog-stereo: Analog Stereo Input (sinks: 0, sources: 1, priority: 65, available: no)
                    output:analog-stereo: Analog Stereo Output (sinks: 1, sources: 0, priority: 6500, available: yes)
                    output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (sinks: 1, sources: 1, priority: 6565, available: no)
                    output:analog-surround-21: Analog Surround 2.1 Output (sinks: 1, sources: 0, priority: 1300, available: no)
                    output:analog-surround-21+input:analog-stereo: Analog Surround 2.1 Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 1365, available: no)
                    output:analog-surround-40: Analog Surround 4.0 Output (sinks: 1, sources: 0, priority: 1200, available: no)
                    output:analog-surround-40+input:analog-stereo: Analog Surround 4.0 Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 1265, available: no)
                    output:analog-surround-41: Analog Surround 4.1 Output (sinks: 1, sources: 0, priority: 1300, available: no)
                    output:analog-surround-41+input:analog-stereo: Analog Surround 4.1 Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 1365, available: no)
                    output:analog-surround-50: Analog Surround 5.0 Output (sinks: 1, sources: 0, priority: 1200, available: no)
                    output:analog-surround-50+input:analog-stereo: Analog Surround 5.0 Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 1265, available: no)
                    output:analog-surround-51: Analog Surround 5.1 Output (sinks: 1, sources: 0, priority: 1300, available: no)
                    output:analog-surround-51+input:analog-stereo: Analog Surround 5.1 Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 1365, available: no)
                    output:iec958-stereo: Digital Stereo (IEC958) Output (sinks: 1, sources: 0, priority: 5500, available: yes)
                    output:iec958-stereo+input:analog-stereo: Digital Stereo (IEC958) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5565, available: no)
                    off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
            Active Profile: output:analog-stereo
            Ports:
                    analog-input-front-mic: Front Microphone (type: Mic, priority: 8500, latency offset: 0 usec, not available)
                            Properties:
                                    device.icon_name = "audio-input-microphone"
                            Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:analog-surround-21+input:analog-stereo, output:analog-surround-40+input:analog-stereo, output:analog-surround-41+input:analog-stereo, output:analog-surround-50+input:analog-stereo, output:analog-surround-51+input:analog-stereo, output:iec958-stereo+input:analog-stereo
                    analog-input-rear-mic: Rear Microphone (type: Mic, priority: 8200, latency offset: 0 usec, not available)
                            Properties:
                                    device.icon_name = "audio-input-microphone"
                            Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:analog-surround-21+input:analog-stereo, output:analog-surround-40+input:analog-stereo, output:analog-surround-41+input:analog-stereo, output:analog-surround-50+input:analog-stereo, output:analog-surround-51+input:analog-stereo, output:iec958-stereo+input:analog-stereo
                    analog-input-linein: Line In (type: Line, priority: 8100, latency offset: 0 usec, not available)
                            Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:analog-surround-21+input:analog-stereo, output:analog-surround-40+input:analog-stereo, output:analog-surround-41+input:analog-stereo, output:analog-surround-50+input:analog-stereo, output:analog-surround-51+input:analog-stereo, output:iec958-stereo+input:analog-stereo
                    analog-output-lineout: Line Out (type: Line, priority: 9000, latency offset: 0 usec, not available)
                            Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo, output:analog-surround-21, output:analog-surround-21+input:analog-stereo, output:analog-surround-40, output:analog-surround-40+input:analog-stereo, output:analog-surround-41, output:analog-surround-41+input:analog-stereo, output:analog-surround-50, output:analog-surround-50+input:analog-stereo, output:analog-surround-51, output:analog-surround-51+input:analog-stereo
                    analog-output-headphones: Headphones (type: Headphones, priority: 9900, latency offset: 0 usec, available)
                            Properties:
                                    device.icon_name = "audio-headphones"
                            Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo
                    iec958-stereo-output: Digital Output (S/PDIF) (type: SPDIF, priority: 0, latency offset: 0 usec, availability unknown)
                            Part of profile(s): output:iec958-stereo, output:iec958-stereo+input:analog-stereo
    

    Thanks for any help. I'm currently reaching my limits on how to fix the issue...

    stale 
    opened by RealBlueVR 3
  • Sink Audio Patch

    Sink Audio Patch

    I'll start by saying thank you so much for sharing this awesome project.

    I recently acquired a Valve Index and was thrilled to find useful tools like this.

    The bluetooth base station functionality worked perfectly for me.

    While enabling audio works, I had some errors running move-sink-input, and it silently fails to restore audio when running off or the daemon exits.

    I'm an arch linux user with pactl version 14.2, and whatever modules it came with barring suspend-on-idle module because it regularly skips audio at the start of playback due to activation latency.

    In my case I only ever have a single sink.

    Changing the port via set-card-profile appears to be what works for me, which I was testing from this script before I found your tool: https://gist.github.com/frostworx/2a1a84ea8098ddc207cc9f54793f5446

    Oddly, when the profile changes the sink name also changes to match, and the default sink too (though unreliably if I have other devices connected, which I'm guessing is why empty string for the normal regex is not recommended).

    Additionally, my sink-inputs appear to automatically switch to the new sink, which combined with the sink name changing makes move-sink-input unnecessary.

    To avoid breaking existing functionality I added a new config that supports finding the normal profile by device name the same way it finds the Index HMD, and I added a profile change to switch_to_normal.

    To avoid the errors that occur due to the sink name change I added a pre-flight-check to set_sink_for_all_sink_inputs, which makes sure the sink name still exists before attempting to run move-sink-input.

    Please let me know if these changes are usable.

    I may try adding a similar audio toggle for microphones tomorrow.

    opened by cdelorme 3
Owner
null
Photini - A free, easy to use, digital photograph metadata (Exif, IPTC, XMP) editing application for Linux, Windows and MacOS.

A free, easy to use, digital photograph metadata (Exif, IPTC, XMP) editing application for Linux, Windows and MacOS. "Metadata" is said to mea

Jim Easterbrook 120 Dec 20, 2022
A quick and dirty QT Statusbar implementation for grabbing GIFs from Tenor, since there is no offical or unofficial one I found. This was intended for use under Linux, however it was also functional enough on MacOS.

Statusbar-TenorGIF App for Linux A quick and dirty QT Statusbar implementation for grabbing GIFs from Tenor, since there is no offical one and I didnt

Luigi DaVinci 1 Nov 1, 2021
LinuxHelper - A collection of utilities for non-technical Linux users accessible via a GUI

Linux Helper A collection of utilities for non-technical Linux users accessible via a GUI This app is still in very early development, expect bugs and

Seth 7 Oct 3, 2022
Automation for grabbing keys from a Linux host. Useful during red team exercises to quickly help assess what access to a Linux host can lead to.

keygrabber Automation for grabbing keys from a Linux host. This can be helpful during red team exercises when you gain access to a Linux host and want

Cedric Owens 14 Sep 27, 2022
LSO, also known as Linux Swap Operator, is a software with both GUI and terminal versions that you can manage the Swap area for Linux operating systems.

LSO - Linux Swap Operator Türkçe - LSO Nedir? LSO, diğer adıyla Linux Swap Operator Linux işletim sistemleri için Swap alanını yönetebileceğiniz hem G

Eren İnce 4 Feb 9, 2022
List of Linux Tools I put on almost every linux / Debian host

Linux-Tools List of Linux Tools I put on almost every Linux / Debian host Installed: geany --> GUI editor/ notepad++ like chkservice --> TUI Linux ser

Stew Alexander 20 Jan 2, 2023
Organize seu linux - organize your linux

OrganizeLinux Organize seu linux - organize your linux Organize seu linux Uma forma rápida de separar arquivos dispersos em pastas. formatos a serem c

Marcus Vinícius Ribeiro Andrade 1 Nov 30, 2021
Morpy Bot Linux - Morpy Bot Linux With Python

Morpy_Bot_Linux Guide to using the robot : ?? Lsmod => to identify admins and st

null 2 Jan 20, 2022
The Linux defender anti-virus software ported to work on CentOS Linux.

By: Seanpm2001, Et; Al. Top README.md Read this article in a different language Sorted by: A-Z Sorting options unavailable ( af Afrikaans Afrikaans |

Sean P. Myrick V19.1.7.2 2 Sep 12, 2022
Python library and shell utilities to monitor filesystem events.

Watchdog Python API and shell utilities to monitor file system events. Works on 3.6+. If you want to use Python 2.6, you should stick with watchdog <

Yesudeep Mangalapilly 5.6k Jan 4, 2023
Cython implementation of Toolz: High performance functional utilities

CyToolz Cython implementation of the toolz package, which provides high performance utility functions for iterables, functions, and dictionaries. tool

null 894 Jan 2, 2023
Python bindings and utilities for GeoJSON

geojson This Python library contains: Functions for encoding and decoding GeoJSON formatted data Classes for all GeoJSON Objects An implementation of

Jazzband 765 Jan 6, 2023
simple artificial intelligence utilities

Simple AI Project home: http://github.com/simpleai-team/simpleai This lib implements many of the artificial intelligence algorithms described on the b

null 921 Dec 8, 2022
Basic Utilities for PyTorch Natural Language Processing (NLP)

Basic Utilities for PyTorch Natural Language Processing (NLP) PyTorch-NLP, or torchnlp for short, is a library of basic utilities for PyTorch NLP. tor

Michael Petrochuk 2.1k Jan 1, 2023
A suite of utilities for converting to and working with CSV, the king of tabular file formats.

csvkit is a suite of command-line tools for converting to and working with CSV, the king of tabular file formats. It is inspired by pdftk, GDAL and th

wireservice 5.2k Dec 31, 2022
ASGI specification and utilities

asgiref ASGI is a standard for Python asynchronous web apps and servers to communicate with each other, and positioned as an asynchronous successor to

Django 1.1k Dec 29, 2022
google-resumable-media Apache-2google-resumable-media (🥉28 · ⭐ 27) - Utilities for Google Media Downloads and Resumable.. Apache-2

google-resumable-media Utilities for Google Media Downloads and Resumable Uploads See the docs for examples and usage. Experimental asyncio Support Wh

Google APIs 36 Nov 22, 2022
Flask-Bcrypt is a Flask extension that provides bcrypt hashing utilities for your application.

Flask-Bcrypt Flask-Bcrypt is a Flask extension that provides bcrypt hashing utilities for your application. Due to the recent increased prevelance of

Max Countryman 310 Dec 14, 2022
Opinionated set of utilities on top of FastAPI

FastAPI Contrib Opinionated set of utilities on top of FastAPI Free software: MIT license Documentation: https://fastapi-contrib.readthedocs.io. Featu

identix.one 543 Jan 5, 2023