Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base station power management - any workaround? #320

Open
vittorioromeo opened this issue Mar 29, 2020 · 23 comments
Open

Base station power management - any workaround? #320

vittorioromeo opened this issue Mar 29, 2020 · 23 comments
Labels

Comments

@vittorioromeo
Copy link

Follow up from #319. The README rightfully says:

Power management of base stations is not currently implemented

Since I use base station power management on my Windows partition, if I want to use SteamVR on my Linux partition I have to:

  • Boot into Windows
  • Disable power management
  • Ensure the base stations are running
  • Boot into Linux

When I am done SteamVR on Linux and I want to turn off the base stations, I have to:

  • Boot into Windows
  • Enable power management
  • Ensure the base stations are turned off

As you can imagine, this process is very tedious, especially if I am developing something which needs to be tested constantly on both OSs, and if I want to minimize the base station noise to be respectful to other people sharing my living space.

Is there any workaround to enable/disable the base stations directly from Linux? I have tried using bluetoothctl as described in #319, but the base stations always failed to pair with error Failed to pair: org.bluez.Error.AuthenticationTimeout..

Has anybody figured out a way to manually control the base stations' power from the command line?

@DerRidda
Copy link

The base last base stations will go into power save mode as soon as the second to last base station turns off.

So back when I was still on the HTC Vive with two base stations I always unplugged the one closest to me. On Index where I run four base stations that's not nearly as convenient anymore.

So as long as you run only 2 base stations, unplug the one closest to you or get a power strip with a switch on it and hit that.

It's not pretty or very convenient but the best reliable way there is.

@Zamundaaa
Copy link

There is a project that implements v1 base stations power management: https://github.com/risa2000/lhctrl
I've never used it myself (since I now have the v2 base stations) so I can't say if it actually works though.

@mmcnutt
Copy link

mmcnutt commented Mar 30, 2020

I have my lighthouses connected to a tplink hs100 smart plug - I either power them back up with a shell script or from the app on my phone

@ghost
Copy link

ghost commented Apr 2, 2020

There is a project that implements v1 base stations power management: https://github.com/risa2000/lhctrl
I've never used it myself (since I now have the v2 base stations) so I can't say if it actually works though.

Thanks for this! I'm running the v1 stations, and it works just fine. You'll want to grab bluepy, and run the script like so:
python3 lhctrl.py -b [ID] --lh_b_mac [MAC]

I usually also run it with -v.
I couldn't properly work out if the script wanted the lighthouse physically designated as B on the device, or the one in mode B. Probably the latter, but I just made those match up, running lighthouse B in mode B.

The ID is printed on the lighthouse, and I used blueman to grab the mac address. To figure out which lighthouse is which, I unplugged one, paired to the other in blueman, then marked down which it was by setting a custom name in the gui.

For clarity on what that script does, because it took me a bit of processing: When you run it, it's sending keepalive pings every so often (20 seconds by default). When the script stops, it shuts the stations off. So run the script while you're using them, stop it when you're done.

@TysonChickens
Copy link

Thanks to brunfunstudios and prefiks for his script for turning on/off the base stations automatically when SteamVR is launched or closed. This is decent workaround and one step closer for a flawless VR experience on Linux.

@Patola
Copy link

Patola commented Dec 11, 2020

Hi, these solutions work as long as there are only 2 base stations. However I bought a new V2 base station and now SteamVR says there are multiple devices using channel 1, so apparently for the new base station to work properly on SteamVR I need to configure it to channel 3 or whatever. BUT as SteamVR for Linux currently does not even have a bluetooth section, what should I do? Maybe I can use python3's ble code to set something on the station? I am not well versed in the BLE protocol. I do not have windows to dual-boot and set the channel of the third base. I also tried starting SteamVR with the base connected via an USB cable, no dice.

@TiagoTiago
Copy link

I think the 2.0 have a pin button somewhere (probably in the back) to change channels

@TheDrawingCoder-Gamer
Copy link

necromancing this; I have no idea how to find my mac address... even switching to my windows partition I have no idea; it's almost impossible to find the correct device; the Lighthouse FPGA RX device doesn't have a mac address so it isn't very helpful

