how to disable internal speaker audio

22,472

Solution 1

Here are some options I guess might work: How_to_disable_the_pc_speaker_(beep!)

Solution 2

You can try from terminal the command alsamixer

alsamixer is the alsa provided ncurses GUI for accessing hardware mixer elements, and it is capable of seperately turning off the internal speaker.

see man page of alsamixer for more infor man alsamixer

Also, if you want raw access to sound card parameters, you can use amixer which is a command-line mixer for ALSA soundcard driver

amixer -c<n> should provide that list

amixer -c<num> set <SCONTROL> mute will mute a mutable control by name

Be sure to check out various values of with amixer,the -c argument for selecting a sound card also works with alsamixer or amixer.

You can also install a GUI for alsamixer

sudo apt-get install alsamixergui

Solution 3

I had the same problem. This helped:

https://wiki.archlinux.org/index.php/Disable_PC_Speaker_Beep

specifically, I used the alsa mixer in terminal to mute the pc speaker.

Solution 4

I was unable to mute the internal pc speaker from alsamixer for some reason (in earlier cases over the years that always worked):

However, this time the Pulse Audio Control (ubuntu package pavucontrol) had one of the Output options which muted the pc speaker and let my headphones the signal.

Try using Pulse Audio Control (apt-get install pavucontrol, or launch from dash if already installed) and use controls within Output Options to mute the internal speaker while maintaining an audio stream to headphones.

Share:
22,472
Antoine Rodriguez
Author by

Antoine Rodriguez

Updated on September 18, 2022

Comments

  • Antoine Rodriguez
    Antoine Rodriguez over 1 year

    Under 12.04 :

    How do I disable globally the internal speaker of my computer without having to unset it to each user session ?

    I've tried to add "blacklist pcspkr" into "/etc/modprobe.d/blacklist" but it still let pulseaudio to use the internal speaker.

    Here is the lsmod that doesn't appear to show the pc speaker working :

    Module                  Size  Used by
    coretemp               13361  0
    dcdbas                 14098  0
    snd_hda_codec_via      46188  1
    microcode              18395  0
    snd_hda_intel          33028  5
    snd_hda_codec         116476  2 snd_hda_codec_via,snd_hda_intel
    snd_hwdep              13276  1 snd_hda_codec
    snd_pcm                81052  4 snd_hda_intel,snd_hda_codec
    snd_seq_midi           13132  0
    snd_rawmidi            25425  1 snd_seq_midi
    snd_seq_midi_event     14475  1 snd_seq_midi
    serio_raw              13031  0
    lpc_ich                16992  0
    snd_seq                51568  2 snd_seq_midi,snd_seq_midi_event
    hid_generic            12445  0
    snd_timer              28931  2 snd_pcm,snd_seq
    snd_seq_device         14137  3 snd_seq_midi,snd_rawmidi,snd_seq
    snd                    62520  17 snd_hda_codec_via,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
    mac_hid                13077  0
    soundcore              14635  1 snd
    snd_page_alloc         14108  2 snd_hda_intel,snd_pcm
    lp                     17455  0
    parport                40930  1 lp
    usbhid                 46022  0
    hid                    82474  2 hid_generic,usbhid
    aufs                  159970  69
    overlayfs              27511  0
    squashfs               36095  1
    nbd                    17427  1
    r8169                  56852  0
    i915                  470739  0
    drm_kms_helper         45427  1 i915
    drm                   231841  2 i915,drm_kms_helper
    i2c_algo_bit           13316  1 i915
    video                  19069  1 i915
    

    However I'm hearing music from the pc speaker.

    Maybe it's at the pulseaudio level but how to do the change global and not limited to one user ?

    Thank you !

    • Rory Alsop
      Rory Alsop over 11 years
      What I usually do is just disconnect the internal speaker - I only ever used them for POST diagnosis anyway
    • Antoine Rodriguez
      Antoine Rodriguez over 11 years
      it is solded to the mainboard :(
    • Timothy
      Timothy over 11 years
      I think these links might help you. [How to temporarily disable Pulseaudio?][1] [1]: askubuntu.com/questions/8425/…
    • Admin
      Admin over 11 years
      be sure to add blacklist pcspkr to the end of /etc/modprobe.d/blacklist file
    • Antoine Rodriguez
      Antoine Rodriguez over 11 years
      the lsmod show this :
  • Antoine Rodriguez
    Antoine Rodriguez over 11 years
    It helped me a little but pulseaudio still uses the internal speaker .... lsmod doesn't show the two modules loaded so it had at least effect on this. Still looking for disabling the pc speaker.
  • Antoine Rodriguez
    Antoine Rodriguez over 11 years
    by the internal speaker I mean that what is normally used to make beep is also used to produce sound ... So I have sound coming out from my box (a DELL FX170). It's not a localized issue : many HP desktop and all in one have similar issues. It's like that the "beeper" is connected to the soundcard ....
  • Timothy
    Timothy over 11 years
    try running in command line sudo lsmod |grep pcspkr if pcspkr is listed then you can disable it using sudo modprobe -r pcspkr then add the the line “blacklist pcspkr” to /etc/modprobe.d/blacklist to turn off permanently. Let me know if it works.
  • Antoine Rodriguez
    Antoine Rodriguez over 11 years
    The trouble of alsamixer is that it's inside a user session. I need to block it global.
  • Antoine Rodriguez
    Antoine Rodriguez over 11 years
    Done but still having the issue.
  • Oyibo
    Oyibo almost 11 years
    Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.