GNOME Bugzilla – Bug 346542
give warning when suspend fails
Last modified: 2007-02-01 13:46:00 UTC
Scenario: 1. Close lid 2. Put laptop in bag 3. Suspend fails (for whatever reason) 4. Laptop melts This is one reason why we should not honor inhibitors when closing the lid. But beyond that we should sound some kind of warning to alert the user that the suspend failed.
With CVS, we currently beep using the PC speaker, but some machines don't have a PC speaker so I'm at loss what to do. Any ideas?
I had a suspend failure last night that I was able to reproduce. There was an error like DBUS timed out... recovering. We really need to scream like hell if a suspend fails for any reason.
Did you get the beeping? What did g-p-m do?
Nope. Nothing as far as I could tell.
Bugger. I've just noticed that pcspkr isn't loaded by default on fedora. Dealbreaker!
Does this commit fix things for you? 2006-07-30 Richard Hughes <richard@hughsie.com> * src/gpm-manager.c: Add manager_rescan_buttons() to poll all the buttons every minute. This should fix #346082 Richard.
How does that have anything to do with sounding a warning?
Also, I can't seem to find the code where we beep when suspend/hibernate fails. Where is it?
Well, it stops laptops overheating! :-) And the beep: gpm-common.c (gpm_warning_beep) Richard.
gpm_warning_beep doesn't seem to be used when suspend/hibernate fails.
Apologies. 2006-08-15 Richard Hughes <richard@hughsie.com> * src/gpm-manager.c: Beep to warn if the suspend or hibernate failed. Should fix #346542 Richard.
Cool. Thanks. I wonder if maybe it should beep (in this case) regardless of the gconf beep setting. FC6 disables beeping by default - most likely because it is used for non-critical warnings. Also it seems like it only beeps once, right? It should probably keep beeping until the lid is opened again. I think this is what windows does.
Yes, sounds sane. I'll play more with this in the week, this weekend is a bit hectic.
Happened to me again :( Hal had crashed and I stuffed my laptop in a bag and it damn near melted. I don't think we can rely on the PC speaker since Fedora and others are turning it off by default again. GStreamer would work. We could even put it out of process by installing a little gpm-sound-alert script or something. This script could check a gconf key to see if gdk_beep or a .wav file should be used. Here's an example from gaim: http://svn.sourceforge.net/viewvc/gaim/trunk/gtk/gtksound.c?revision=17204&view=markup#l_389
But the volume could just be turned down, and then we wouldn't head anything either. I run my laptop for 99% ofthe time with the volume muted.
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. Jon, can you test this and tell me what you think please.