@TheDrawingCoder-Gamer
Copy link

oh i did find them; silly me; the other issue I have is directly related to lhctrl so I will make an issue there

@TheDrawingCoder-Gamer
Copy link

No I still don't fully understand... How did you find it? I have my HTC Vive plugged in but it is failing to connect

CertainLach added a commit to CertainLach/VivePro2-Linux-Driver that referenced this issue Sep 7, 2022
I'm not sure why power management is still not supported on linux,
it was pretty easy to implement, and I'm not sure if I missing something
besides correct status display inside of steamvr GUI

Anyway, now this feature just works, you should have any bluetooth
adapter present in system (Builtin vive is not always detected for me),
and then configure power management using standard GUI

Fixes: ValveSoftware/SteamVR-for-Linux#320
Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>
@yaomtc
Copy link

yaomtc commented Jun 13, 2023

SteamVR finally has more Bluetooth functionality. Firmware update isn't working for me yet, but power management does.

@caseif
Copy link

caseif commented Aug 18, 2023

Can confirm power management is working on my system as well. If the feature has now been implemented, can this issue be closed?

@digitalcircuit
Copy link

digitalcircuit commented Aug 29, 2023

Alas, even with the SteamVR beta 1.27.3, Bluetooth power management still seems to be broken on my Kubuntu 22.04 system with an HTC Vive and Base Stations 1.0. Refreshing (or rescanning) seemingly does nothing.

Screenshot of the SteamVR "Base Station Power Management" window showing a connection failure to two 1.0 base stations

The lighthouses are on the latest firmware version, too - version 436.

Tue Aug 29 2023 19:29:57.072981 [Info] - [Bluetooth Controller] BaseStation Controller Init.
Tue Aug 29 2023 19:29:57.072998 [Info] - [Bluetooth Controller] Radio features: 0x00000001
Tue Aug 29 2023 19:29:57.073111 [Info] - [Bluetooth Controller] Setting system inactivity timeout to 60 minutes.
Tue Aug 29 2023 19:29:57.073165 [Info] - [Bluetooth Controller] Activate BaseStation Controller.
Tue Aug 29 2023 19:29:57.075590 [Info] - [Bluetooth Controller] Power Management: LHB-F1XXXXXX, Not Detected, Operation:On, Result:Fail.
Tue Aug 29 2023 19:29:57.075612 [Info] - [Bluetooth Controller] Power Management: LHB-D7XXXXXX, Not Detected, Operation:On, Result:Fail.
Tue Aug 29 2023 19:29:57.078342 [Info] - [Bluetooth Controller] Updated Base Station LHB-D7XXXXXX (Index:1)
Tue Aug 29 2023 19:29:57.078574 [Info] - [Bluetooth Controller] Updated Base Station LHB-F1XXXXXX (Index:2)
Tue Aug 29 2023 19:29:57.253675 [Info] - [Bluetooth Controller] Power Management: LHB-D7XXXXXX, Not Detected, Operation:On, Result:Fail.
Tue Aug 29 2023 19:29:57.253687 [Info] - [Bluetooth Controller] Radio Property Query: LHB-F1XXXXXX
Tue Aug 29 2023 19:29:57.253708 [Info] - [Bluetooth Controller] Power Management: LHB-F1XXXXXX, Not Detected, Operation:On, Result:Fail.
Tue Aug 29 2023 19:29:57.254753 [Info] - [Bluetooth Controller] OnWorker_BaseStationReadProperties (Failed) (0.00 seconds)
Tue Aug 29 2023 19:29:57.269851 [Info] - [Bluetooth Controller] LHB-F1XXXXXX, HardwareID:0x09000009 Radio:0 MCU:0 Bootloader:0
Tue Aug 29 2023 19:30:14.079117 [Info] - [Bluetooth Controller] Power Management: LHB-F1XXXXXX, Not Detected, Operation:On, Result:Fail.
Tue Aug 29 2023 19:30:17.387014 [Info] - [Bluetooth Controller] OnWorker_BaseStationScan "HTC BS" (Failed) (0.00 seconds)
Tue Aug 29 2023 19:30:18.129742 [Info] - [Bluetooth Controller] OnWorker_BaseStationScan "HTC BS" (Failed) (0.00 seconds)
Tue Aug 29 2023 19:35:35.316293 [Info] - [Bluetooth Controller] Power Management: LHB-F1XXXXXX, Not Detected, Operation:On, Result:Fail.
Tue Aug 29 2023 19:35:35.316319 [Info] - [Bluetooth Controller] Power Management: LHB-D7XXXXXX, Not Detected, Operation:On, Result:Fail.
Operating System Version:
Ubuntu 22.04.3 LTS (64 bit)
Kernel Name: Linux
Kernel Version: 6.2.0-31-generic
X Server Vendor: The X.Org Foundation
X Server Release: 12101004
X Window Manager: KWin
Steam Runtime Version: steam-runtime_0.20230606.51628
Video Card:
Driver: AMD AMD Radeon RX 5600 XT (navi10, LLVM 15.0.7, DRM 3.49, 6.2.0-31-generic)
Driver Version: 4.6 (Compatibility Profile) Mesa 23.0.4-0ubuntu1~22.04.1
OpenGL Version: 4.6
Primary VRAM: 6144 MB

