Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My laptop is Thinkpad Edge series, of which laptop will produce a beep when the power supply being unplugged. But I noticed that the beep has been blocked if the alsa is turned to mute.

So, I wonder if I can add an exception of "mute rules".

share|improve this question
up vote 0 down vote accepted

The wide variety of sound cards and ac adapters may make this difficult for a universal answer, but the basics are:

  • Create a daemon process that monitors /proc/acpi/ac_adapter/state for "offline" (grep will do fine)
  • Use that to trigger setting volume to X (see alsactl --help) and playing a sound/beep (aplay, beep, ...)
  • Return sound to system setting (the alsa settings are in /etc/asound.state)

Note: if you don't have /proc/acpi/ac_adapter/state, use something else that would change when the cord is pulled ... like /proc/acpi/battery/BAT1/state (the charging state would become discharging)

share|improve this answer
A good idea, but I have no ac_adapter in /proc/acpi directory. – Determinant Mar 26 '12 at 8:55
I updated with an alternative file to monitor in /proc/acpi ... it would help if you gave a listing of /proc/acpi and more detailed info of your applicable hardware in general (hardinfo will work ). – technosaurus Mar 27 '12 at 3:59
I'll have a try on it. The acpi of my laptop is poorly supported. Thank you anyway. – Determinant Mar 27 '12 at 12:59

You can not. Alsa mutes using hardware mixer so well that not even a mouse whisper passes.

share|improve this answer
Any other approach to my problem? Any other low-level solutions that can make sound using the device directly? – Determinant Mar 20 '12 at 13:00
10 years ago there were speaker pins on all motherboards. now they are silently routed to a builtin soundcard. You may find connector or you need to solder one. remember that 4-pin connector is sometimes serial 12V and will burn headphones. – ZaB Mar 20 '12 at 13:32
Well..My computer is a laptop and I mean I need a software-level way to achieve that (maybe some kernel hacking on sound devices). – Determinant Mar 20 '12 at 14:03
well snd-hda-intel file has it. replace master channel mute by mute of all but speaker.... – ZaB Mar 21 '12 at 13:24
Could you please give me some specific instructions? – Determinant Mar 25 '12 at 15:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.