Here is a script to manually select (or automatically select) audio output between built in speakers and headphones (jack in the laptop body) This script can help to write the udev rule for the specific laptop. Tested only on the Dell laptop, Ubuntu 24.04, as per bug description It includes also code to select/auto detect bluetooth sound output, however, that was not tested.
----- Note: I have successfully automated this by userspace systemd service script cat ~/.config/systemd/user/audio-auto.service [Unit] Description=Auto audio output switching After=pipewire.service wireplumber.service [Service] ExecStart=/bin/bash -c 'pactl subscribe | grep --line-buffered -E "on card|.new. on sink|.remove. on sink" | while read -r _; do sleep 1; %h/.local/bin/audio-out.sh auto; done' Restart=on-failure [Install] WantedBy=default.target Activation of the service: systemctl --user daemon-reload systemctl --user enable --now audio-auto.service ** Attachment added: "script to manually select (or automatically select) audio output between built in speakers and headphones (jack in the laptop body)" https://bugs.launchpad.net/ubuntu/+source/alsa-ucm-conf/+bug/2171573/+attachment/6011242/+files/audio-out.sh -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2171573 Title: Dell Pro 14 Plus PB14250 (Arrow Lake, CS42L43 SoundWire): headphone jack silent, "Failed to enable ucm device Headphones" To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/alsa-ucm-conf/+bug/2171573/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
