No headphone sound, laptop speakers work fine

UPDATE:
upgraded to F33, still no headphone sound.

I have a new samsung laptop with a fresh install of F32, everything works except for the headphone jack.

Things I’ve tried:
Pulseaudio - no luck
configuring certain files like /etc/pulse/default.pa adding and removing various commands found in forums - no luck.
alsamixer - no luck

None of the regular solutions I’ve found on forums have worked for me. Could really use some help.

1 Like

Tried different set of headphones?

Yes that was the very first thing I tried, both sets of headphones work fine on my mac.

According to these screenshots, the headphones are being recognized but no sound is actually coming through.

The same thing happens to me, but I have some bluetooth headphones which do work. Only the plugged ones have the problem

What type plug is on the headphones? Is it tip-ring-barrel or tip-ring-ring-barrel.

Some newer laptops use the second type to support the mic as well as headphones with a single jack. If you use one type where the other is expected it usually does not work. If you have a headphone jack and a separate mic jack then the first type is expected.

1 Like

This is the workaround I’m using…

I have headphones with a mic (apple headphones) and regular headphones without a mic, same situation for both.

I found a fix from this forum: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1886493

The command that got my headphones working was this:

sudo hda-verb /dev/snd/hwC0D0 0x1a SET_PIN_WIDGET_CONTROL 0x5

That’s the great news, the bad news is I don’t know why it worked and it doesn’t save it’s state after reboot or suspend. Should I add that command to a startup file or something?

2 Likes

Okay if anyone else has a Samsung Galaxy Book Flex ⍺ running Fedora 32/33 and runs into the issue of getting no sound in your headphones, I have a solution/workaround that is satisfying enough for me. First let’s get the headphones working on boot.

Create a service like so:

[root@localhost ~]# cat /usr/lib/systemd/system/headphones.service 
[Unit]
Description=Start headphones
After=multi-user.target

[Service]
Type=oneshot
ExecStart=/usr/local/bin/headphones

[Install]
WantedBy=basic.target

As you can see it makes a call to /usr/local/bin/headphones, this file looks like so:

[root@localhost ~]# cat /usr/local/bin/headphones 
#!/usr/bin/bash
/usr/bin/hda-verb /dev/snd/hwC0D0 0x1a SET_PIN_WIDGET_CONTROL 0x5

Make sure to make the file executable: chmod +x /usr/local/bin/headphones

We still need to install acpid:

sudo dnf install acpid

Now create the corresponding scripts to detect when headphones have been plugged/unplugged:

[sonnyparlin@localhost ~]$ cat /etc/acpi/events/headphone_jack 
event=jack/headphone.*
action=/etc/acpi/actions/headphone.sh

The action points to /etc/acpi/actions/headphone.sh, which looks like so:

[sonnyparlin@localhost ~]$ cat /etc/acpi/actions/headphone.sh 
#!/bin/bash
/usr/local/bin/headphones

Don’t forget to make it executable chmod +x /etc/acpi/actions/headphone.sh

Now let’s make sure it works after suspend:

[sonnyparlin@localhost ~]$ cat /usr/lib/systemd/system-sleep/headphones.sh 
#!/bin/sh

if [ "${1}" == "post" ]; then
  # Do the thing you want after suspend here, e.g.:
  hda-verb /dev/snd/hwC0D0 0x1a SET_PIN_WIDGET_CONTROL 0x5
fi

I’m pretty sure that’s it, it took me 3 days to come up with all this and browsing various forums and solutions. The only thing I’ve noticed is that if the headphones are plugged in when you boot up, you may have to log in as root and manually type:

/usr/local/bin/headphones

And that will solve the problem. If you boot up without headphones, turn on some music then plug your headphones in, it should switch over and give you sound. I hope this helps someone.

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.