ValveSoftware / SteamVR-for-Linux

Issue tracker for the Linux port of SteamVR
918 stars 45 forks source link

Base station power management - any workaround? #320

Open vittorioromeo opened 4 years ago

vittorioromeo commented 4 years ago

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:

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

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 3 years ago

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 commented 3 years ago

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

TheDrawingCoder-Gamer commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

yaomtc commented 1 year ago

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

caseif commented 1 year ago

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

digitalcircuit commented 1 year ago

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 commented 12 months ago

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 commented 12 months ago

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 commented 9 months ago

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 commented 9 months ago

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 commented 7 months ago

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

Patola commented 7 months ago

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

Patola commented 7 months ago

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

KczBen commented 7 months ago

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 commented 7 months ago

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 commented 6 months ago

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.