protonscr

Steam fails to configure Steam Controller via bluetooth with bluez 5.56

steamclosed Steam controller
ValveSoftware/steam-for-linux#7697 · opened 2021-03-09 by Komoszek · updated 2021-12-03 · 28 comments · github
KKomoszek 2021-03-09 github

Your system information

  • Steam client version: 1614994836
  • Distribution: Manjaro 20.2.1
  • Opted into Steam client beta?: Yes
  • Have you checked for system updates?: Yes

Please describe your issue in as much detail as possible:

Steam has problem configuring Steam Controller via bluetooth with https://github.com/bluez/bluez/commit/35a2c50437cca4d26ac6537ce3a964bb509c9b62 or newer. Controller works just fine in Lizard Mode but refuses to work as soon as Steam tries to configure it. This problem is not present if you connect SC via usb, use older versions of bluez or use any third-party software to configure SC (e.g. https://github.com/kozec/sc-controller).

Related console output

Local Device Found
  type: 28de 1106
  path: /dev/hidraw0
  serial_number: cf:14:07:ae:84:e5 - 0
  Manufacturer: 
  Product:      SteamController
  Release:      0
  Interface:    -1

Controller uses V2 HID protocol
!! Steam controller device opened for index 0.
Steam Controller reserving XInput slot 0
Controller 0 connected, configuring it now...
Installing breakpad exception handler for appid(steam)/version(1614994836)
Disconnecting zombie controller 0
Scheduled disconnect of controller 0
Installing breakpad exception handler for appid(steam)/version(1614994836)
Installing breakpad exception handler for appid(steam)/version(1614994836)
Warning, couldn't get controller details for SC, PID=4358
CGetControllerInfoWorkItem::RunFunc: Read failure.
Installing breakpad exception handler for appid(steam)/version(1614994836)
Warning, couldn't get controller details for SC, PID=4358
CGetControllerInfoWorkItem::RunFunc: Read failure.
Warning, couldn't get controller details for SC, PID=4358
CGetControllerInfoWorkItem::RunFunc: Read failure.
Warning, couldn't get controller details for SC, PID=4358
CGetControllerInfoWorkItem::RunFunc: Read failure.
Warning, couldn't get controller details for SC, PID=4358
CGetControllerInfoWorkItem::RunFunc: Read failure.

Steps for reproducing this issue:

  1. Install https://github.com/bluez/bluez/commit/35a2c50437cca4d26ac6537ce3a964bb509c9b62 or newer
  2. Connect controller via Bluetooth
  3. Open Steam
Kkisak-valve maintainer 2021-03-09 github

Hello @Komoszek, a regression in bluez should also be mentioned to the bluez devs if it hasn't been already.

Ttaylor85345 2021-03-11 github

Can confirm the same behavior on two separate Manjaro systems.

Ppadovan 2021-03-11 github

A similar issue was reported in the BlueZ community: https://lore.kernel.org/linux-bluetooth/[email protected]/#t - It could be interesting to mention this one there.

Ttaylor85345 2021-03-12 github

Passed this on to Ricardo at the provided link and got this response:

Thank you. Yes, I'm aware of that. The bug I was inspecting is sorted out now, but yes, we had to take into account the change in how BlueZ provides the report IDs starting in 5.56.

I guess that's something that everyone using hidraw devices with multiple report IDs will have to take care of when they switch to BlueZ 5.56 or later.

https://lore.kernel.org/linux-bluetooth/[email protected]/

Cclst 2021-05-07 github

This is still an issue with the latest Steam Client. It sadly makes my couch gaming with the Steam Controller pretty limited. SC-Controller works fine but I can only play games that don't use the Steam Client with it.

Is there some kind of workaround other than downgrading bluez?

Ssenpl 2021-05-08 github

Is there some kind of workaround other than downgrading bluez?

yes. Use of cable, but this is also not very reliable.

Cclst 2021-05-08 github

Yes, thanks. I can confirm spanning 5m of USB cable across my living room works. It's less than ideal though.

Ttylergale 2021-06-27 github

Can confirm that it effects the new Ubuntu 21.04 on June 27, though I am still unsure based on this thread whether it is a confirmed Bluez or Steam Controller issue?

Sstheid 2021-06-27 github

Its not confirmed, but given the fact that other software can use the controller just fine with this bluez version i recon its a steam-for-linux issue.

Tthemchn 2021-07-28 github

I am also experiencing the exact same issue.

