#
…

2023-04-18

00:22baozich1 has joined #asahi-dev
00:22baozich has quit [Read error: Connection reset by peer]
00:22baozich1 is now known as baozich
00:26nsklaus has quit [Quit: ZZZzzz…]
00:26nsklaus has joined #asahi-dev
00:42nsklaus has quit [Ping timeout: 480 seconds]
01:15maria285474 is now known as maria
01:15user982492 has joined #asahi-dev
02:00gabuscus has quit []
02:13gabuscus has joined #asahi-dev
02:15salimterryli has quit [Remote host closed the connection]
02:35nicolas17 has quit [Quit: Konversation terminated!]
02:47pg12 has joined #asahi-dev
02:48pg12_ has quit [Ping timeout: 480 seconds]
03:05user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
03:38user982492 has joined #asahi-dev
03:49salimterryli has joined #asahi-dev
03:51marcanchadmed: now that it's fully charged, I'm getting 22 hours screen off idle (with no peripherals connected) on t6000, so something is wrong if you only get 11h
03:51marcan35 hours in sleep mode
03:52marcan(s2idle)
03:53marcanthe MCC stuff should be at the *lower* level right now, if anything what macOS does is boost it when some cores are fast, but I never saw a difference in benchmarks so I didn't bother
04:05chadmed_marcan: at work but did some sneaky ssh, battery currently at 60% with ~11 hr left in it
04:06marcanthat sounds more like it
04:06chadmed_so mustve just been me doing stuff around the desktop with the screen on this morning
04:06chadmed_pretty good
04:06chadmed_power draw is about 3 W with the screen off
04:07marcanyeah, 3.2W here
04:07marcan1.9W in s2idle
04:07marcanso at least *some* device PM is helping significantly already :)
04:07marcanneed to get more of that in
04:08chadmed_you havent got the EAS stuff merged in yet right
04:09chadmed_might be fun to do some desktop use type testing to see what difference that makes with cpuidle
04:09marcangot a branch?
04:11chadmed_https://github.com/chadmed/linux/tree/eas-v2 only needs the latest commit on top of 6.2 because that silly regulator stuff got fixed
04:11chadmed_those values should be accurate now, all that interactivity hitching goes away with menu governor and cpuidle
04:11marcanheh, now that we have cpuidle we're going to need microwatt numbers for the higher pstates too ;)
04:11marcan(the #if 0'd out ones)
04:12chadmed_should they Just Work(tm) now with the #if 0 removed or is there more work to get htem to actually hit
04:12chadmed_i can test tonight but i was gonna get numbers for t6020
04:13marcanI think so yeah
04:13marcanyou might need to explicitly enable boost/turbo in sysfs
04:14marcanmight want to play games with core pinning to make sure all but one core in a cluster really are idle, for benchmarking purposes
04:14marcan(otherwise boost won't engage)
04:15marcanif cur_freq says it's hitting them then it's hitting them (that comes from feedback from the hardware)
04:19marcanchadmed_: also the power/exit latency numbers in the cpuidle stuff are BS, I should actually measure that
04:20marcanmacOS doesn't actually do any cpuidle handling, it just uses auto mode and lets the CPU decide with its own heuristic :)
04:20marcanbut I assume linux cpuidle can do better (if given appropriate data)
04:21chadmed_if we can somehow reduce the number of interrupts fired by the touchpad the pcores would barely ever wake up at the desktop
04:21marcanyeah, I need to look into that again
04:21marcanshould be better on t602x already with MTP though
04:21marcanbut we can reduce that one even further by supporting memory buffers
04:21marcan(which we don't right now)
04:22marcanactually no, that wouldn't reduce IRQs, just MMIO traffic
04:22marcansince the FIFO is huge enough to whole whole packets, no need for IRQs
04:32user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
04:49abd has joined #asahi-dev
04:50jannauI'm seeing 4.8W here on t6001, screen off, nothing connected, logged in via ssh
04:54jannau11h idle time from 85% charge state
05:03jannaudoesn't wake up from suspend
05:25jannau4.2W in s2idle with HV and no_console_suspend
05:27jannauwakeup of course works in this config
05:43cylm_ has joined #asahi-dev
05:44cylm has quit [Ping timeout: 480 seconds]
05:49jannauand why is my hw uart broken? usb-pd reset works, looks like the device is not sending any data
05:54jannauand the studio is again in the state where the aqantia pcie link doesn't come up
06:03kedde2 has joined #asahi-dev
06:03jannauserial works if I let m1n1 boot and connect the usb-c afterwards
06:04jannauunfortunately no hints why wakeup is broken on the serial
06:04drubrkletern has quit [Remote host closed the connection]
06:10kedde3 has joined #asahi-dev
06:11raveling has joined #asahi-dev
06:12kedde2 has quit [Ping timeout: 480 seconds]
06:14abd has quit [Ping timeout: 480 seconds]
06:32chadmed_ has quit [Quit: Page closed]
06:55jannauany volunteers for teaching powertop to handle clusters correctly?
06:56jannaulooking at the idle stats it looks like linux keeps one performance core not idle
06:57raveling has quit [Ping timeout: 480 seconds]
06:57jannaubut I'm seeing now 6.3W power use with screen off
07:07jannauswitching from sddm to a vt with power logging reduces the sys power use from ~10.5W to ~8.5W
07:08CoolStar has quit [Ping timeout: 480 seconds]
07:09CoolStar has joined #asahi-dev
07:20bps has joined #asahi-dev
07:21marcanjannau: dynamic backlight. VTs are dark.
07:23marcanthe 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)
07:24marcanit also breaks DCP if left enabled (not enough bandwidth for the display presumably)
07:24marcanthat's why I do that in noirq, when everything else should be shut down
07:24marcantry disabling that driver and seeing if that helps, or removing either of the named reg entries (which will disable that side)
07:25marcanapple 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)
07:31bps has quit [Read error: Connection reset by peer]
07:31bps has joined #asahi-dev
07:33raveling has joined #asahi-dev
07:41bps2 has joined #asahi-dev
07:41bps has quit [Ping timeout: 480 seconds]
07:55bps has joined #asahi-dev
07:55bps2 has quit [Read error: Connection reset by peer]
08:03jannaumarcan: I'm seeing following smc splat on boot with APPLE_SMC and various MACSMC options built-in: https://gist.github.com/jannau/953f3c37056dab2ce935543e42f32ed7
08:06marcanjannau: obvious race
08:06marcanhowever, we only enable notifications *after* the init
08:06marcanso something is dodgy
08:07marcanjannau: can you print the rtkit message?
08:07marcanactually wait, if the hid stuff is already probed there's no way that is the race
08:08marcanohh wait yes obvious race
08:11jannauwakeup is even broken without APPLE_PMGR_MISC
08:11marcanokay, that's weird
08:14jannaupower button works before suspend
08:16marcanjannau: pushed fix for the smc thing (only build tested)
08:16marcanjannau: is it the cpuidle thing breaking wakeup? I don't think we changed anything else :/
08:17marcanunless it's just another pmgr borkage
08:22chadmedalmost 12 hours off charge and only 60% of the battery gone
08:25nyilas has joined #asahi-dev
08:25jannauwakeup still broken with APPLE_CPUIDLE disabled
08:27jannauI do not use s2idle so the lat time I tested was before the mailbox rewrite. strange though that it works in the HV
08:31marcanthis is what machine exactly?
08:31marcandoes the HV log any dangerous PMGR hooks during a suspend cycle?
08:32marcancould also be a race/timing issue somehow
08:34_jannau_j314c 14" M1 Max mbp
08:36kaazoo has left #asahi-dev [#asahi-dev]
08:37nsklaus has joined #asahi-dev
08:37_jannau_have to try if any of the PMGR hooks trigger during suspend
08:59marcanhuh, I think I found an autonomous battery charge limit in SMC
09:00marcanunfortuantely it's not configurable
09:00marcanbut I *think* CHWA=1 will limit charge to 75-80%
09:00marcanunfortunately that doesn't merge well with the kernel API...
09:00marcanmaybe we can do something like test the configured limits, and if they're lower or equal to that, just engage that mode in suspend
09:02marcanmaybe charge_type = "long life" would sort of map to that, but it's intended to mean lower current charging, not outright limits :/
09:04marcanthough 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.
09:09dottedmagmarcan: that's the charge limit applied my macos, right?
09:09marcanno, macos uses software handling like linux does AIUI
09:10marcanI only found this by looking at SMC firmware
09:35c10l has quit [Quit: Bye o/]
09:37chadmedi assumed that the device in pro audio mode is exposed as a single channel by pipewire
09:44kedde4 has joined #asahi-dev
09:45kedde3 has quit [Ping timeout: 480 seconds]
09:50marcanohh and this feature was introduced in some newer SMC firmware, 13.0 maybe
09:51marcanisn't there on my j314 with 12.4
09:51j`eythe CHWA key isnt there at all?
09:52marcannot in 12.4 j314 SMC, no
09:52marcanit is in 13.3 in j416
09:52marcanand the firmware I'm reverse engineering is some early 13.0 beta (last one I have a key for on t8103)
09:53marcan(would be really nice to get newer keys...)
09:53marcanso I think it got added in 13.0
09:56chadmed has quit [Remote host closed the connection]
09:58chadmed has joined #asahi-dev
09:58chadmedawesome, boost pstates are working
09:59chadmedlet me cobble together enough hwmon to do opp-microwatt measurements
10:01Galileo-dev has joined #asahi-dev
10:01_jannau_or if charging cd
10:01hightower4 has joined #asahi-dev
10:01chadmedoh wow idle power is closer to 8 W now, im assuming EAS doesnt like pstates without opp-microwatt
10:03kedde has joined #asahi-dev
10:03marcanI expect the boost states to be woefully power-inefficient, so it really shouldn't switch to them until it really knows it needs to
10:05kedde4 has quit [Ping timeout: 480 seconds]
10:05chadmedlets see just how bad they are heh
10:07hightower3 has quit [Ping timeout: 480 seconds]
10:09marcanalso, have we confirmed that the "extra" pstates on t802x are only for j416c? if so we need to adjust the DTs to that end.
10:10chadmed has quit [Remote host closed the connection]
10:25_jannau_macos high performance mode is 16" M{1,2} Max only https://support.apple.com/en-us/HT212852
10:26_jannau_Mac14,6 is the only device in geekbench with reported frequency higher than 3.5 GHz
10:26_jannau_I guess we would have to try on other devices if this is just a software limitation
10:27marcanI'm interested in what pstates the devicetree has
10:29galileo has joined #asahi-dev
10:29marcanmax we have on t8103 is 15/3104, t600x is 15/3228, t8112 17/3504 t6002/j416 19/3696
10:30marcanextra pstates on t600x seem unlikely given they ran out of bits in the register
10:30marcan*t6001/j416
10:30marcanso this sounds like it should be exclusive to that
10:30marcaner another typo, let me redo that
10:31marcanmax we have on t8103 is 15/3204, t600x is 15/3228, t8112 17/3504, t6021/j416 19/3696
10:31marcanI should get dinner, I clearly am not thinking right :p
10:51nyilas has quit [Remote host closed the connection]
10:53bcrumb has joined #asahi-dev
10:57Galileo-dev has quit [Quit: Konversation terminated!]
10:57galileo is now known as Galileo-dev
11:17chadmed has joined #asahi-dev
11:18chadmedhm my numbers have changed since last time and i think theyre wrong...
11:18chadmed3.3 W per core at the top firestorm pstate seems... low
11:19chadmedbut thats what the SMC tells me so...
11:20chadmedkde reporting ~7h worth of battery watching 1080p30 vp9
11:22bcrumb has quit [Quit: WeeChat 3.8]
11:44baozich has quit [Quit: baozich]
11:44baozich has joined #asahi-dev
11:45marcanoh yeah, there's something else...
11:45marcanchadmed: might want to hold off on measurements
11:45TexasOct has joined #asahi-dev
11:45marcanthere's a couple m1n1 changes that might affect that
11:45marcanwhat machine are you testing on?
11:45chadmedj314 atm
11:45chadmedill do the mini tomorrow now, its getting late
11:47marcannp, let me confirm that I can work around the snafu
11:47marcanwe were clearing all bits of the pstate registers because I wrote & FOO instead of & ~FOO
11:47marcanI think that made us lose at least one bit on pcores and I don't know what it does
11:47marcanneeds a m1n1 stage1 update to fix "properly" but I can probably just restore the bits in stage2 as a one-off
11:51baozich has quit [Quit: baozich]
11:52baozich has joined #asahi-dev
11:57c10l has joined #asahi-dev
11:57c10l has quit []
11:58c10l has joined #asahi-dev
12:01chadmedoh in other news glmark2 scores have doubled for no apparent reason???
12:01chadmedsame mesa
12:03baozich1 has joined #asahi-dev
12:03baozich has quit [Remote host closed the connection]
12:03baozich1 is now known as baozich
12:03jannaususpend (or wakeup) seems to break with no_console_suspend and macsmc_power.log_power=1. wakeup works without no_console_suspend
12:06marcanthat kind of makes sense because macsmc tries to do a printk when you press the button
12:06marcanI'm guessing the console isn't quite right then
12:07jannauis the max pstate visible in ioreg? that's probably the fastest way to get results from j41{4,6}{s,c}
12:07marcanyes, you can see it in the pmgr stuff
12:08marcanioreg -l -p IODeviceTree | grep voltage-states
12:08marcanthat should do it
12:11jannauvoltage-states{5,13}-sram? max value on j474s is 3_504_000_000
12:14jannauchadmed: 3840x2160 glmark2 score with cpuidle alone is roughly the same
12:16chadmedmight be the sus eas numbers, but im getting ~3700 by default whereas last time i did the testing i barely got 2300 with the performance governor and pinning glmark2 to the pcores
12:16baozich has quit [Quit: baozich]
12:16baozich has joined #asahi-dev
12:18chadmedresolution doesnt affect it so its still cpu bound
12:18chadmedbut higher
12:20baozich has quit []
12:20baozich has joined #asahi-dev
12:23landscape15 has joined #asahi-dev
12:25landscape15_ has joined #asahi-dev
12:25jannauwas the last test already with lina's sync UAPI? results are not fully resolution independent. 800x600 is faster than 4k. nowhere near 17 times faster of course but maybe 2 times
12:26jannauprobably less than 2
12:29landscape15_ has quit []
12:32landscape15 has quit [Ping timeout: 480 seconds]
12:32jannauno, wakeup is again broken
12:34baozich has quit [Ping timeout: 480 seconds]
12:34chadmed has quit [Read error: Connection reset by peer]
12:38chadmed has joined #asahi-dev
12:58raveling has quit [Ping timeout: 480 seconds]
13:06c10l has quit [Ping timeout: 480 seconds]
13:10hightower4 has quit [Ping timeout: 480 seconds]
13:15baozich has joined #asahi-dev
13:21raveling has joined #asahi-dev
13:23baozich has quit [Ping timeout: 480 seconds]
13:29raveling has quit [Ping timeout: 480 seconds]
13:31baozich has joined #asahi-dev
13:31raveling has joined #asahi-dev
13:33Galileo-dev has quit [Remote host closed the connection]
13:39baozich has quit [Ping timeout: 480 seconds]
13:43baozich has joined #asahi-dev
13:46raveling has quit [Ping timeout: 480 seconds]
13:54raveling has joined #asahi-dev
13:57Guest11450 has joined #asahi-dev
14:02raveling has quit [Ping timeout: 480 seconds]
14:28baozich1 has joined #asahi-dev
14:35baozich has quit [Ping timeout: 480 seconds]
14:35baozich1 is now known as baozich
14:46raveling has joined #asahi-dev
14:53baozich has quit [Ping timeout: 480 seconds]
14:54raveling has quit [Ping timeout: 480 seconds]
14:55ChaosPrincessso, how to deal with mipi? Macos just stashes whatever was configured by iboot and reapplies the configs if it comes out of sleep mode. I could make a separate driver, but dw-mipi-dsi kinda looks similar-ish, but the way it is right now, i can't really cause it to do the same series of register writes as macos does.
14:57marcannew driver
14:57marcanif it's just a save/restore it's not worth using the existing driver
14:57ChaosPrincessits save/restore, and i would copy/paste the mipi send/mipi recv functinos
14:58ChaosPrincessalso might need to put the stash part in m1n1 so i could drop always-on
15:05_jannau_you can clear the always-on after you saved the initial config. did we drop that with runtime-pm?
15:12bps has quit [Ping timeout: 480 seconds]
15:15marcanChaosPrincess: no, read the regs in the kernel
15:15marcanwe don't want to be passing around unnecessary blobs
15:15marcanthe always-on thing will be fixed in core code eventually
15:15marcanit is a known problem, don't design around it
15:16marcanand yes you can do what DCP used to do and drop it in the driver (it's a hack but it works), though eventually that won't be necessary
15:17ChaosPrincessi can just not bother with trying to survive a reset for now and not disable the mipi link on suspend
15:17ChaosPrincessthat would make it much easier
15:28roxfan has quit [Ping timeout: 480 seconds]
15:48nela6 has joined #asahi-dev
15:48hightower2 has joined #asahi-dev
15:51nela has quit [Ping timeout: 480 seconds]
15:51nela6 is now known as nela
16:06abd has joined #asahi-dev
16:07nela3 has joined #asahi-dev
16:11abd has quit []
16:11abd has joined #asahi-dev
16:12marcanweird, so clpc or something is shutting down the Pcore clusters on this t602x and then they never come back, processes just stay stuck on the ecores
16:12marcanmaybe it's due to the dodgy power readings?
16:13nela has quit [Ping timeout: 480 seconds]
16:13nela3 is now known as nela
16:13raveling has joined #asahi-dev
16:21marcananyway, I implemented CPU shutdown enough to survive a suspend cycle
16:22marcanthis happens:
16:22marcan[cpu7] Guest is shutting down CPU
16:22marcanTTY> HV: Requesting exit of CPU#7 from the guest
16:22marcanTTY> HV: Exiting from CPU 7
16:22marcanTTY> HV: All CPUs exited
16:22marcanHypervisor exited. Entering shell.
16:22marcanunfortunately there's an SMC timer or something triggered that forces a reboot a few seconds later
16:22marcanbut at least we get to see the entire suspend cycle
16:23marcanresume would be... more interesting to implement. I think we'd have to *actually* suspend the CPUs and m1n1 and go through the whole thing for real.
16:24marcanpushed the stuff
16:48nela has quit [Ping timeout: 480 seconds]
16:51jannauI still can't reproduce the power numbers on t6001/j314. kde lock screen with display turned off: ~5W (CPU takes ~3.3W). s2idle: 2.9W (2.2W CPU)
16:51marcanjannau: that looks about right?
16:56jannaucomparing to 3.2W screen off / 1.9W s2idle from this morning on t6000 and chadmed said 3W something for t6001 with screen off
16:57jannaulooks roughly like 50% more
17:00marcanI expect t6001 to use more power than t6000
17:38hightower2 has quit [Ping timeout: 480 seconds]
17:40roxfan has joined #asahi-dev
17:49marcanpushed some sleep mode stuff that doesn't really work
17:50marcanor well, I think it puts the system to sleep (after the guest does), but it definitely doesn't come back yet
17:50marcanI also don't have working serial right now so I can't debug whether it even tries
17:51marcanthere's at least one interesting thing I can try though
17:56marcannah, not that easy
17:56marcangood night :p
17:57cylm_ has quit [Read error: Connection reset by peer]
18:01cylm_ has joined #asahi-dev
18:05Cyrinux9 has quit []
18:08Cyrinux9 has joined #asahi-dev
18:10cylm has joined #asahi-dev
18:14nela has joined #asahi-dev
18:16cylm_ has quit [Ping timeout: 480 seconds]
18:24djorz has quit [Ping timeout: 480 seconds]
18:49pthariensflame has joined #asahi-dev
18:50nicolas17 has joined #asahi-dev
18:51abd has quit [Ping timeout: 480 seconds]
18:52pthariensflame has quit []
18:58abd has joined #asahi-dev
19:05pthariensflame has joined #asahi-dev
19:06abd has quit [Ping timeout: 480 seconds]
19:10pthariensflame has quit []
19:11djorz has joined #asahi-dev
19:14hightower2 has joined #asahi-dev
19:33raveling has quit [Ping timeout: 480 seconds]
19:55raveling has joined #asahi-dev
20:03raveling has quit [Ping timeout: 480 seconds]
20:08SalimTer- has joined #asahi-dev
20:13abd has joined #asahi-dev
20:13salimterryli has quit [Ping timeout: 480 seconds]
20:15raveling has joined #asahi-dev
20:23raveling has quit [Ping timeout: 480 seconds]
20:32raveling has joined #asahi-dev
20:40raveling has quit [Ping timeout: 480 seconds]
20:49raveling has joined #asahi-dev
20:53raveling has quit [Remote host closed the connection]
21:42abd has quit [Ping timeout: 480 seconds]
22:00SalimTer- has quit [Ping timeout: 480 seconds]
22:03salimterryli has joined #asahi-dev
22:07pharonix71 has quit [Read error: No route to host]
22:08kedde1 has joined #asahi-dev
22:15kedde has quit [Ping timeout: 480 seconds]
22:26bps has joined #asahi-dev
22:27kedde1 has quit [Ping timeout: 480 seconds]
22:32abd has joined #asahi-dev
22:46abd has quit [Read error: Connection reset by peer]
22:55nsklaus has quit [Quit: ZZZzzz…]
23:04bps has quit [Ping timeout: 480 seconds]
…