VR Hardware:
Headset: HTC Vive. MV (lighthouse)
Base station or sensor: HTC HTC V2-XD/XE (lighthouse)
Base station or sensor: HTC HTC V2-XD/XE (lighthouse)

Let me know if there's any other details that would help!

@Nullmatic
Copy link

This seems to have been fixed in the newest SteamVR beta for 2.0. At least for me.

System Info:
Arch Linux (6.5.4-arch2-1)
KDE Wayland
Mesa (23.1.8-1)
CPU: AMD Ryzen 9 5900X
GPU: AMD Radeon 6950 XT

@digitalcircuit
Copy link

Unfortunately, the SteamVR beta 2.0.1 doesn't seem to fix my Base Stations 1.0s, as I have the same results as before.

The SteamVR beta at least didn't break anything else at first glance, either (asides from textures being flipped upside down and color-inverted for the new menus, I'll try to file a new bug soon), so that's a plus.

@KczBen
Copy link

KczBen commented Nov 30, 2023

Do we know what the official state of this feature is? I haven't seen it mentioned in any of the changelogs on Steam, and it seems everyone here has a slightly different experience with it, making it rather difficult to find a working solution.

My experience is closest to @digitalcircuit and I have a very similar hardware and software setup. Those who have it working, are you using Baste Station 1.0 or 2.0? What's your setup like?

@yaomtc
Copy link

yaomtc commented Dec 1, 2023

I'm using the Index base stations, which are 2.0 (with an Index headset) and SteamVR is able to handle power management of the base stations just fine.

@cloutier
Copy link

I can also confirm it is now working on my end, where previously they would stay turned on.

@Patola
Copy link

Patola commented Feb 21, 2024

I also confirm it's working for me -- SteamVR stable -- it's turning off all my 3 base stations after I quit SteamVR.

@Patola
Copy link

Patola commented Feb 21, 2024

...and it also turns them on when SteamVR starts

@KczBen
Copy link

KczBen commented Feb 21, 2024

I'm assuming you're using Base Station 2.0s with an Index? It still doesn't work with 1.0s and a Vive on mine, neither on the beta nor stable branch.

@Patola
Copy link

Patola commented Feb 22, 2024

I'm assuming you're using Base Station 2.0s with an Index? It still doesn't work with 1.0s and a Vive on mine, neither on the beta nor stable branch.

Yes, exactly. Sorry for not being clear on my equipment.

@KczBen
Copy link

KczBen commented Feb 23, 2024

Maybe if somebody with an Index has some V1 base stations around, that could be useful to test? I'm assuming the issue is with the communication between SteamVR and the link box's Bluetooth adapter, but it would be nice to make sure that V1 base stations can work. V2 devices are compatible with V1 stations, so that is theoretically a supported use case too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests