Right now we have a suspend time of 15 minutes. Some time after the v21.03 release is out, we can look into reducing the suspend time to something more radical like 1 minute on edge. This should increase battery lifetime, especially when just waking the phone to quickly check the time.
Once we do this, we'll probably discover that a lot of apps need a proper inhibitor to prevent the phone from suspending when it should not, and we can fix that up.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items 0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items 0
Link issues together to show that they're related.
Learn more.
I'm not very familiar with how g-c-c works, but would it be feasible to display different values depending on chassis type? E.g. only show these values with chassis set to handset.
Depending on the type of chassis, setting different values may not make sense, at least that's what upstream thinks.
For example:
Phone/Tablet: autosuspend automatically when not plugged in after X seconds
Desktop: show the autosuspend settings
On Sailfish OS, there's a display sleep setting (dropdown) to configure how long the display must stay on.
The device sleeps as soon as the displays is turned off.
Once we do this, we'll probably discover that a lot of apps need a proper inhibitor to prevent the phone from suspending when it should not, and we can fix that up.
I have been experimenting with this already in the past (30s instead of 1min), works fine for most things.
I had an issue with the modem because of this, but I already fixed that upstream in the latest eg25-manager: https://gitlab.com/mobian1/devices/eg25-manager/-/merge_requests/7
The biggest downside to this is that wifi reconnect sucks. In my experiece, it's easily longer than the 30 second sleep timeout. So it seems like it would be possible for the phone to wake from sleep, then go back to sleep again before wifi can even reconnect :P
But the real annoyance with this is having to wait a lot more often for wifi to reconnect since it essentially gets disconnected after every sleep cycle, which would now be 30 seconds.
FWIW, I noticed that vlc doesn't prevent suspend while media is playing. I wonder if it works with lollypop, didn't test it yet.
postmarketos-base depends on sleep-inhibitor, which can be easily extended to make sure we don't sleep when certain apps are open. (Yes, a python app that postmarketos-base depends on. Not great from that aspect, but that's a different topic. The program works well.)
I wonder if it works with lollypop, didn't test it yet.
When I tested it Lollypop was able to inhibit suspend. I had it playing music for like an hour (not charging, suspend time set to 15 minutes) without touching it and the music wasn't interrupted at all.
postmarketos-base depends on sleep-inhibitor, which can be easily extended to make sure we don't sleep when certain apps are open. (Yes, a python app that postmarketos-base depends on. Not great from that aspect, but that's a different topic. The program works well.)
I made a mistake there, sleep-inhibitor is not in postmarketos-base directly. it's in postmarketos-base-elogind, which only gets installed if elogind is installed too.
VLC supposedly supports a MPRIS dbus interface, I found something someone made that can query status, maybe this could be used/adapted?
But for users it's not obvious yet that they can configure this. I think we should either choose a smaller default value than 15 minutes and/or mention in the welcome screen that this can be adjusted and makes a huge difference in battery time.
Would it be reasonable to add the patch from @craftyguy which was rejected upstream to our g-c-c fork (making it even more aggressive)? That fork is unfortunately not going away anytime soon, and would allow for users to use the regular settings app for that. Although that would only fix the issue for GNOME/Phosh users.
The patch doesn't set a default, it just 'exposes' more options for folks to select.
Looking at the G-C-C source, suspend doesn't appear to be enabled by default at all either. I don't think we want to enable it by default, some devices (e.g. Librem 5) have serious issues with suspend/resume.
@ollieparanoid I believe you set the milestone to v21.12, do you have any thoughts about what specifically should be included in v21.12?
Is it sufficient to just add my patch to our fork of G-C-C to give more options for users to select for suspend time (this would NOT: 1) enable suspend by default, or 2) select one of the lower time options by default) ?
EDIT: afaik, the default is currently suspend enabled after 15 minutes?
I think we shouldn't patch G-C-C for that, as we have the option in postmarketos-tweaks now.
If we include this in v21.12, I would set the default timeout to something lower than 15 minutes. (And as usually, this change should go through edge first). But I'm not sure we should do that. I have set it to 1 minute and it works great on my pinephone, except that wifi takes long to reconnect.
Personally I'd leave it at 15 minutes at least for this release, it's easy to change the setting in pmOS tweaks. But I don't have a strong opinion on this, if somebody would rather have it lower, let's talk about it.
I think @MartijnBraam wanted to tweak the default and so I assigned you when we talked about it in the meeting, correct me if I'm wrong.
Make a new patch setting the default timeout to... 2 minutes? something else?
@ollieparanoid @MartijnBraam thoughts? I think we should do this before the first 21.12 images are ready for testing... even though the change is relatively trivial, the 'user experience' of having a shorter timeout needs to be tested I think. I run my pinephone with a timeout of 2 minutes, and sometimes it feels too short (especially with the wifi reconnect penalty)
On one hand, I'd avoid adding more patches than necessary, on the other we have forked g-c-c anyway with 8 patches already and this does improve user experience a little, by not having different options than in tweaks. So I'd say it's reasonable to add this patch, not much additional maintenance, and if we need to drop it at some point, not much is lost. Fine with me.
(For people reading along, FYI the process is to get the patch through edge first, then backport to v21.12.)
I've noticed that apparently "5 minutes" is already available in g-c-c btw.
FWIW, when changing the timeout with the tweaks app, where 1 minute, 2 minutes etc. are selectable, then going to g-c-c, it displays the selected time. But when changing it to another value, closing g-c-c and starting it up again, of course the value that was available is gone. (I was interested in seeing if it crashes, that's why I tried it out.)
Make a new patch setting the default timeout to... 2 minutes? something else?
Two minutes sounds good! If people find it too short, they can easily change it. We can mention it in the release post so people are aware.
I think we should do this before the first 21.12 images are ready for testing...
Looks like that's too late now; but we can still ask people to test with that change, even if it's not in the default of the first test image.
I wonder what other phones than the pinephone do if this is set to let's say 2 minutes btw. Does the Librem 5 simply not suspend at all? What do the androids do?
There will be limited benefits only from suspend on most devices at the moment. Especially for older Qualcomm platforms, power saving/suspend was never the focus on mainline Linux so there is still a lot of work needed to make it work. Currently the main effect would likely be only a very slight power saving improvement with the potential risk of never getting the phone to wake up again. :S
I wonder what other phones than the pinephone do if this is set to let's say 2 minutes btw. Does the Librem 5 simply not suspend at all? What do the androids do?
I have suspend disabled in the L5 kernel currently, because the device always fails to resume from suspend.
So having it set to 2 minutes, or anything really is a noop on that device.
So I'd say it's reasonable to add this patch, not much additional maintenance, and if we need to drop it at some point, not much is lost. Fine with me.