Check out our Monthly Survey Page to see what our users are running.
HOWTO: Turning on and switching off lighthouses with a simple script
Page: «2/3»
  Go to:
scaine Oct 10, 2020
Hi Blu3ye. Do you see any output at all? You should see the script finding your lighthouse addresses, then connecting to each in turn:

[scaine@Groovy Misc]$ python vr.py on
Found LightHouse LHB-8EC485F4: address = eb:d5:71:cb:29:0e
Found LightHouse LHB-A3646DA1: address = e4:b7:92:e0:d4:50
Connecting to eb:d5:71:cb:29:0e
Connecting to e4:b7:92:e0:d4:50


If you don't get anything, at all, I can't imagine what the problem might be...

Last edited by scaine on 10 October 2020 at 8:42 am UTC
jens Oct 10, 2020
  • Supporter
Quoting: scaineI did try
python /path/to/vr.py ; %command% ; python /path/to/vr.py
but it doesn't work, even with a wait in there, the whole line is executed immediately, because it appears that Steam is forking its games off as a separate process, without waiting for their exit codes.

I haven't tested this, but you could try this:
python /path/to/vr.py && %command% && python /path/to/vr.py
scaine Oct 10, 2020
Quoting: jens
Quoting: scaineI did try
python /path/to/vr.py ; %command% ; python /path/to/vr.py
but it doesn't work, even with a wait in there, the whole line is executed immediately, because it appears that Steam is forking its games off as a separate process, without waiting for their exit codes.

I haven't tested this, but you could try this:
python /path/to/vr.py && %command% && python /path/to/vr.py

Thanks jens. I'd already tried that, and tried using the `wait` command. But thanks to the way Steam forks off the new game, the whole command is run immediately. It's unfortunate, because this would have been pretty slick otherwise.
jens Oct 10, 2020
  • Supporter
Quoting: scaine
Quoting: jens
Quoting: scaineI did try
python /path/to/vr.py ; %command% ; python /path/to/vr.py
but it doesn't work, even with a wait in there, the whole line is executed immediately, because it appears that Steam is forking its games off as a separate process, without waiting for their exit codes.

I haven't tested this, but you could try this:
python /path/to/vr.py && %command% && python /path/to/vr.py

Thanks jens. I'd already tried that, and tried using the `wait` command. But thanks to the way Steam forks off the new game, the whole command is run immediately. It's unfortunate, because this would have been pretty slick otherwise.

mmh, strange, I needed to do something similar with Ferals Tom Raider and ended up with:
nvidia-settings -a AllowFlipping=0 && gamemoderun %command% && nvidia-settings -a AllowFlipping=1
I'm pretty certain that it had worked here. Though I guess you are correct that it has to do with forking a new process, I guess Tomb Raider does not do this.

Did you edited the launch option for a certain game or for SteamVR itself? May be trying one or the other would make a difference.

PS: You could also wrap steam completely into this. I haven't looked, but I guess steam knows command line arguments to start an application (SteamVR) on launch, which would make this somewhat acceptable imho.

Last edited by jens on 10 October 2020 at 2:17 pm UTC
Blu3ye Oct 10, 2020
Quoting: scaineHi Blu3ye. Do you see any output at all? You should see the script finding your lighthouse addresses, then connecting to each in turn:

[scaine@Groovy Misc]$ python vr.py on
Found LightHouse LHB-8EC485F4: address = eb:d5:71:cb:29:0e
Found LightHouse LHB-A3646DA1: address = e4:b7:92:e0:d4:50
Connecting to eb:d5:71:cb:29:0e
Connecting to e4:b7:92:e0:d4:50


If you don't get anything, at all, I can't imagine what the problem might be...
No. I don't get any output from the script. It takes appr. 2,5 seconds and while it runs I can see more devices beeing shown in the bluetooth system window. I guess that are just other devices appearing while scanning. I also did connect the base stations just right now but that did not help, either.


Wait... I got one output after repeating the script several times:
Traceback (most recent call last):
  File "/home/marco/vr-lighthouse.py", line 30, in <module>
    scanner.scan(2)
  File "/home/marco/.local/lib/python3.8/site-packages/bluepy/btle.py", line 853, in scan
    self.process(timeout)
  File "/home/marco/.local/lib/python3.8/site-packages/bluepy/btle.py", line 840, in process
    isNewData = dev._update(resp)
  File "/home/marco/.local/lib/python3.8/site-packages/bluepy/btle.py", line 696, in _update
    raise BTLEInternalError("Address type changed during scan, for address %s" % self.addr)
bluepy.btle.BTLEInternalError: Address type changed during scan, for address 40:4e:36:a5:37:a0


I also do have yellow warnings inside SteamVR but I guess that's just "normal" on Linux?!
scaine Oct 10, 2020
Base station power management? That's like if you're running SteamVR via Proton, or on Windows. On Linux, you just get "Bluetooth not available", hence the entire need for this solution/script.

What distro are you on? Are you on the Steam Beta? Are you on the SteamVR Beta? Can you post a screenshot of running the script in your terminal?
Blu3ye Oct 10, 2020
I'm running on Manjaro KDE.
Just installed Steam through Pamac. Installed packages are: steam-manjaro 1.0.0.66-1 and steam-native 1.0.0.62-3.
I do have Proton 5.0.3 globally enabled on the Steam settings but I just Start Steam from Manjaro menu. No betas.


Here's a gif showing it.
scaine Oct 10, 2020
...but there's always output?? I have no idea what's going there. Perhaps try opting into the Steam beta (I am), but there's no need for the SteamVR beta. How do you get to the "Base Station Power Management" screen? Are you just right-clicking on a base station? Or is there another option I'm missing?

I have no idea how to help you here, I'm afraid! Other than KDE, you're running what I was running when I got this working for the first time!
Blu3ye Oct 10, 2020
It´s SteamVR menu button -> Devices -> Base station settings -> Energy management
Like normal for me as it´s the same on Windows. I would not be suprised you didn´t know of this! Many don´t like I read here and there online ^^

What do you mean by "always output"?
When I ran the script, it was always like on the gif. No output at all.
After giving it up and restarting my PC this evening I do get the above posted error every time now. And the lh stations aren´t anymore on the KDE bluetooth manager nor is there any bluetooth device listed anymore.

Restarting on Windows I do have everything working fine though the bluetooth settings inside SteamVR did show some error now. Power reset of Vive fixed this. Have that yellow warning signs on Windows now, too. But base stations power up and down without issues.
jens Oct 11, 2020
  • Supporter
@scaine, I came across this posting for turning the base station on/off with the launch options:
https://github.com/ValveSoftware/SteamVR-for-Linux/issues/207#issuecomment-691535293
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone with no article paywalls. We also don't have tons of adverts, there's also no tracking and we respect your privacy. Just good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register

Or login with...
Sign in with Steam Sign in with Google
Social logins require cookies to stay logged in.