#asahi · 2024-02-25 12:27
j`eyIs that much different than just having the WM/DE always open ff?#asahi · 2024-02-25 12:26
mort_I guess I could work around this in userspace instead, make firefox save its session, then power off in a way which tells the system to auto power on and open firefox on the next boot#asahi · 2024-02-25 12:25
svenif it was very easy it would already be supported#asahi · 2024-02-25 12:23
mort_meh it seems like hector martin has already commented on hibernate a few times and there are challenges there too#asahi · 2024-02-25 12:20
mort_*if* my understanding is correct that suspend-to-disk is more or less handled generically by the kernel, it could be an interesting stop-gap for those of us who want to be able to not wake up to a dead laptop in the morning even as perfect s2idle is a work in progress#asahi · 2024-02-25 12:19
chadmed^^#asahi · 2024-02-25 12:19
chadmedkettenis: yeah well thats what we did in our idle driver but thats never ever getting upstreamed :p#asahi · 2024-02-25 12:19
j`eywell upstream is the problem :P#asahi · 2024-02-25 12:19
kettenischadmed: technically there is no problem for just adding code in Linux to turn off the P-clusters#asahi · 2024-02-25 12:18
j`eyI prototyped this, with efi and keeping m1n1 in memory and stuff, was fun, but very hacky#asahi · 2024-02-25 12:18
j`eywell the problem there is how to hanlde PSCI in the same EL#asahi · 2024-02-25 12:18
chadmedso its not a problem we dont know how to fix, we just need to actually do it #asahi · 2024-02-25 12:18
chadmediirc we need psci to turn the clusters off and restore them or something like that#asahi · 2024-02-25 12:17
mort_and I'm not blind to the fact that work on general PM means better battery performance in both s2idle *and* in normal tasks, while work on s3 sleep would benefit only sleep#asahi · 2024-02-25 12:17
chadmedthe main power hogs during s2idle right now are the pcore clusters anyway#asahi · 2024-02-25 12:16
mort_and perfect s2idle might very well be the right approach for Asahi, especially given that the set of hardware is so limited#asahi · 2024-02-25 12:16
chadmedif we were trying to support some bumass thinkpad or asus motherboard youd have a point though#asahi · 2024-02-25 12:15
chadmedi mean, the hardware we're working with is clearly capable of doing it. it's not like we're trying to work with fundamentally broken hardware or firmware implementations that cant handle perfect s2idle#asahi · 2024-02-25 12:15
mort_just that, I believe that this idea of "we can just make sure every driver perfectly implements power management and do s2idle" is a common trend in the industry and is responsible for quite a lot of grief#asahi · 2024-02-25 12:14
mort_to be clear, I am not saying "the Asahi Linux project should implement s2ram"#asahi · 2024-02-25 12:14
chadmedit literally does not matter in the slightest how the platform is suspended when all the drivers are just gated behind PM_SLEEP and not any particular implementation of "sleep"#asahi · 2024-02-25 12:13
chadmedthey just lead to arguments like this #asahi · 2024-02-25 12:13
chadmedwhich is what i was getting at when saying that acpi power states as a frame of reference are unhelpful and a bad idea#asahi · 2024-02-25 12:13
chadmedj`ey: of course but at the point where we're splitting hairs over what exactly is slept and how is totally irrelevant so long as the end result is good sleep #asahi · 2024-02-25 12:11
mort_the bug I mentioned with my previous laptop would at least happen while the kernel was suspending, and I could be relatively sure that once it was actually suspended, it would stay that way#asahi · 2024-02-25 12:11
j`eybetter sleep :P#asahi · 2024-02-25 12:11
mort_well#asahi · 2024-02-25 12:10
chadmedthen what exactly is the point here? #asahi · 2024-02-25 12:09
mort_but no, I don't trust that either, my previous laptop would sometimes randomly just get super hot when I closed the lid and then not come to life again until I held down the power button#asahi · 2024-02-25 12:09
chadmeds2ram would require even more kernel intervention on this platform because we cant simply call into firmware to do the last few bits for us in fact#asahi · 2024-02-25 12:08
chadmedthe codepaths would be exactly the same for s2ram and s2idle#asahi · 2024-02-25 12:08
mort_I trust a kernel that's not running more than I trust a kernel that is to some extent running#asahi · 2024-02-25 12:07
chadmedand yet you trust us to emulate ACPI power states?#asahi · 2024-02-25 12:07
mort_I have sooooo much experience with random kernel bugs on various bits of hardware causing things like lock-ups and kernel memory leaks and whatever else#asahi · 2024-02-25 12:06
mort_regardless I trust Linux to be bug-free even less than I trust NT to be bug-free#asahi · 2024-02-25 12:05
kettenisand it is entirely unspecified *what* the OS is responsible for#asahi · 2024-02-25 12:05
mort_chadmed: those bugs in Windows wouldn't be possible if Windows wasn't running because only the RAM was powered on#asahi · 2024-02-25 12:05
chadmedshitty buggy winblows code and shitty buggy ACPI BIOS code have nothing to do with us#asahi · 2024-02-25 12:05
chadmedthis has been proven time and time again #asahi · 2024-02-25 12:05
kettenisthe OS is still responsible for turning off tons of stuff first#asahi · 2024-02-25 12:05
chadmedno, thats bugs in windows #asahi · 2024-02-25 12:05
mort_"everything is turned off except for RAM" is a fairly decent guarantee isn't it?#asahi · 2024-02-25 12:05
mort_this kind of thinking is what causes even Windows laptops these days to randomly just get super hot in your backpack because some driver messed up a power management thing#asahi · 2024-02-25 12:05
ketteniswell, even ACPI S3 doesn't give you those guarantees#asahi · 2024-02-25 12:04
mort_it's true that s2ram is in principle no better than s2idle + perfect power management in all drivers for all hardware, but there's something to be said about guarantees here#asahi · 2024-02-25 12:04
kettenisthe only real difference between suspend-to-RAM and suspend-to-idle is that you hand off to some lower-power CPU to turn off the last few things#asahi · 2024-02-25 12:02
j`eyand being to actually turn off CPUs would be nice#asahi · 2024-02-25 12:02
chadmeds2idle Shouldn't(tm) be materially worse than STR in any case. our issue is not something innate to s2idle but rather that some stuff isn't being quiesced/put into low power states#asahi · 2024-02-25 11:59
mort_Phoronix says suspend to disk for ARM64 was added in 4.7#asahi · 2024-02-25 11:58
mort_https://patchwork.kernel.org/project/linux-arm-kernel/patch/1448559168-8363-11-git-send-email-james.morse@arm.com/ is probably a better link