#
#asahi-dev · 2025-05-06 14:11
flokliYup, and here is the watchdog firing at 240s. So that was the fix.
#asahi-dev · 2025-05-06 14:09
flokliand implementing the behaviour seems to work, at least it didn't get rebooted yet
#asahi-dev · 2025-05-06 14:09
flokliI agree on watchdog-core, but watchdog-kernel-api.rst, L197 says otherwise
#asahi-dev · 2025-05-06 14:01
jannaulooks like it won't work anyway (for systemd reboot) because something in userspace stops the watchdog during reboot
#asahi-dev · 2025-05-06 13:41
jannauin apple_wdt_set_timeout()? that looks like something watchdog-core should take care of
#asahi-dev · 2025-05-06 13:36
flokliyeah, looks like we need to use min(timeout_secs, max_hw_timeout_secs), which I didn't do. Will test with that patch and roll a v2.
#asahi-dev · 2025-05-06 13:15
flokliso there's something fishy with this patch
#asahi-dev · 2025-05-06 13:15
flokliwithout the kernel patch and setting a timeout of 90secs it does survive up to 70s (before I ctrl-c'ed it)
#asahi-dev · 2025-05-06 13:12
jannau60 seconds is the default value
#asahi-dev · 2025-05-06 13:11
jannaumaybe disable the watchdog first: `echo V > /dev/watchdog0`
#asahi-dev · 2025-05-06 13:09
flokliI guess I can retry with something like 90secs and without my patch. maybe some of the math, or reading the clk rate is already broken.
#asahi-dev · 2025-05-06 13:05
flokliHmmh, I wrote a small piece of code, arming it for 4mins, sleeping a sec, sending a heartbeat, then just sleeping inducethe process without sending heartbeats. But it did reboot after 60 seconds already for some reason
#asahi-dev · 2025-05-06 12:49
jannaudid you test whether it triggers?
#asahi-dev · 2025-05-06 12:48
jannauflokli: "Tested-by:" trailers from the patch author are implicit. I'll pick the change for the next downstream tag. for upstream it will be handled by Guenter (watchdog maintainer)
#asahi-dev · 2025-05-06 12:40
flokliSystemd doesn't complain anymore about not being able to set the 10min timeout
#asahi-dev · 2025-05-06 12:40
flokliIt's also running here and tested ofc, so when pulling, feel free to add a Tested-By from me
#asahi-dev · 2025-05-06 12:39
jannauflokli: patch looks good and recipients are as expected. thanks
#asahi-dev · 2025-05-06 12:37
chadmedit would measurably improve battery life on machines with spi hid if we dont need them
#asahi-dev · 2025-05-06 12:21
jannauI'm wondering whether the threaded irq handler isn't the problem and spi_hid should keep irqs disabled during spi transfers
#asahi-dev · 2025-05-06 12:19
jannauI've not fully reversed it. just to the point that I could read the messages (hv/trace_keyboard.py iirc). not sure that using sio is going to change something regarding the irq storms. it would reduce the amount of work per irq though
#asahi-dev · 2025-05-06 12:06
flokli(that's what I did, as that's what kernel contribution guidelines say)
#asahi-dev · 2025-05-06 12:05
floklijannau: max_hw_heartbeat_ms was right. Patch sent out, should be in your inboxes. Was a bit unsure which lists to cc, MAINTAINERS says you'd pick it into your tree and then eventually it'll be part of a request to pull for to a subsystem maintainer, yet lists are CCed even before so they can provide feedback?
#asahi-dev · 2025-05-06 11:48
svenlol
#asahi-dev · 2025-05-06 11:42
chadmedive been using my 14" again and was reminded as the machine got hot just typing a document :p
#asahi-dev · 2025-05-06 11:42
chadmedyeah i thought janne ended up finishing it
#asahi-dev · 2025-05-06 11:35
sveniirc povik wrote some SIO driver and tracer but I'm not sure if he bothered to figure out how it's connected to the SPI controller
#asahi-dev · 2025-05-06 11:19
chadmeddo we need to RE how all that works still?
#asahi-dev · 2025-05-06 11:19
chadmedjannau: will SIO help with the spi hid irq storm issue at all if we wire it up?
#asahi-dev · 2025-05-05 20:58
flokliThis is all a bit convoluted
#asahi-dev · 2025-05-05 20:57
flokliYou're right, this is a kernel-side software watchdog then ;-)
#asahi-dev · 2025-05-05 20:43
jannauthen watchdog_timeout_invalid() would take care of that
#asahi-dev · 2025-05-05 20:42
jannauflokli: isn't the problem that max_hw_heartbeat_ms isn't set?
#asahi-dev · 2025-05-05 20:08
sventhanks for checking!
#asahi-dev · 2025-05-05 19:44
floklisystemd of course could handle this a bit more graceful, and try to subsequently set smaller timeout if this happens, up to a certain minimum, but whether it should or not is really not an asahi question anymore.
#asahi-dev · 2025-05-05 19:43
floklirejecting it early on is probably more correct than hoping userspace (has time to and does) react on receiving a super short value as response.
#asahi-dev · 2025-05-05 19:43
floklisven: jannau: Regarding the watchdog max timeout, I did look a bit around in other drivers, and how it's used commonly. Even though the docs are a bit vague about this, common practice seems to be to return EINVAL if you're > max_timeout. And apple_wdt just uses code from watchdog_core.c to take care of that. It kinda makes sense, if userspace does set a super large value,
#asahi-dev · 2025-05-05 09:22
nickchanuh i don't think i could review the m1n1 chickens changes today either i will review later
#asahi-dev · 2025-05-04 18:16
nickchansven: i do think the CYC_OVRD_DISABLE_WFI_RET bit should be cleared on startup on cores that supports arch state retention
#asahi-dev · 2025-05-04 18:14
svenyeah, and also makes adding new things less scary because it's obvious to see what's going on
#asahi-dev · 2025-05-04 18:14
nickchantalking about midr comparisons
#asahi-dev · 2025-05-04 18:13
nickchanalso do
#asahi-dev · 2025-05-04 18:13
nickchanwhich this refractor als odo
#asahi-dev · 2025-05-04 18:13
nickchanthink it's a good idea to open code everything too since there's always some Apple Watch cores or ASC cores in the middle breaking the flfow
#asahi-dev · 2025-05-04 18:12
sven*<
#asahi-dev · 2025-05-04 18:12
svenespecially because with M4 we'd need && part <= T8132_DONAN all over the place
#asahi-dev · 2025-05-04 18:11
svensure, i just wanted to get rid of all these if (part >= WHATEVER && part != SOMETHING_ELSE)
#asahi-dev · 2025-05-04 18:09
nickchanand that horrdenously *broken* given that it's an arm64 core fabbed in 2012
#asahi-dev · 2025-05-04 18:09
nickchanat least no one should run m1n1 on Alcatraz (A7) A0
#asahi-dev · 2025-05-04 18:08
nickchansven: and a7-a11 cores definitely has more rev specific chickens it is just quite unlikely the chickens for previous revs will ever be used
#asahi-dev · 2025-05-04 18:03
nickchani will review chickens tomorrow

plus ›