2

I have a laptop that I frequently use during lectures. To do so I want the sound to be turned of, hence I mute the master volume/scale it down to 0%

Then when something triggers a system message like "The powercord has been unplugged" the master volume gets automatically scaled up to 100% and unmuted to play a notification sound.

How do I disable this feature?

So far I have only the workaround of muting/scaling down the volumen of the PC Speaker, which is not effected by the system message. However, this has the drawback that I need to open alsamixer (as the volume control is not visible in KMix for some reason) and turn it on as long as I want speaker sound and then I must remember to turn it off when I do not want it anymore (which is not done via "normal" multimedia keys).

The laptop is a Lenovo G780 with an Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller.

I have installed pulseaudio.

  • Which hardware manufacturer? Which Operating System (I guess some Linux distribution running KDE, as you're mentioning KMix)? If the latter, which audio-setup (additional audio-servers like Pulse or just plain alsa?)? Never happend to me, using Ubuntu on my laptop (MSI & Lenovo)... – Johannes H. Feb 3 '14 at 20:15
  • @JohannesH. I added the requested details. Let me note that I had an instance of Linux Mint using KDE running on this hardware and the problem never happened to me there. – Nobody moving away from SE Feb 4 '14 at 8:25
  • Putting a bounty on this because I'm still having this problem in Kubuntu 15.04, and I have to open alsamixer to set a hard maximum volume, which is a pain. – naught101 Jul 15 '15 at 21:29
  • @naught101: Is it on the same hardware or does that differ as well? – Nobody moving away from SE Jul 16 '15 at 7:50
  • HP zBook 14. But it's a software problem, I'm pretty sure - something to do with how Pulseaudio handles new volume events. I was looking into it, trying to find a solution a few months ago, but now I can't remember what it was called, and can't find anything relevant... – naught101 Jul 16 '15 at 22:08
2

To be pragmatic, a solution might be to chop off the 3.5mm plug of a pair of headphones and plug it in to the laptop when silence is desired!

Alternatively, note that alsamixer has a command line version, amixer (package alsa-utils on fedora), so you could write a small script to mute or unmute the speaker.

List the available devices:

$ aplay --list-devices
**** List of PLAYBACK Hardware Devices ****
card 0: Device [USB Audio Device], device 0: USB Audio [USB Audio]
...

List the controls for that card:

$ amixer -c 0 scontents
Simple mixer control 'PCM',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 52
  Mono:
  Front Left: Playback 26 [50%] [-27.00dB] [on]
  Front Right: Playback 26 [50%] [-27.00dB] [on]

Set the volume and mute state:

$ amixer -c 0 set 'PCM' '50%' mute

The bug seems to be kde Bug 324975 "Volume gets restored to 100% after each knotify event", first reported in 2013-09-16, and closed in 2014-12-04 with Status RESOLVED FIXED, but with many people still having problems and adding their comments even now.

Amongst the suggestions for workarounds, which depend a lot on your system, are:

  • Set flat-volumes=no in /etc/pulse/daemon.conf

  • Disable these sounds in ~/.gtkrc-2.0 or ~/.config/gtkrc-2.0 or $XDG_CONFIG_HOME/gtk-3.0/settings.ini with

    gtk-enable-event-sounds=0
    gtk-enable-input-feedback-sounds=0
    
  • Remove the libcanberra-gtk2 sound-theme package.

  • Use the gstreamer backend instead of PulseAudio.

  • In 15.04 enable the volume control in Systemsettings -> Application and System Notifications -> Playback Settings, and set other than 100%.

| improve this answer | |
  • In most contexts I do exactly this: plug in my headphones to avoid the sound from being heard. However, this is 2015! By now we should have figured out how to tell a computer what to do. Even the small script is just a workaround and no solution. I can see that it might be a feature to turn up the volume so that system events are heard but at least for me it is not wanted so there should be an option to turn it off. Furthermore, this was a non issue on other systems so it clearly is a bug that should be fixed instead of circumvented. – Nobody moving away from SE Jul 17 '15 at 8:30
  • I don't want silence. I just want to not be deafened when ever there is a new system bell. I also don't want to have to manually set the PCM volume. I can already do that with alsamixer, if necessary. I'm just looking for a way to prevent system sounds from increasing the volume, relative to last time I reduced the volume. – naught101 Jul 17 '15 at 20:15
  • @naught101 it seems to be a known/fixed kde bug. see my edit. – meuh Jul 17 '15 at 22:03
-1

same problem in archlinux, I found the solution here:

http://userbase.kde.org/Sound_Problems/es#Can.27t_mute_event_.28system.29_sounds_and_other_KMix_strange_problems

Now with KDE 4.10+, PulseAudio is enabled by user session and we can check that with the following command

ps -ef | grep pulseau

Example of output:

sergio    1880     1  0 12:15 ?        00:04:01 /usr/bin/pulseaudio --start --log-target=syslog

Entering the following commands

killall kmix
rm -rf .pulse/
rm -rf .pulse-cookie 
rm -rf .config/pulse/
kmix

fixed this issue. Old configurations of PulseAudio, can make this issue, if we create a new user, we won't have this issue .

| improve this answer | |
  • 1
    While the link might provide an answer it can quickly before outdated. Please include the main points from the link in your answer. Thanks – Matthew Williams Jun 8 '14 at 7:36
  • At first I head no pulse running (and no kmix either) but I applied the steps (though no .pulse/ was there too) and nothing happend. I logged out and back in an everything was as always (the event notifications raised the volume). This time pulseaudio was around and kmix too, so I retried (still no .pulse/) and it seemed to work. However, now I got no event sounds at all (even when the volume was turned up). Then I installed some updates and rebootet and now the event sounds turn the volume back up again and the fix does not work (I am also missing .pulse/ and .pulse-cookie now). – Nobody moving away from SE Jun 9 '14 at 18:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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