#
…

2023-04-17

00:01raveling has joined #asahi-dev
00:03pbsds has joined #asahi-dev
00:18eslerm has joined #asahi-dev
00:23baahemian has joined #asahi-dev
00:41user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
00:46raveling has quit [Ping timeout: 480 seconds]
00:49sosys has quit [Remote host closed the connection]
00:49sosys has joined #asahi-dev
00:52baahemian has quit [Quit: baahemian]
01:09raveling has joined #asahi-dev
01:17raveling has quit [Ping timeout: 480 seconds]
01:25raveling has joined #asahi-dev
01:28user982492 has joined #asahi-dev
01:34raveling has quit [Ping timeout: 480 seconds]
01:44nepeat_ has quit []
01:44pg12_ has joined #asahi-dev
01:45nepeat has joined #asahi-dev
01:45nepeat has quit []
01:46pg12 has quit [Ping timeout: 480 seconds]
01:46nepeat has joined #asahi-dev
02:00gabuscus has quit []
02:12gabuscus has joined #asahi-dev
02:38raveling has joined #asahi-dev
02:46raveling has quit [Ping timeout: 480 seconds]
02:51baozich has joined #asahi-dev
03:14lucic71 has quit [Remote host closed the connection]
03:18sosys has quit [Remote host closed the connection]
03:19sosys has joined #asahi-dev
03:19sosys has quit []
03:19sosys has joined #asahi-dev
03:21sosys has quit []
04:11zzywysm has quit [Remote host closed the connection]
04:12zzywysm has joined #asahi-dev
04:20zzywysm has quit [Quit: Textual IRC Client: www.textualapp.com]
04:20user982492 has quit [Ping timeout: 480 seconds]
04:26raveling has joined #asahi-dev
04:34raveling has quit [Ping timeout: 480 seconds]
04:40raveling has joined #asahi-dev
04:48raveling has quit [Ping timeout: 480 seconds]
05:31Hibyehello has joined #asahi-dev
05:53kedde2 has quit [Ping timeout: 480 seconds]
06:03nicolas17 has quit [Quit: Konversation terminated!]
06:15raveling has joined #asahi-dev
06:21newiz has quit [Quit: Konversation terminated!]
06:23raveling has quit [Ping timeout: 480 seconds]
06:31raveling has joined #asahi-dev
06:34chadmed_ has quit [Quit: Page closed]
06:40raveling has quit [Ping timeout: 480 seconds]
06:41kedde2 has joined #asahi-dev
06:48abd has joined #asahi-dev
06:56abd has quit [Quit: abd]
06:57abd has joined #asahi-dev
07:01abd has quit []
07:01abd has joined #asahi-dev
07:01abd has quit []
07:02abd has joined #asahi-dev
07:22bps has joined #asahi-dev
07:46marcankaazoo: there is no 13" M2 Pro
07:47marcanI assume you mean 24"
07:47kaazooSorry, typo. I meant 14"
07:48raveling has joined #asahi-dev
07:51kaazooWhat's the best way to compile the dtb files? I cloned the asahi linux repo and checked out t602x/bringup branch. Took kernel config from https://github.com/AsahiLinux/PKGBUILDs/blob/main/linux-asahi/config and compiling the kernel now. Just takes a while, so I wonder if there is an easier way if one just wants to use newer devicetree files.
07:54abd has quit [Remote host closed the connection]
07:55marcanthe devicetree is the first thing that gets compiled, but you need the new kernel anyway
07:55marcanjust the devicetrees won't get you anywhere
07:56marcanthat and I don't think u-boot has the bits to make the keyboard work there yet either
07:57marcanwhat are you trying to do exactly?
07:57marcanare you planning to help with t602x bringup?
07:59raveling has quit [Ping timeout: 480 seconds]
08:01kaazooI'm trying to boot as far as possible with the current state of t602x related changes and give feedback. I will also try to help if I can, but I want to understand the current state and open problems first.
08:02marcanwhat feedback do you plan to give?
08:02marcanwe know what works and what's broken
08:03marcanspending time walking people through testing unreleased code is not productive when we could be fixing those things instead
08:05marcanyou're welcome to help development out, but please learn how to get a development setup going with a *supported* machine first where stuff will actually work as intended
08:07raveling has joined #asahi-dev
08:10jannauit doesn't make a big difference whether one starts with a supported device or a t602x device with https://github.com/AsahiLinux/docs/wiki/Tethered-Boot-Setup-%28For-Developers%29#booting-a-kernel-under-the-hypervisor
08:11jannaubut it doesn't make sense to try to make a old distro image work with t602x piece by piece
08:12jannauit's a waste of time to try to make the on device boot process work while the bringup is not complete
08:15raveling has quit [Ping timeout: 480 seconds]
08:23raveling has joined #asahi-dev
08:26abd has joined #asahi-dev
08:30VinDuv has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
08:31yrlf has quit [Quit: Ping timeout (120 seconds)]
08:31linuxgemini1 has quit []
08:31commandoline has quit [Read error: Connection reset by peer]
08:31linuxgemini1 has joined #asahi-dev
08:31kaazooOK, I agree with your concerns.
08:31commandoline has joined #asahi-dev
08:31yrlf has joined #asahi-dev
08:32VinDuv has joined #asahi-dev
08:33abd has quit [Remote host closed the connection]
08:35raveling has quit [Ping timeout: 480 seconds]
08:39marcanrobher: I'm running the DT checker on our SoC DT tree after updating dtschema and it's complaining about OPPs and cpu-release-addr, but as far as I can tell they are correct. known issue?
08:46marcanpretty sure it's not a regression on our side so I won't block the next SoC pull on it, but would be nice to know what's up
08:46bps has quit [Read error: Connection reset by peer]
08:47bps has joined #asahi-dev
08:49abd has joined #asahi-dev
08:58nsklaus has joined #asahi-dev
09:06abd has quit [Ping timeout: 480 seconds]
09:08nyilas has joined #asahi-dev
09:12raveling has joined #asahi-dev
10:00hightower3 has joined #asahi-dev
10:06hightower2 has quit [Ping timeout: 480 seconds]
10:20marcanok, I'm tired of waiting for the PSCI conversation to happen / to find time to start it. I'm going to write a dumb cpuidle driver and we can run on that downstream until it does.
10:48nyilas has quit [Remote host closed the connection]
10:51flokli has quit [Quit: WeeChat 3.8]
10:51flokli has joined #asahi-dev
11:22raveling has quit [Ping timeout: 480 seconds]
11:40cylm has quit [Ping timeout: 480 seconds]
11:44raveling has joined #asahi-dev
11:45marcanpushed t602x/bringup with jannau's DCP 13.3 conversion (tested working) and a cpuidle driver
11:46marcanhaven't tested actual idle power consumption yet :)
11:48marcanjannau: got some splat on suspend: https://mrcn.st/p/3e6l4HU2 (still worked though)
11:50marcanlol, implementing proper cpuidle also caused timekeeping to stop properly during suspend now, which means the SMC power logging doesn't work :D
11:56marcanthat also means the battery charge state control won't work unfortunately... we need to figure out something for that
12:01_jannau_CLOCK_BOOTTIME is supposed run during suspend if you can use that there. doesn't help of course for the battery state control when the system is actually suspended
12:09marcanyeah, the problem is actually setting up some kind of periodic timer
12:09marcanit would be nice if we had a way to make SMC annoy us periodically some way, then it could all be done within the driver
12:10marcanalternatively I'm sure the RTC or watchdog could be used for this but ugh, if this is going to be cross-driver we might as well figure out how to do it with core timekeeping and the arch timer
12:13marcanI'm going to pull up the old SMC disasm and see if I find anything useful... though I kind of doubt it, there aren't many event sources to begin with
12:19marcanoooh this is interesting, there's an SMC key for remote management that can trigger system actions (boot, reboot, and even ask the OS to sleep)
12:20marcanit's an outright SMC key though, so... who writes it? it would have to be another coprocessor via SMC sidechannel I think...
12:20marcanbut I would expect this to be eventually fired from the Aqantia NICs so... how would that work? do they have an outright SMC sidechannel via i2c or something?
12:20chadmed has quit [Remote host closed the connection]
12:23_jannau_I think there was something in the ADT which hinks how the aqantia nic is connected for the lights out management
12:24_jannau_might be i2c
12:26_jannau_connected to i2c5. aqc-a on the mac studio
12:29chadmed has joined #asahi-dev
12:30chadmedmarcan: system idle on j314 is ~5.5-6.1 W which still seems kinda high
12:30chadmedi think its a little bit down but not by a meaningful amount
12:31chadmedthe part of the keyboard over the soc is nice and cold now though so it must be other stuff sucking down juice
12:33chadmedinterestingly the hitching on various animations around the desktop with EAS is now gone with no other kernel changes so... neat
12:34marcanyeah something is not quite right, I think
12:35chadmedi mean its doing something so thats good
12:35chadmedive lost my smc power meter patches so ill rebuild those and do some more testing later
12:36marcanthe debug mode thing I have isn't enough?
12:39chadmedi want to look at how much power the cores are pulling down without the noise of the rest of the system
12:39chadmedi had some patches that added enough hwmon to get the key that measures that
12:40marcanso testing with the smc debug print thing, it drops about 1W of power when I enable the idle states
12:40marcanwhich isn't... great but it's not nothing
12:41marcan1.5W of CLVR power usage suggests something is still wrong though, I would expect that to drop to ~0 if things were properly and fully shutting down
12:41chadmedits gotta be more than that surely, at least on this machine the thing is stone cold now idling and watching 1080p30 video barely warms it
12:42marcanthis is on t6021 btw, maybe there's something else broken here
12:45robhermarcan: I'll look into it.
12:46chipxxx has quit [Ping timeout: 480 seconds]
12:46marcanI should pull down some newer xnu sources and see if there's anything interesting, haven't looked in ages
12:53kettenismarcan: sorry, I started writing things down, but got distracted by other stuff again
12:54marcanno worries, not blaming it on you :)
12:54marcanplus with the linux timekeeping mess we really need cpuidle anyway
12:57kettenisregarding the power savings for deep wfi; I didn't get much savings with that when I played with it under OpenBSD
12:57kettenisThis can't power off the cluster completely since the cores still maintain some state
12:58kettenisThis "deep" wfi state is probably designed to allow boosting of one of the other cores in the cluster
12:59marcanapple definitely does something to let clusters fully power down, otherwise I wouldn't get 100+ hours of idle battery
13:00kettenisyes, there should be a state where the cores lose all state
13:00kettenisand you need to bring them back up starting from rvbar
13:01kettenisfor cpu0 that will require assistence from m1n1
13:02svenI vaguely remember seeing something about that in I think some xnu source code they forgot to censor
13:03marcanI thought that was outright system sleep
13:04marcanI don't think macOS uses that in normal system idle, otherwise the hypervisor would go nuts
13:04marcanI did just find at least one power-related bit we're not setting properly
13:04sventrue, maybe that was full sleep
13:05svenit had some reference about some
13:05sven*about some engine that brings back the cpu from that state
13:06svenhttps://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/osfmk/arm64/cpu.c#L953 There was more in an older xnu source drop I think but that does sound like system sleep
13:15kettenismarcan: I believe I read somewhere that "deep wfi" dropped a bit more state than the GPRs you save/restore
13:15kettenisthings like the pointer authentication keys
13:16kettenisbut maybe the linux kernel already saves/restores those
13:16marcanit hasn't exploded yet without doing anything so :)
13:16marcan(and this kernel build should have PAC)
13:38bps has quit [Ping timeout: 480 seconds]
13:57robhermarcan: I don't see any new DT warnings on mainline. Is this on an asahi based DT?
13:57marcanno, mainline (well, my asahi-soc/dt branch which includes some new stuff, but nothing related to the warnings)
13:57robheryou're on 2023.04?
13:58marcanlet me run it again
14:01robhermarcan: Do you have ea87f1eb4fd8 ("dt-bindings: arm: Allow 32-bit 'cpu-release-addr' values")? It's in 6.3-rc
14:02marcanyes, that's what was causing it (it was saying it matched both options)
14:02marcanbut... now I can't repro it, and I'm confused
14:05robhermarcan: might have been a stale processed-schema.json. If dtschema changes, it doesn't get updated.
14:05marcanis it possible it was caused by a make race from me using -j<n>?
14:06marcanor that actually
14:06marcanbecause I think I did a run, then updated dtschema
14:06marcanso that would make sense
14:06marcan(and now that I have switched branches it would get updated)
14:07marcanOK, then I think we're good, I'll try to remember to poke things when I do dtschema updates
14:09raveling has quit [Ping timeout: 480 seconds]
14:09marcan/home/marcan/asahi/git/linux/arch/arm64/boot/dts/apple/t8103-j293.dtb: network@0,0: 'local-mac-address' does not match any of the regexes: 'pinctrl-[0-9]+'
14:09marcanhave we always had that one? I swear I saw mention of that before...
14:10_jannau_yes, we always had that one. I need to follow up on the series fixing that
14:10marcanI guess that's a standard prop for ethernet controllers but not wifi
14:16robhermarcan: I should also put in some sort of check/dependency. That's been on my todon't list for some time now. BTW, runs with TOT dtschema with Linus/next branches can be found here: https://gitlab.com/robherring/linux-dt/-/jobs
14:17marcanthanks :)
14:18bps has joined #asahi-dev
14:25kedde2 has quit [Ping timeout: 480 seconds]
14:27raveling has joined #asahi-dev
14:45kedde2 has joined #asahi-dev
14:54kedde2 has quit [Ping timeout: 480 seconds]
15:04raveling has quit [Ping timeout: 480 seconds]
15:09raveling has joined #asahi-dev
15:09i509vcb has quit [Quit: Connection closed for inactivity]
15:18raveling has quit [Ping timeout: 480 seconds]
15:21marcanokaaay, I think it's actually shutting down CPUs. this may have been changed recently.
15:21marcanI think we never noticed because CLPC makes that decision and we've always been disabling that in the hypervisor lately.
15:24kedde2 has joined #asahi-dev
15:29_jannau_or we noticed and started disabling CLPC
15:35_jannau_no, macos just panics with CLPC enabled
15:35marcanCLPC was always causing issues
15:35marcanbut it only panics if you have too much tracing and it exceeds max power limits and such
15:35marcanbut right now for me on 13.3 t416 it's instead trying to shut down a CPU, and when I made the HV not die on that, it's failing instead
15:41raveling has joined #asahi-dev
15:49raveling has quit [Ping timeout: 480 seconds]
15:58raveling has joined #asahi-dev
16:06raveling has quit [Ping timeout: 480 seconds]
16:08abd has joined #asahi-dev
16:18marcanhm, nah, but it's not using deep mode which doesn't seem to be saving any power
16:23marcanthis doesn't make any sense... going into deep sleep isn't helping at all with power consumption, but also the power usage is already high *before* even starting the secondaries.
16:23raveling has joined #asahi-dev
16:24marcanI think we must be missing something to enable actually powering down idle clusters
16:31baahemian has joined #asahi-dev
16:32raveling has quit [Ping timeout: 480 seconds]
16:33_jannau_didn't chadmed measure reasonable low power use for idle cpu cores? could it be something t60xx specific? I've seen more than 20h of battery life with j493 without s2idle
16:36___nick___ has joined #asahi-dev
16:37___nick___ has quit []
16:39___nick___ has joined #asahi-dev
16:39marcanit's a t600x problem with the P core regulators not shutting down
16:40baahemian has quit [Ping timeout: 480 seconds]
16:40c10l has quit [Quit: Bye o/]
16:46kedde2 has quit [Ping timeout: 480 seconds]
16:47baahemian has joined #asahi-dev
16:50abd has quit [Ping timeout: 480 seconds]
16:51abd has joined #asahi-dev
16:53i509vcb has joined #asahi-dev
17:16c10l has joined #asahi-dev
17:29marcanargh. it's non-CPU power states.
17:29marcanI just dropped power consumption by another watt by doing that.
17:30marcanfabric and stuff
17:30marcannow how do we deal with this...
17:33raveling has joined #asahi-dev
17:41raveling has quit [Ping timeout: 480 seconds]
17:43marcanaaaand I just found a really dumb bug in m1n1 that may or may not be breaking some things...
17:46raveling has joined #asahi-dev
17:46baahemian has quit [Remote host closed the connection]
18:05landscape15 has joined #asahi-dev
18:23landscape15 has quit [Quit: Igloo IRC: https://iglooirc.com]
18:28nicolas17 has joined #asahi-dev
18:43cylm has joined #asahi-dev
18:52drubrkletern has joined #asahi-dev
19:06kedde2 has joined #asahi-dev
19:17marcan[ 78.961958] macsmc-power macsmc-power: In 0.203W Sys 3.364W 3V8 122.997W MPMU 0.839W SPMU 1.114W CLVR 0.663W CPU 2.221W Batt -3.148W 100% Tempty 2045m
19:17marcan34 hours sleep time on t6021
19:17marcanhey, it's getting better :p
19:29kettenisI like the sound of that
19:59marcant6000 not doing as well, but at least I got CLVR pretty low
20:00marcan[ 77.369426] macsmc-power macsmc-power: In 74.121W Sys 6.605W 3V8 1.722W MPMU 0.581W SPMU 0.799W CLVR 0.416W CPU 1.612W Batt 67.520W 56% Tfull 63m
20:00marcan(this one's not charged, but system power usage is ~double)
20:00marcanthere's something dumb there using power
20:00marcansince it's not the system PMUs or CPUs
20:00marcancould just be an artifact of the battery charging though
20:02marcan[ 272.730779] macsmc-power macsmc-power: In 0.000W Sys 2.206W 3V8 1.619W MPMU 0.537W SPMU 0.779W CLVR 0.364W CPU 1.475W Batt -2.217W 62% Tempty 467m
20:02marcanah yes, it was just the charging :)
20:03marcannot sure how much runtime that would be yet, but it's 66% of t602x so we're doing good!
20:03marcan(ignore Tempty, I didn't let it sit there long enough and it's at 62% anyway)
20:05maximbaz has quit [Quit: bye]
20:06marcanpushed to t602x/bringup
20:06marcanI think I can start merging all that mess back into the bits branches :p
20:07marcanbut I really should get some sleep
20:07marcanchadmed, jannau: enjoy :)
20:07maximbaz has joined #asahi-dev
20:07___nick___ has quit [Ping timeout: 480 seconds]
20:08marcanI also changed macsmc-power to log power state on button press, so at least you can see what the latest data was after a suspend cycle (SMC updates once per second so usually you'll catch the previous state)
20:08marcan(if you have logging enabled)
20:36marcanalso I'm not sure if this is the right approach, since I don't think macOS does any runtime-PM with this stuff and I think it still gets better power usage. so I won't upstream it for now
20:37marcanit's possible this is just papering over the problem of some device hogging SoC fabric/DRAM bandwidth by forcing the entire thing to slow down
20:37marcanso I guess the next step is to work out the DCS counters
20:53abd has quit [Ping timeout: 480 seconds]
21:00Dementor has quit [Remote host closed the connection]
21:00Dementor has joined #asahi-dev
21:09raveling has quit [Ping timeout: 480 seconds]
21:14chadmedwe dont do anything with MCC pstates yet do we? can it be switched down to its lower pstate when all cores are in low pstates or something like that?
21:15chadmedalso t6000 ~11 hours of idle time with the screen off where it used to be less than 7 so theres a real improvement
21:16chadmedplasma reading 10 hours of battery as im typing this and wiggling the cursor where it used to be ~6 but really closer to 4
21:17chadmedif the codec s2idle fixes get merged ill start testing opportunistic sleep etc and see how that changes things
21:18kedde2 has quit [Ping timeout: 480 seconds]
21:31bps has quit [Ping timeout: 480 seconds]
22:28nicolas17 has quit [Remote host closed the connection]
22:28nicolas17 has joined #asahi-dev
22:36kedde2 has joined #asahi-dev
22:44kedde2 has quit [Ping timeout: 480 seconds]
22:55chadmed_ has joined #asahi-dev
23:36Retr0id6 has joined #asahi-dev
23:37Retr0id has quit [Read error: Network is unreachable]
23:37Retr0id6 is now known as Retr0id
23:49kit_ty_kate has joined #asahi-dev
…