You Are Here: Home » Articles » How-To

How to fix the headphone sound problem in HP laptops in Linux?

By on October 22nd, 2009     

HP Laptops in the series dv-5, dv-6, dv-7 and some HP minis have a strange problem in Fedora 10. When you plug in headphones, the sound still continues to come out the speakers as well as out the headphone jack. And In Fedora 11, no sound actually comes out of the plugged in headphones. In this article we will tell you how to fix the problem in two different ways.

The Long Method

Download and unzip a package called hda-verb. Now use the following command line switches with hda-verb to turn on and off your headphone.

To activate the sound on the speaker:

sudo ./hda-verb /dev/snd/hwC0D0 0x1 set_gpio_data 1
sudo ./hda-verb /dev/snd/hwC0D0 0x1 set_gpio_dir 1
sudo ./hda-verb /dev/snd/hwC0D0 0x1 set_gpio_mask 1

To activate the sound on the headset:

sudo ./hda-verb /dev/snd/hwC0D0 0x0f SET_CONNECT_SEL 1

To mute the speaker:

sudo ./hda-verb /dev/snd/hwC0D0 0x0d SET_PIN_WIDGET_CONTROL 0

To unmute the speaker:

sudo ./hda-verb /dev/snd/hwC0D0 0x0d SET_PIN_WIDGET_CONTROL 0x40

To mute the headphones:

sudo ./hda-verb /dev/snd/hwC0D0 0x0f SET_PIN_WIDGET_CONTROL 0

To unmute the headphones:

sudo ./hda-verb /dev/snd/hwC0D0 0x0f SET_PIN_WIDGET_CONTROL 0x40

The Short Method

The method described above is very long indeed and becomes quite weird when you have to use it again and again. So you can use this package called hda-hp developed by a guy called vwbusguy. You can download the packages from here. The commands can be run as root as shown below:

headphone-on   – Mutes the laptop speakers, and unmutes the headphone jacks.
headphone-off   – Mutes the headphone jacks, and unmutes the laptop speakers.




         Submit to Reddit     Stumble


Related Posts by Tags: , , , ,



  • david

    This used to happen under Fedora 10. Now, under F11 on my dv7, it doesn't happen.

    The thing is, I considered it a feature, not a bug. It's way easier for me to turn speakers on & off or use their physical volume control than it is to find the (disconnected! lost!) headset and plug it in.

    So…the above stuff does nothing on my current system. Any idea how to reintroduce the "bug" for those of us who liked it?

  • david

    Never mind–the mute/unmute stuff from the "long" method works fine. Making my own short method now… {8'>

    'Preciate it.

    • http://digitizor.com The Digitizor

      Thanks man!

  • jibran

    what about for windows vista?

    • http://digitizor.com The Digitizor

      Are you having a similar problem in windows vista too?

  • andy

    i’m having this exact same problem in ubuntu 9.10. it’s really annoying sometimes when i want to use headphones in a public place, but can’t because the sound comes from both the headphones AND speakers.
    man, i wish there was a fix like this directed toward ubuntu users..

  • http://non derrill

    plese sent me news letter
    e-mail;dthompson@labourlawyer.com

  • Pingback: Ubuntu doesn't allow headphone-only audio output?



How to fix the headphone sound problem in HP laptops in Linux? was originally published on Digitizor.com on October 22, 2009 - 3:25 pm (Indian Standard Time)