GNOME Bugzilla – Bug 692559
Unblank temporarily for urgent notifications
Last modified: 2013-02-13 15:36:36 UTC
If urgent notifications come in, the shell should unidle so that the notification is visible. This is useful for critical battery notifications, and "about to logout" notification (bug 597030), both of which can happen when the display is already blanked. This could also allow us to enable suspend by default (bug 681869). [1]: I can provide a D-Bus interface for that, if you're averse to adding this in the shell codebase
Actually, as gnome-settings-daemon is responsible for the brightness, we really want it to be responsible for unblanking (resetting the idle would obviously mean that we reset the suspend counter, duh). It might also be easier for gnome-shell to send a signal on the ScreenSaver D-Bus interface, for gnome-settings-daemon to unblank temporarily.
Created attachment 234543 [details] [review] power: Un-idle when receiving important notifications
This is an example of the g-s-d code needed to handle a possible "ReceivedCriticalNotification" signal.
I hope we don't get too liberal with the urgent classification, but it does sound reasonable.
(In reply to comment #4) > I hope we don't get too liberal with the urgent classification, but it does > sound reasonable. We already special-case urgent notifications in the shell. Try disabling notifications in the user menu, and do: notify-send -u normal "test" "test text" (will not be shown) notify-send -u critical "test" "test text" (will be shown) This is merely an expansion of that special-casing.
Documenting what was said on IRC. One purpose of the shield is to be able to wake up the screen (infrequently but periodically) to display notifications. We need to be careful about the frequency of wake ups so we don't waste power unnecessarily. I'm not sure if the urgency of the notification should determine whether the notification is seen or not. I think if I opt-in to showing something on the lock screen it is already pretty important. And I'd rather not have app authors abusing the urgent flag to get special privileges. Perhaps the urgency could be used to prioritize wakeups or bypass any frequency limits.
Created attachment 234931 [details] [review] power: Show notifications when about to suspend from idle
Created attachment 234932 [details] [review] power: Show notifications when about to suspend from idle
Created attachment 234933 [details] [review] power: Wake up the display when about to suspend
The particular feature that I was looking at this gnome-shell change for is implementable directly in gnome-settings-daemon's power plugin, so we'll do that for now. With those changes, you'll get the 1) a warning before suspending/hibernating 2) the display getting woken up for 10 seconds when this notification occurs. This should be good enough to allow us to enable suspend by default. I'll commit this along with tests after 3.7.5.
Review of attachment 234543 [details] [review]: This won't be needed.
Created attachment 235896 [details] [review] power: Wake up the display when about to logout
Comment on attachment 234933 [details] [review] power: Wake up the display when about to suspend We don't want to wake up the display when the machine is going to go to sleep.
Attachment 234932 [details] pushed as 0a82672 - power: Show notifications when about to suspend from idle Attachment 235896 [details] pushed as b7f2c72 - power: Wake up the display when about to logout