#
✕ nick:marcan
#asahi-dev · 2023-04-18 09:44
marcan:D
#asahi-dev · 2023-04-18 09:10
marcanI only found this by looking at SMC firmware
#asahi-dev · 2023-04-18 09:09
marcanno, macos uses software handling like linux does AIUI
#asahi-dev · 2023-04-18 09:04
marcanthough drivers are allowed to round charge_control_end_threshold etc, so maybe we should just ditch the kernel handling entirely and just only allow setting 80 or 100 for that.
#asahi-dev · 2023-04-18 09:02
marcanmaybe charge_type = "long life" would sort of map to that, but it's intended to mean lower current charging, not outright limits :/
#asahi-dev · 2023-04-18 09:00
marcanmaybe we can do something like test the configured limits, and if they're lower or equal to that, just engage that mode in suspend
#asahi-dev · 2023-04-18 09:00
marcanunfortunately that doesn't merge well with the kernel API...
#asahi-dev · 2023-04-18 09:00
marcanbut I *think* CHWA=1 will limit charge to 75-80%
#asahi-dev · 2023-04-18 09:00
marcanunfortuantely it's not configurable
#asahi-dev · 2023-04-18 08:59
marcanhuh, I think I found an autonomous battery charge limit in SMC
#asahi-dev · 2023-04-18 08:32
marcancould also be a race/timing issue somehow
#asahi-dev · 2023-04-18 08:31
marcandoes the HV log any dangerous PMGR hooks during a suspend cycle?
#asahi-dev · 2023-04-18 08:31
marcanthis is what machine exactly?
#asahi-dev · 2023-04-18 08:17
marcanunless it's just another pmgr borkage
#asahi-dev · 2023-04-18 08:16
marcanjannau: is it the cpuidle thing breaking wakeup? I don't think we changed anything else :/
#asahi-dev · 2023-04-18 08:16
marcanjannau: pushed fix for the smc thing (only build tested)
#asahi-dev · 2023-04-18 08:11
marcanokay, that's weird
#asahi-dev · 2023-04-18 08:08
marcanokay
#asahi-dev · 2023-04-18 08:08
marcanohh wait yes obvious race
#asahi-dev · 2023-04-18 08:07
marcanactually wait, if the hid stuff is already probed there's no way that is the race
#asahi-dev · 2023-04-18 08:07
marcanjannau: can you print the rtkit message?
#asahi-dev · 2023-04-18 08:06
marcanso something is dodgy
#asahi-dev · 2023-04-18 08:06
marcanhowever, we only enable notifications *after* the init
#asahi-dev · 2023-04-18 08:06
marcanjannau: obvious race
#asahi-dev · 2023-04-18 07:25
marcanapple only touches DCS on t6001, not fabric, I completely guessed that one based on t602x (and I think they only do it when going into real suspend)
#asahi-dev · 2023-04-18 07:24
marcantry disabling that driver and seeing if that helps, or removing either of the named reg entries (which will disable that side)
#asahi-dev · 2023-04-18 07:24
marcanthat's why I do that in noirq, when everything else should be shut down
#asahi-dev · 2023-04-18 07:24
marcanit also breaks DCP if left enabled (not enough bandwidth for the display presumably)
#asahi-dev · 2023-04-18 07:23
marcanthe system pstate stuff I did might be breaking things on t6001, it was a bit dodgy (that's why there's that min pstate thing, lower hangs for me)
#asahi-dev · 2023-04-18 07:21
marcanjannau: dynamic backlight. VTs are dark.
#asahi-dev · 2023-04-18 04:22
marcansince the FIFO is huge enough to whole whole packets, no need for IRQs
#asahi-dev · 2023-04-18 04:22
marcanactually no, that wouldn't reduce IRQs, just MMIO traffic
#asahi-dev · 2023-04-18 04:21
marcan(which we don't right now)
#asahi-dev · 2023-04-18 04:21
marcanbut we can reduce that one even further by supporting memory buffers
#asahi-dev · 2023-04-18 04:21
marcanshould be better on t602x already with MTP though
#asahi-dev · 2023-04-18 04:21
marcanyeah, I need to look into that again
#asahi-dev · 2023-04-18 04:20
marcanbut I assume linux cpuidle can do better (if given appropriate data)
#asahi-dev · 2023-04-18 04:20
marcanmacOS doesn't actually do any cpuidle handling, it just uses auto mode and lets the CPU decide with its own heuristic :)
#asahi-dev · 2023-04-18 04:19
marcanchadmed_: also the power/exit latency numbers in the cpuidle stuff are BS, I should actually measure that
#asahi-dev · 2023-04-18 04:15
marcanif cur_freq says it's hitting them then it's hitting them (that comes from feedback from the hardware)
#asahi-dev · 2023-04-18 04:14
marcan(otherwise boost won't engage)
#asahi-dev · 2023-04-18 04:14
marcanmight want to play games with core pinning to make sure all but one core in a cluster really are idle, for benchmarking purposes
#asahi-dev · 2023-04-18 04:13
marcanyou might need to explicitly enable boost/turbo in sysfs
#asahi-dev · 2023-04-18 04:13
marcanI think so yeah
#asahi-dev · 2023-04-18 04:11
marcan(the #if 0'd out ones)
#asahi-dev · 2023-04-18 04:11
marcanheh, now that we have cpuidle we're going to need microwatt numbers for the higher pstates too ;)
#asahi-dev · 2023-04-18 04:09
marcangot a branch?
#asahi-dev · 2023-04-18 04:09
marcanyeah :)
#asahi-dev · 2023-04-18 04:08
marcannope
#asahi-dev · 2023-04-18 04:07
marcanneed to get more of that in

plus ›