When device is suspended, the notification LED only blinks if there is a relevant notification (e.g. SMS).
What's the current behaviour?
The device always has a blinking notification LED when it is suspended.
Right before suspending, a notification gets displayed in phosh, that the device is going to sleep. The LED starts blinking because of that notification until the device wakes up again.
(EDIT: actually the notification gets stopped when suspend starts as @dylanvanassche explained below. However, if an application is inhibiting suspend (e.g. music player does play music), the notification is active and the LED blinks. See below for details.)
So we need to disable this notification, it's not really useful on phones.
How to reproduce your issue?
Set suspend time to 1 minute in postmarketos-tweaks makes it apparent quickly.
What device are you using?
pine64-pinephone
On what postmarketOS version did you encounter the issue?
Yes, that notification will be visible, but it is closed right before the phone suspend with my patch :)
If everything is set up correctly, the notification blinking should come from another source
Thanks for linking this, I didn't know about that bug.
FWIW I should rarely hit this, because my main use case where this is relevant is listening to podcasts, and there the media player runs until I press pause in the UI. Then the inhibitor (alsa play) goes away, but I did give input, so the restart timer should start from there.
Nevertheless, this should be fixed. I looked at the logind api... I guess easiest would be if Suspend() was a boolean that returned if it worked or not and then you could set another timer based on that. The api docs there don't explain the return type (or I don't see it). So either that or set a new timer right after running Suspend() that tries again if expired, and let that timer expire with PrepareForSleep(). So in case of proper suspend, it should get disabled right away. I didn't read related code, this is just my interpretation from the API docs if somebody wants to try it.
I've payed some more attention to this issue, and in fact, when the phone is suspending, the LED is not blinking from the suspend message.
What I'm running into frequently is:
media player running with screen off (listen to podcasts)
suspend is prevented
after ~ 1 minute the suspend notification causes the LED to blink
so this blinking is a bit annoying, since there is no new message and it's just always blinking when listening to media with screen off
I wonder if we can completely disable the suspend notification. As I wrote, I don't think it has much value on phones, and with the use case above it's more annoying than useful.
As soon as Phosh gets notification configuration support (see GNOME Control Center > Notifications), we can suppress the notification.
Create a patch which allow us to remove the the notification completely, not sure if we can upstream this.
I'm in favor of 1 since that's already there, we just need Phosh to implement the interfaces to control them and we can use the same gnome-settings-daemon on all kinds of devices, just shipping a config on phones to disable this notification.
Would it be possible to keep the notification with a different color ?
I think this is unintuitive and should be something users enable themselves if they want it. Many people probably don't understand the difference between the phone being inhibited and suspended. In addition to that, it won't work on all devices as some have single-coloured leds, or only two colours, or such. Maybe this could be something users can set up via postmarketOS Tweaks?
I think this is unintuitive and should be something users enable themselves if they want it
I don't like that notification at all, I find it annoying on a phone.
I would rather get rid of it as not a single phone has the behavior.
Would it be possible to keep the notification with a different color ?
Feedbackd is the place where to look for this.
However, this is marked as a regular notification so all regular notifications are visualized then like this.
I wonder if we can completely disable the suspend notification. As I wrote, I don't think it has much value on phones, and with the use case above it's more annoying than useful.
I don't like that notification at all, I find it annoying on a phone. I would rather get rid of it as not a single phone has the behavior.
I would personally like the notification to still appear. I'm often looking at my phone, say staring at a browser showing GPS updates while waiting for a delivery, and when the notification pops up it reminds me to touch somewhere to reset the sleep timer. If the phone suspended without the notification I would be annoyed.
If there's a way to have the notification appear but not trigger the flashing LED, that would be best for everyone, I think.
Administratorchanged title from Notification LED is always blinking during suspend (crust) to Notification LED is always blinking during inhibit·
Imported
changed title from Notification LED is always blinking during suspend (crust) to Notification LED is always blinking during inhibit