#
#asahi · 2023-03-06 23:52
j`ey_was just thinking if youw anted to try hack the idle stuff, that shouldnt matter
#asahi · 2023-03-06 23:52
j`ey_yup
#asahi · 2023-03-06 23:52
mort_I want the GPU stuff which requires rust afaik
#asahi · 2023-03-06 23:51
j`ey_if you hack it to not build the edge version, you wont need the rust stuff
#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 23:06
Retr0idthanks, spotify was my original goal tbh
#asahi · 2023-03-06 23:06
ah-_Retr0id: awesome, spotify works with that!
#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:05
j`ey_https://lore.kernel.org/linux-arm-kernel/20230204152747.drte4uitljzngdt6@kazuki-mac/ and https://lore.kernel.org/linux-arm-kernel/20230214215003.70683-1-kazukih0205@gmail.com/ mort_
#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
svenif I weren’t writing hardware drivers I’d probably use virtualization instead
#asahi · 2023-03-06 22:02
mort_very sensible
#asahi · 2023-03-06 22:01
svenone for development and one where I run the kernels on
#asahi · 2023-03-06 22:01
svenyeah, I have two machines
#asahi · 2023-03-06 22:01
j`ey_they dont make the target and dev machine the same computer!
#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:56
Retr0idHere's my widevine fixup script, if anyone is interested: https://gist.github.com/DavidBuchanan314/c6b97add51b97e4c3ee95dc890f9e3c8
#asahi · 2023-03-06 21:55
mort_which the generic arm64 code handles in cpu_do_idle
#asahi · 2023-03-06 21:53
sven„wait for interrupt“
#asahi · 2023-03-06 21:52
svenwfi is a cpu instruction
#asahi · 2023-03-06 21:52
mort_wfi, sorry, misread
#asahi · 2023-03-06 21:52
svennot wifi
#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:52
svenmort_: sure, I dunno how complex that fix would be though
#asahi · 2023-03-06 21:51
svenyou really just need „wfi“ for s2idle and the code should already do that
#asahi · 2023-03-06 21:49
svenpovik: yes, typing from a phone here and I guess autocorrect somehow ate the „not“
#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:40
poviksven: to clarify, you meant to write it's *not* about poking hardware, right?
#asahi · 2023-03-06 21:32
mort_I read marcan proposed doing that
#asahi · 2023-03-06 21:30
svenyou could probably write a dummy driver that essentially does nothing and make it work as a hack
#asahi · 2023-03-06 21:29
svenit’s about poking hardware, it’s just that the suspend code path expects a cpuidle driver to work correctly
#asahi · 2023-03-06 21:24
opticronno idea
#asahi · 2023-03-06 21:19
mort_can we make a userspace thing poke the right hardware?
#asahi · 2023-03-06 21:19
opticronbut I also think that's one of multiple possible solutions
#asahi · 2023-03-06 21:19
mort_and the difficulty is in doing that in an upstreamable way
#asahi · 2023-03-06 21:18
opticronso you'd need a custom one specifically for AS to make that happen
#asahi · 2023-03-06 21:18
mort_ah
#asahi · 2023-03-06 21:18
opticronmort_, iirc, the default cpuidle driver doesn't poke the things necessary on apple hardware to turn that clock off
#asahi · 2023-03-06 21:17
opticronI should have just spun up a VM to do it
#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 21:17
confusomuyeah, installing it isn't user friendly

plus ›