GNOME Bugzilla – Bug 365700
No audio warning message when battery critical
Last modified: 2007-02-01 22:41:50 UTC
Here's a scenario that has happened to me several times: I come home, boot my laptop, check my email etc. and then I'll get something to eat. All goes well, but I've forgotten to plug in AC to my laptop. I'm nearby by my computer but I haven't checked the screen, which is sleep for power saving, for visual warnings so the computer is shutdown. If there was a warning sound, I've would've heard it. I suggest that there would be a option for user selected warning sound with perhaps user predetermined volume. I don't like having general warning sounds on because they are not suitable for my environment due to the disturbance so this would should be sound just for this event. Other information:
Have you tried turning on /apps/gnome-power-manager/enable_pcskr_beeping - i think most distros turn this off by default.
I didn't know that gnome-power-manager did beeping. It was on but System -> Preferences -> Sound had only "visual system beep" on, not "enable system beep". I have probably changed those options to this long time ago for some odd reason. That obviously silenced power manager's beeping? What about other sounds than beeping? Thanks for your help.
(In reply to comment #2) > I didn't know that gnome-power-manager did beeping. It was on but System -> > Preferences -> Sound had only "visual system beep" on, not "enable system > beep". I have probably changed those options to this long time ago for some odd > reason. That obviously silenced power manager's beeping? Hmm I don't know. It depends if your distro disables the pcspkr module, as that's responsible for the beep. > What about other sounds than beeping? It's been suggested before, but it would have to be out of process as I really don't want gstreaemer pulling in deps and increasing memory usage. Got any other ideas? Richard.
I did some testing and tried to figure out why my laptop's speaker works only in bios but I found no reason even with the help of #ubuntu people. So, this directly isn't gnome-power-manager's bug but it still affects gnome-power-manager since some people do disable their terminal bell and found that some other people have also problems getting their speaker working leaving no audio warning possibility for g-p-m. How much would using gstreamer increase memory usage? Isn't gstreamer most likely loaded in memory anyway? Can it be made dynamically so that it would loaded only if user chooses so? Sorry, all out of ideas now. Changing to "not a bug" since g-p-m does have audio warning message.
(In reply to comment #4) > How much would using gstreamer increase memory usage? Isn't gstreamer most > likely loaded in memory anyway? Can it be made dynamically so that it would > loaded only if user chooses so? As it would be loaded by g-p-m in process. We could of course do this out of process but I'm thinking this is overkill. Stuff like the system bell should work out of the box. I would be interested to know why it doesn't work on your system, if you ever find out. Richard.
FWIW, I think this is a pretty reasonable feature request. I don't think the system bell is a very sophisticated or pleasant solution. I think this could be handled in a very similar way as bug #346542.
Could we not just use gst-launch? gst-launch filesrc location=error.wav ! wavparse ! osssink Richard,
Tommi, can you try with CVS HEAD please: 2006-10-30 Richard Hughes <richard@hughsie.com> * data/sounds/Makefile.am: * data/sounds/gpm-critical-power.wav: * data/sounds/gpm-suspend-failure.wav: * data/sounds/gpm-unplugged.wav: Add some sample sounds done by me. 2006-10-30 Richard Hughes <richard@hughsie.com> * configure.in: * data/Makefile.am: * data/sounds/.cvsignore: * data/sounds/Makefile.am: * src/gpm-common.c: * src/gpm-common.h: * src/gpm-manager.c: Add really basic support for gpm_event_sound() so we can make a sound when critical events happen.
Richard, I'd like to try the CVS HEAD and help you but at the moment I'm too busy to learn the build process and play with it. Maybe later in this month.
Okay, if 2.17.90 doesn't dowhat you expect, then please re-open. Many thanks.
I tried it with Gnome 2.17.90 and a fresh Ubuntu Feisty installation. "Extras: Use sound to nofity in event of error" was on. What I want is to hear a warning sound when battery is very low and/or critically low so I have time to find power cord and plug it in. I did not hear any sounds originating from g-p-m. Sound was working otherwise (tested from sound preferences). Can you define what an event of error means?
When we are very low, suspend-failure and AC unplugged. Can you run your battery low, and then run "gnome-power-manager --verbose --no-daemon" and attach the relevant info (the warnings and the gpm_sound stuff)? Thanks for doing this. Richard.
[gpm_sound_force] gpm-sound.c:86 (23:59:40): Couldn't execute command: gst-launch filesrc location=/usr/share/gnome-power-manager/gpm-critical-power.wav ! decodebin ! audioconvert ! gconfaudiosink For some reason gst-launch is named after it's version as gst-launch-0.10 so there is no /usr/bin/gst-launch. I made a softlink and it worked: I heard a "plop" sound. It does what I wanted, thank you. Maybe someday the sound could be customized from the ui? I consider the gst-launch thing to be distribution bug rather bug in g-p-m though I don't know why gst-launch is named after it's version. If you think I'm right here then go ahead and close this one and I'll then make a bug report to Ubuntu's launchpad. Thanks again, Tom
Ahh, well done finding the problem. I think this is a packaging bug, there should always be one gst-launch on your system, even if you install the 0.8 compat libraries. I think this belongs in launchpad. Thanks for sorting this one.