Wwiccan2 2021-07-31 github

Getting the same on Arch Linux with latest Bluez, had to downgrade to get the controller to work again which isn't ideal.

KKomoszek 2021-08-01 github

I've more or less found out why Steam Controller is not working with Steam and works perfectly fine with sc-controller.

So the whole issue stems from commit I linked in my first comment. Basically it slightly changed data read from device in some cases. Both steam and sc-conttroller access SC via hidraw api. After getting out of lizard mode (basic keyboard/mouse HID) Steam calls ioctl with HIDIOCGFEATURE(20) on opened SC descriptor (probably to get some data required to identify SC or data showing that SC is out of lizard mode?). Data returned by ioctl on bluez pre-commit (5.55) is actually different from data returned post-commit (5.56 and newer; there are report id byte(s) prepended in newer versions). sc-controller is not affected by this change because it doesn't actually call ioctl with HIDIOCGFEATURE and everything else seems to be the same.

Sstheid 2021-08-01 github

Good debugging, hopefully someone will take care of that soon.

KKomoszek 2021-09-04 github

As we approach 6 months of this issue, I've finally created a workaround that doesn't require you to downgrade to older versions of bluez. It is by no means perfect, but it should probably work, as long as you have only one SC connected at the same time. You can find it here https://github.com/Komoszek/sc-ble-bridge.

Sstacyharper 2021-09-04 github

I want to cry when I see that a random took so much time to make something that clean while Valve cant quickly fix this minor regression…

Sstheid 2021-09-06 github

I think they will fix it eventually as SteamDeck is also Arch based. But the intermediate fix is sooo appreciated!

PPlagman 2021-09-07 github

I'm not aware of a way we could use to detect pre-5.56 versions of BlueZ vs. post-5.56 in a distro-agnostic way, so I don't know that we could fix this only on our side without also breaking the subset of users that are not yet on 5.56. We are looking into it.

PPlagman 2021-09-07 github

Looks like we might have a way to work around it in a way that works with both versions, given that in our protocol, the first byte of valid reports is guaranteed to not be 3, which is our report ID.

Kkakra 2021-09-07 github

@Plagman Couldn't you just look at the report length and compare that to the length reported by the HID descriptor? If the length is x+1, it has the report ID, if it is just x, it doesn't have the ID prepended... You could still add another sanity check if the first byte matches any of the known report IDs.

Aabcminiuser 2021-09-09 github

Oops, apologies for breaking Steam - but the previous BlueZ behavior was critically broken.

You should indeed be able to probe for the correct behavior by checking that the first byte is the report ID you requested, and the length is correct. Broken BlueZ versions strip off the report ID from the returned data, and mangle the last byte of the report.

Cccgauvin94 2021-09-09 github

Issue is present for me on openSUSE Tumbleweed with BlueZ 5.61

Ppadovan 2021-09-09 github

We hit what I believe is the same issue on fwupd. Here's how it was solved:
https://github.com/fwupd/fwupd/blob/f6a8c740e0c3fea700cdc51989155e771c174518/plugins/pixart-rf/fu-pxi-ble-device.c#L167

On Thu, Sep 9, 2021 at 2:50 PM Colin Gauvin @.***>
wrote:

Issue is present for me on openSUSE Tumbleweed with BlueZ 5.61


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/ValveSoftware/steam-for-linux/issues/7697#issuecomment-916311059,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAJ23677USSALP4OR2H6S3UBDXV3ANCNFSM4Y3XIU6Q
.

KKomoszek 2021-10-09 github

I've noticed that SC finally works via BLE with newest Steam client, but it wasn't mentioned in any of the Steam Client Beta update announcements.

Cccgauvin94 2021-10-09 github

Can confirm. I am running openSUSE Tumbleweed 20211005 with Kernel 5.14.6-2 and bluez 5.61-1.5, steam-devices 1.0.0.72-1.9 and Steam package version 1633666232, and the Steam Controller is working fine over Bluetooth on all modes (Desktop, Big Picture, and In-Game).

Thank you for fixing this.

Ttaylor85345 2021-10-12 github

Also confirming this fixed in Manjaro

Ggarvb5417 2021-10-22 github

I have this issue on Elementary OS 6 Odin but I don't have BlueZ installed

IIGLOU-EU 2021-10-30 github

Fixed in Archlinux with BlueZ 5.62-1

Kkisak-valve maintainer 2021-12-03 github

Closing per the last several comments.