Auto-Switching Audio Fix on Chromebook (GOOGLE-Cyan-1.0 with max98090 on Ubuntu 24.04)

Device: Chromebook (GOOGLE-Cyan-1.0)
Audio Codec: max98090
OS: Ubuntu 24.04 LTS

:puzzle_piece: Problem Summary

On a clean Ubuntu 24.04 install (with PulseAudio or PipeWire), audio plays on both speakers and headphones simultaneously. Plugging in headphones doesn’t mute speakers, which defeats automatic output switching.

:magnifying_glass_tilted_left: Cause

ALSA UCM2 config is looking for a non-existent jack detection control:

JackControl ā€œHeadphone Jackā€ # :cross_mark: Wrong

But the actual jack detection exposed by the hardware is:

ā€˜Headset Jack’ # :white_check_mark: Correct

:hammer_and_wrench: How to Fix It

Edit system UCM codec file /usr/share/alsa/ucm2/codecs/max98090/Headphones.conf

Change the line:

JackControl "Headphone Jack"

To:

JackControl "Headset Jack"

Edit this file: /usr/share/alsa/ucm2/codecs/max98090/HeadsetMic.conf

Change the line:

JackControl "Headset Mic Jack"

To:

JackControl "Headset Jack"

Reboot

:white_check_mark: Result

Plug in headphones → speakers mute, sound routed to headphones.
Unplug headphones → sound returns to speakers.
No more manual switching needed.
Works reliably after boot.

:spiral_notepad: Extra Notes

alsactl monitor confirms state changes on jack plug/unplug (node Headset Jack).

Next step

Try to override configuration instead of editing them, use /etc/alsa/ucm2 directory.
Report upstream, I’m not sure where exactly I should do that.
Here : GitHub Ā· Where software is built would that do?

@WeirdTreeThing

This post looks AI generated

Hi @WeirdTreeThing, well spotted! It’s partly AI generated. The auto-switching of audio was not working on the Cyan Chromebook I have. I had no clue where to start hunting for the bug - I had never gone down into the Linux audio stack before, and I didn’t know if the problem was in the driver, the ALSA configuration, or in PipeWire. In conversation with ChatGPT, I was able to find the cause of the problem and come up with a fix. To close up my conversation with the AI, I asked it to prepare a post for this forum because that seems like the most pertinent place to report the fix. Yes, it does look AI generated :slight_smile:

I expect that until the fix gets applied upstream, if it ever gets there, other users would benefit from the documentation of the fix here.

Also, since this is a highly knowledgeable community about Linux, I’m hoping to get some guidance on where to go from here. The objective is to get this fix upstream in the best way possible so it gets accepted without too much trouble.

You and @MrChromebox have written really useful code for me, many people, and the planet (by extending the life of many devices that were tagged as e-waste). I’m really grateful for that.