Day 3 with the Steam Machine (or: using headphones)
Every week we (try to) play Frosthaven digitally. When I switched to the Steam Machine, I had to figure that out anew. This is one of those things that makes it hard for any random person to do Linux-flavour-of-the-month.
I use a pair of Bose QuietComfort Ultra Ⅱ. When I use it with my work MacBook it will automatically turn on the microphone whenever the machine wants a microphone. That is where I do most of my calls. But it did not on SteamOS.
It turns out this is fully available. Valve just turned it off. More specifically:
Automatically switching to HSP/HFP when the microphone is in use is currently working, but is not yet ready to be enabled by default.
One outstanding issue is that during the codec transition, the audio output is briefly redirected to the built-in speakers.
I do not actually know what “HSP/HFP” is. And I do not feel like I need to know it either. No random computer user should have to know it. But from searching the web it turns out I want to be on A2DP when listening to audio, and switch to HSP/HFP when I want the microphone to work.1
This was easily fixed. We can reenable the feature that Valve turned off:
wpctl settings --save bluetooth.autoswitch-to-headset-profile true
Note that the reason Valve turned it off does not apply to me. That was a fix likely done for the Steam Deck and its built-in speakers. My Steam Machine does not have built-in speakers. No audio will leak.
After I did this all was good. For a little bit. A few weeks later I started to have a problem where connecting my headphones would get them stuck in the headset (mono audio) mode. I think I have fixed this now, but it might take another few weeks to know for sure:
card=$(pactl list cards short | grep bluez_card | cut -f 2)
pactl set-card-profile "$card" a2dp-auto-prefer-quality
This should make WirePlumber remember A2DP as the profile to start with.
Because I was looking into this now anyway, I looked into another thing that worked on my MacBook and phone but not on the Steam Machine: wear detection. The Bose headphones are able to notice when I take them off and pause audio playback on whatever was running.
Of course it is also supported by Linux. You just need to search the internet and figure out that:
- Applications implement something that is called the Media Player Remote Interfacing Specification.
- The headphones implement something that is called A/V Remote Control Profile.
- The combination of these protocols let the machine tell the headphones whether media is playing, and the headphones tell the machine what to do with the media.
- Something needs to run on the machine to make sure the communication is happening.
(Some of those things are probably wrong. Because not only should a random computer user not need to know this, I should not need to know this.)
That something is the mpris-proxy. It is already installed on SteamOS as part of the Bluetooth tools (bluez-utils). So just turn it on:
systemctl --user enable --now mpris-proxy.service
With these three setting changes, everything seems to work the way I would have expected it to work from the start.
It is also confusing to me that PipeWire (or someone) decided that A2DP is called “High Fidelity Playback”. Yes, HFP. But the one with HFP in the acronym is the microphone + mono audio playback one. There HFP means “Hands-Free Profile”.↩