#
✕ nick:marcan
#asahi-dev · 2023-04-25 16:07
marcanthat looks like something goes very wrong with SMC or similar, on resume
#asahi-dev · 2023-04-25 16:07
marcanokay, we need any logs you managed to get from that then
#asahi-dev · 2023-04-25 16:05
marcanI wonder if it's something like gfx-asc goes down unexpectedly, it has a backdoor pipe to SMC, SMC is sending it notifications for some reason, the FIFO fills up and SMC panics and reboots the machine
#asahi-dev · 2023-04-25 16:02
marcansince I don't think gfx for die1 is used
#asahi-dev · 2023-04-25 16:02
marcanthough that might actually kind of break for die1, but that should only cause some warnings at most
#asahi-dev · 2023-04-25 16:01
marcanyeah, next to the other properties
#asahi-dev · 2023-04-25 16:01
marcanps_gfx should be in t600x-pmgr.dtsi
#asahi-dev · 2023-04-25 16:00
marcancat /proc/device-tree/compatible
#asahi-dev · 2023-04-25 15:59
marcancould be the GPU stuff is also breaking due to its power domain shutting down. can you add apple,always-on; to the ps_gfx power domain and see if that helps?
#asahi-dev · 2023-04-25 15:58
marcanis this with the GPU stuff?
#asahi-dev · 2023-04-25 15:57
marcanjust tested under the HV on the M1 Studio, warped time 10 hours forwards and nothing bad happened (kde on x11)
#asahi-dev · 2023-04-25 15:55
marcanwe don't know what we're looking for, anything that might be relevant :)
#asahi-dev · 2023-04-25 15:55
marcanX log, general syslog etc?
#asahi-dev · 2023-04-25 15:49
marcanI'm adding an explicit timewarp op to the HV so I can test this, but if it really has to do with time elapsed I can only guess it's a userland bug with the calendar time jumping somehow
#asahi-dev · 2023-04-25 15:41
marcanthat might be a good test
#asahi-dev · 2023-04-25 15:41
marcanI wonder if I can cheat it with the HV by adding time instead of subtracting time...
#asahi-dev · 2023-04-25 15:40
marcanaxboe: I think we're going to need more info/logs then... I don't have any good ideas of what to look for right now :/
#asahi-dev · 2023-04-25 15:30
marcanyeah :/
#asahi-dev · 2023-04-25 15:28
marcanso. not an issue but not what axboe is seeing either (assuming he wasn't running under the HV)
#asahi-dev · 2023-04-25 15:28
marcanyeah, just tested the userspace view, seems right now under the HV
#asahi-dev · 2023-04-25 15:27
marcanah ok
#asahi-dev · 2023-04-25 15:26
marcanor did you only see that under the HV?
#asahi-dev · 2023-04-25 15:26
marcanso... if timekeeping is actually stopping, why the hell is journald crashing?
#asahi-dev · 2023-04-25 15:25
marcan(plus it actually tests deep sleep under the HV which is always nice)
#asahi-dev · 2023-04-25 15:25
marcanshould also give a nice performance improvement on top even
#asahi-dev · 2023-04-25 15:24
marcanwith both of those no timestamp jump under the HV either, as expected
#asahi-dev · 2023-04-25 15:24
marcanyou also probably want hv.p.hv_set_time_stealing(0, 1) to prove that it isn't just time stealing warping time
#asahi-dev · 2023-04-25 15:24
marcan_jannau_: pushed a thing to fix this on the *kernel* side under the HV
#asahi-dev · 2023-04-25 15:17
marcanI might be able to cheat it
#asahi-dev · 2023-04-25 15:16
marcanbecause it basically triggers forever spurious wakeups, which will cause the kernel to repeatedly re-enable and re-disable timekeeping
#asahi-dev · 2023-04-25 15:16
marcanoh wait, this probably isn't going to ever work in the hypervisor
#asahi-dev · 2023-04-25 15:10
marcanso something is wrong
#asahi-dev · 2023-04-25 15:10
marcanno, they don't jump for me
#asahi-dev · 2023-04-25 15:09
marcanalso does the kernel log timestamp jump during suspend, or does it skip the time?
#asahi-dev · 2023-04-25 15:09
marcanbecause if it doesn't timekeeping is *definitely* stopping now
#asahi-dev · 2023-04-25 15:09
marcan_jannau_: does the smc power log stuff log during suspend?
#asahi-dev · 2023-04-25 15:08
marcanKnedlik: https://github.com/girish2k44/drmmodeset might help
#asahi-dev · 2023-04-25 15:08
marcanwhat.
#asahi-dev · 2023-04-25 15:08
marcanugh.
#asahi-dev · 2023-04-25 15:07
marcanKnedlik: that is a question with many answers...
#asahi-dev · 2023-04-25 15:07
marcanaxboe: we've long had that thing with systemd-journald crashing on long suspend due to some watchdog thing, but that's exactly what cpuidle should have fixed...
#asahi-dev · 2023-04-25 11:19
marcangood :)
#asahi-dev · 2023-04-25 11:09
marcanjannau: pushed a thing, let me know if it helps
#asahi-dev · 2023-04-25 10:49
marcanI can probably fastpath the cpuidle stuff a bit so at least it doesn't serialize
#asahi-dev · 2023-04-25 10:49
marcanthose normally don't serialize, but they do via the cpuidle stuff
#asahi-dev · 2023-04-25 10:48
marcanand on M1, the HV ends up interrupting the CPUs at 1000Hz anyway for dumb reasons
#asahi-dev · 2023-04-25 10:48
marcanok, that makes sense because it'll cause a ton of HV traps
#asahi-dev · 2023-04-25 08:15
marcannot sure why or if that's a regression
#asahi-dev · 2023-04-25 08:14
marcanalso I haven't tested on ultra but at least on M2 Max macos seemed to just... not use the pcores?
#asahi-dev · 2023-04-25 08:13
marcanfeel free to call cpufreq_init() in the hv init path if it helps

plus ›