Skip to content

Instantly share code, notes, and snippets.

@saidsay-so
Last active March 15, 2024 13:52
Show Gist options
  • Save saidsay-so/84e9c84823e82e84db36306fcb34c901 to your computer and use it in GitHub Desktop.
Save saidsay-so/84e9c84823e82e84db36306fcb34c901 to your computer and use it in GitHub Desktop.
Activate rear/front speakers on HP laptops

Activate rear speakers on HP laptops

Some laptops, mostly from the HP brand, are equipped with rear and front speakers to improve the sound experience. Sadly, they aren't detected on Linux. The reason is because those speakers are under "unconnected" ports, which makes Linux not using them because it considers them to be inactive. So, I made this little tutorial to (try to) get them working.

Installation

  • First, you have to install hdajackretask to activate the hidden ports, which you can find under the package alsa-tools on most distributions.

Debian:

sudo apt install alsa-tools

Fedora:

sudo dnf install alsa-tools

Activation

After the installation, you should have hdajackretask installed. You can launch it through your desktop environment, or the terminal with:

hdajackretask

A new window should be displayed on your screen. Then, check the box "Show unconnected pins".
You have two possibilites:

  • you already have information about your computer ports,
  • or you have no clue on what ports are corresponding to.

If you already know the ports, you just have to reassign them by checking "Override" and selecting the good item in the list. After that, stop all the processes which are using the sound card and press "Apply now". If the configuration is good, you can then override the boot parameters.

If you have no clue, you have to repeat the process written above for each port (good luck 😅 ).

Fixes

Volume

Modify /usr/share/alsa-card-profile/mixer/paths/analog-output.conf.common to look like this:

[Element PCM]
...
volume = ignore
volume-limit = 0.01
...
#!/bin/sh
sudo fuser /dev/snd/* | xargs sudo kill
systemctl --user stop pulseaudio.service pulseaudio.socket

HP Envy x360 13-ag00000nf

  • 0x14 - Front speakers
#!/bin/sh
systemctl --user start pulseaudio.service pulseaudio.socket
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment