#
✕ nick:mort_
#asahi · 2023-03-07 10:37
mort_the logic is pretty much, "Here's the set of PSCI idle states", not "Here's the list of idle states, this one and that one happens to use PSCI"
#asahi · 2023-03-07 10:35
mort_I don't see a clean way to make that code add a wfi idle state without possibly breaking existing devicetrees or at least making kinda semantically weird changes to make psci code card about wfi
#asahi · 2023-03-07 10:34
mort_the issue is, at the moment, all devices with additional psci devices get wfi for free, it's not listed in the devicetree anywhere; and all the logic to add idle states from the devicetree are highly psci specific and the function has psci in the name
#asahi · 2023-03-07 10:17
mort_then if that was ever to be upstreamed I suppose we'd need to add another devicetree thing which lets you opt in to using the cpuidle-arm driver despite not having additional idle states, as it is it would try to activate on any system if the aforementioned check is removed
#asahi · 2023-03-07 10:16
mort_well, just remove the code which says, "if there was no additional idle states in the devicetree, don't activate the driver"
#asahi · 2023-03-07 10:08
mort_so I didn't get to test whether the idle thing actually worked or not before going to sleep
#asahi · 2023-03-07 10:07
mort_I made a kernel like that yesterday but I must've messed up building it somehow, everything worked including sddm except that plasma failed to start due to a bunch of Qt errors..
#asahi · 2023-03-07 10:06
mort_chadmed: yes, but it gets those idle states from the devicetree: and it has a hard coded wfi idle state that doesn't rely on psci. If there was a way to tell it to activate, but not give it any idle states other than the default wfi one, I don't see any reason why it wouldn't work
#asahi · 2023-03-07 10:02
mort_sven: the issue that it doesn't work without a cpuidle driver is in the core code, I'm looking at maybe being able to use the cpuidle-arm driver on the M1
#asahi · 2023-03-06 23:54
mort_I'm guessing it'll work if I get an old rust toolchain, but man do I find rust annoying to work with -- in general, not just in the kernel
#asahi · 2023-03-06 23:52
mort_I want the GPU stuff which requires rust afaik
#asahi · 2023-03-06 23:50
mort_https://p.mort.coffee/FB2 I guess I'm not doing this
#asahi · 2023-03-06 23:38
mort_Though then the driver would probably always be enabled, even when there's a better match? We'll need a way for the device tree to say, "I have no more idle states to provide, just use the wfi one; but I do support the arm_idle driver"
#asahi · 2023-03-06 23:35
mort_it seems to me like the arm cpuidle driver could be changed pretty easily to support arm devices without more idle states than wfi. I believe it would sort of just work if we remove this check: https://github.com/torvalds/linux/blob/8ca09d5fa3549d142c2080a72a4c70ce389163cd/drivers/cpuidle/cpuidle-arm.c#L97-L100
#asahi · 2023-03-06 22:36
mort_oh, no, that does seem to assume psci, at least the idle-states devicetree node requires idle-states = "psci"
#asahi · 2023-03-06 22:32
mort_I'll throw some idle states compatible with arm,idle-state at the devicetree and see what happens
#asahi · 2023-03-06 22:31
mort_sven: do you know why we can't use the cpuidle-arm driver? It seems extremely generic, and seems to only assume the wfi idle state
#asahi · 2023-03-06 22:28
mort_or, I suppose it would be acceptable if there's a dummy cpuidle driver
#asahi · 2023-03-06 22:06
mort_yeah I saw that, those patches are going in the wrong direction imo
#asahi · 2023-03-06 22:04
mort_I feel like this sleep mode stuff might be both close to my skill level (i.e not very difficult) and the most important blocker for me to seriously use asahi on my laptop so I think I'll actually try to fix it, and see if I can get anywhere before someone else has fixed the psci stuff
#asahi · 2023-03-06 22:02
mort_very sensible
#asahi · 2023-03-06 22:00
mort_sven: how do you people usually do it? Do you do virtualization or do you compile your new kernel, install it, reboot and pray for the best?
#asahi · 2023-03-06 22:00
mort_I'm used to messing with the kernel and adding prints and stuff to dig into how stuff works but I'm not really used to doing that when the target machine and the dev machine is the same computer...
#asahi · 2023-03-06 21:55
mort_which the generic arm64 code handles in cpu_do_idle
#asahi · 2023-03-06 21:52
mort_wfi, sorry, misread
#asahi · 2023-03-06 21:52
mort_even if wifi didn't get turned off -- even if no hardware was disabled at all -- working s2idle would be useful simply because that stupid tracking script in that tab in firefox would no longer eat your CPU
#asahi · 2023-03-06 21:48
mort_wouldn't it make sense to look at making an upstreamable fix for that, rather than to block sleep behind getting cpuidle-psci to work with the M1?
#asahi · 2023-03-06 21:45
mort_if that assumption is correct, it seems like a rather serious bug in Linux that it doesn't handle s2idle on devices without a cpuidle driver, since the whole point of s2idle is that it shouldn't require entering an actual CPU idle state
#asahi · 2023-03-06 21:42
mort_I'm guessing the job of a cpuidle driver is to do all the stuff that's required to put a CPU into an idle state; and that we don't actually need that for s2idle, since the normal power management stuff does it pretty well when the CPU is in its normal state
#asahi · 2023-03-06 21:32
mort_I read marcan proposed doing that
#asahi · 2023-03-06 21:19
mort_can we make a userspace thing poke the right hardware?
#asahi · 2023-03-06 21:19
mort_and the difficulty is in doing that in an upstreamable way
#asahi · 2023-03-06 21:18
mort_ah
#asahi · 2023-03-06 21:17
mort_what exactly is the mechanism which makes a cpuidle driver necessary for the monotonic clock to stop during s2idle?
#asahi · 2023-03-06 20:57
mort_I don't know the details of why systemd breaks when the monotonic clock is running during sleep
#asahi · 2023-03-06 20:52
mort_specifically, it keeps the monotonic clock going, so Linux will report to userspace that time has passed according to the monotonic clock during sleep, which apparently systemd doesn't like
#asahi · 2023-03-06 19:40
mort_I love that when plasma crashes, I can just kstart5 plasmashell even if on wayland. When gnome crashes I'm booted to gdm unless I'm running X11
#asahi · 2023-03-06 18:40
mort_mixi: that's really good info which should provably be part of the mastodon discussion
#asahi · 2023-03-06 18:30
mort_lucenera: It is. There are some environment settings you can set to trick Firefox into thinking the GPU supports a newer OpenGL than it actually reports, which will make Firefox enable hw accelerated WebRender
#asahi · 2023-03-06 17:22
mort_https://vt.social/@lina/109976892758680822
#asahi · 2023-03-06 17:20
mort_Oh, I remember! Lina figured out that Chromium assumes a 4k buffer size for some networking stuff, and it's 16k on Asahi because the kernel gives you page-sized buffers
#asahi · 2023-03-06 17:16
mort_Lina has been writing about WebRTC issues lately, mostly with Firefox but there was something with Chromium too
#asahi · 2023-03-06 14:41
mort_I got a plugin to automatically select a higher resolution, but it's weird since I haven't had that issue with other systems. Maybe it detects that it's software decoded instead of hardware decoded and chooses a lower quality based on that?
#asahi · 2023-03-06 14:39
mort_speaking of resolutions, I've noticed that YouTube defaults to really low resolutions like 480p on asahi, even though the machine is more than capable of playing 4k
#asahi · 2023-03-06 14:36
mort_so many websites work perfectly fine as long as you pretend to be using some Google product
#asahi · 2023-03-06 14:35
mort_what's up with user agent sniffing, why do companies still do ith
#asahi · 2023-03-06 14:35
mort_I actually just ended up using YouTube Music instead of Spotify, YouTube Music apparently works without DRM
#asahi · 2023-03-06 13:14
mort_the DRM situation is so dreadful, it could never be good but Google's handling of widevine makes it so much worse than it has to be
#asahi · 2023-03-06 13:12
mort_ah widevine depends on DL_RELR support from the lbic doesn't it
#asahi · 2023-03-06 13:11
mort_glibc-widevine? What relationship does glibc and widevine have?

plus ›