#
…

2022-06-04

00:38nuh^ has joined #asahi-dev
01:03nuh^ has quit [Ping timeout: 480 seconds]
01:07NathanielTan[m] has joined #asahi-dev
01:09bps has joined #asahi-dev
01:20Emantor has quit [Quit: ZNC - http://znc.in]
01:20Emantor has joined #asahi-dev
01:49al3xtjames has quit [Read error: Connection reset by peer]
01:49al3xtjames has joined #asahi-dev
01:51bps has quit [Read error: Connection reset by peer]
02:34the_lanetly_052__ has joined #asahi-dev
02:41the_lanetly_052___ has quit [Ping timeout: 480 seconds]
02:48PhilippvK has joined #asahi-dev
02:51phiologe has quit [Ping timeout: 480 seconds]
03:33pyropeter1 has joined #asahi-dev
03:35PyroPeter_ has quit [Ping timeout: 480 seconds]
03:55kov has quit [Quit: Coyote finally caught me]
05:08nicolas17 has quit [Ping timeout: 480 seconds]
05:10jluthra has quit [Remote host closed the connection]
05:10jluthra has joined #asahi-dev
05:10tomf_ has joined #asahi-dev
05:21bisko has joined #asahi-dev
05:37bisko has quit [Read error: Connection reset by peer]
06:12chadmed has quit [Read error: No route to host]
06:13chadmed has joined #asahi-dev
06:46roxfan has quit [Ping timeout: 480 seconds]
06:59AoV has quit [Quit: The Lounge - https://thelounge.github.io]
07:13chadmedis there something deeper going on in m1n1 that causes that little bench: piece of assembly to hang the system? i cant see why it would
07:13chadmedbut when i try to run too many iterations of it (trying to make a power virus) the system irrecoverably hangs and i have to hard reboot it
07:37ramitgoolry[m] has joined #asahi-dev
08:07WindowPain_ has joined #asahi-dev
08:08jannauchadmed: proxy timeout? how long is the estimated run time?
08:10chadmedits not actually the run time in this case, i have it set to few enough loops that it comes back successfully after running
08:10jannauyou could run it on a secondary core with smp_call()
08:11chadmedim doing that, im following along with what was done to measure the pstate latencies
08:11WindowPain has quit [Read error: Connection reset by peer]
08:11chadmedwhat ive done differently is put the bench routine under a while True, which is what causes the uart timeout
08:12chadmedidk why it would do this since smp_call should always return in time and just run again
08:12jannaunot sure what smp_call does if the previous call is still running on the same core
08:14jannaushould just clobber the previous return value
08:16chadmedthats what i expected but the shell just respectfully waits for it to finish doing whatever its doing, which seems to be never because the routine has hung somewhere
08:16jannaubut the second smp_call can cause a proxy timeout if the first is still running (on the same core)
08:18jannausmp_call waits just before the the secondary core enters the called function
08:39roxfan has joined #asahi-dev
09:21bisko has joined #asahi-dev
09:26bisko has quit []
09:37bisko has joined #asahi-dev
09:39bisko has quit []
09:44bisko has joined #asahi-dev
09:46bisko has quit []
09:49bisko has joined #asahi-dev
10:01bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
10:25fetsorn has joined #asahi-dev
10:32chadmedseemed to have been a race between smp_call and the interpreter iterating over the loop. luckily i seem to be able to get reasonably sane data by just beating the race
10:32chadmedamazing what stepping away for a couple of hours and coming back well fed can do :P
10:34fetsorn has quit [Remote host closed the connection]
10:45jannaudo you have a smp_wait or any other kind of synchronization with the code you're running
10:45jannauif not why wouldn't it racy
11:05chadmedi did try using the smp_call_sync() instead but it gave me the same results *shrug*
11:05chadmedi might even just have a dodgy usb cable who knows
11:10jannausmp_call_sync waits for the result and will timeout if the bench code takes more than 3 seconds
11:12jannauthe same might happen for the second smp_call on the same core. it will wait until the first call has finished
11:18norb has joined #asahi-dev
11:18chadmedit was the thunderbolt port on my dock, i started getting uart checksum errors too :/
11:19chadmedplugged into a thunderbolt port on the actual host machine and all is well now
11:20norbHi devs, first of all a BIG THANKS. That was an incredible smooth installation my M1Pro. I would like to know if I can help with something. I am a ~20 year Debian Developer now running Arch as main desktop (M1pro and desktop), normally build my own kernels and I'm not scared with playing around with sysinternals and testing wild stuff. Any pointer is welcome!
11:22marcanhypervisor now has a gdbstub :)
11:22marcanthat should be fun for Linux kernel debugging
11:24marcanchadmed: smp_call without waiting for completion is not supposed to work, no
11:24marcanyou need to use smp_wait or smp_call_sync
11:24marcanbut yeah, sounds like your underlying issue was something else too
11:25chadmedyeah i figured, as i said though turned out the weird errors were due to a dodgy port on the host end, all cleared up now
11:26chadmednew fun challenge: a single core uses such little power in most of the pstates that its basically just noise to the SMC
11:26marcannorb: if you're still a debian project member, I'd love to see official work on that end for integrating with these machines :) (even if just discussion at this stage)
11:27marcanwe have some folks doing unofficial debian images but nothing official that I'm aware
11:27marcanchadmed: unsurprising tbh :)
11:27norbI'm not doing Debian stuff anymore, have moved completely to arch. I can help with anything Debian related, but don't use it myself anymore
11:27marcanalso reminds me someone needs to write hwmon, it's on my endless pile but that's the kind of thing anyone can pick up given the smc scaffolding already in place
11:28marcanmaybe there should be an official-ish list of "things for folks to pick up"
11:28chadmedmarcan: i cant say im shocked either, just trying to think of ways to get values for opp-microwatt without performing invasive surgery on a motherboard
11:29marcanAIUI the SoC has internal power meters, which are probably readable through PMP if not directly
11:29marcanthose should give you better data than SMC
11:30marcanand measure in accumulated joules I believe?
11:30marcanactually hold on, CLPC keeps complaining and I don't *think* that hits PMP
11:30marcanso maybe those are raw
11:30marcanchadmed: want me to take a quick look at that see if I find it quickly?
11:32marcanclpc node is under pmgr so yeah, must be raw
11:32chadmedif you want or have time, if its going to be an effort though dont worry too much about it
11:32marcanlet me give it 30 mins or something
12:17al3xtjames3 has joined #asahi-dev
12:21al3xtjames has quit [Ping timeout: 480 seconds]
12:21al3xtjames3 is now known as al3xtjames
12:43chadmed has quit [Ping timeout: 480 seconds]
12:52chadmed has joined #asahi-dev
13:02marcannot sure how much of that init is required, but some of it seems to be to get good numbers for the energy counter, I think?
13:02marcanthis is for t8103/mac mini
13:02marcannot sure what the units are either
13:02marcanalso the pcore/ecore units seem to be different for some reason
13:06marcaninterestingly the energy counters seem to be the same for all the boost states of the pcores, in fact it peaks a bit higher at 2988 MHz
13:06marcanwhich makes sense, since those boost states all use the same voltage AIUI
13:07marcanso that means the dynamic power per clock is the same, and due to static power, higher clocks actually save (a tiny bit of) energy
13:07marcannot sure if all those magic constants are the same for everyone or calibration stuff calculated off of the values read or what
13:11marcanalso some counters aren't working yet
13:13chadmedthe one thing that strikes me as odd is the seemingly different units between the pcores and ecores
13:17marcanI might have the init wrong
13:18marcanlet me look closer
13:20chadmedarent the clusters at 0x210e00000/0x211e00000?
13:22marcancluster globals yes
13:23___nick___ has joined #asahi-dev
13:24chadmedoh yeah didnt notice the change in set_pstate()
13:24___nick___ has quit []
13:25___nick___ has joined #asahi-dev
13:28marcanchadmed: some of the init constants do seem different, also those regs are arrays of pstates (8 bits each) and they are preceded in the full HV log (which I did not paste verbatim) by reads of 8 regs that seem to contain pstate info for 8 pstates
13:28marcanso they're reading those and computing transposed arrays of that info
13:28marcanand there are significant differences between pcores and ecores so it seems plausible that the units differ
13:28marcanwill look in more detail later
13:35chadmedcool, ill spend some time on it tomorrow too. i was just playing around with some ideas out while i had some free time before exams so dont feel obligated to go too deep, im sure there are bigger fish to fry :)
14:11jannauwas there a change in the hypervisor that could make linux boot or the vuart very slow?
14:12jannaualmost slow enough to see single character updates in the earlycon up to the linux mem init at least
14:21the_lanetly_052___ has joined #asahi-dev
14:27the_lanetly_052__ has quit [Ping timeout: 480 seconds]
14:34roxfan has quit [Ping timeout: 480 seconds]
14:45dbancroft[m] has joined #asahi-dev
15:49povik has quit [Ping timeout: 480 seconds]
15:56marcanjannau: if you have updated recently, the gdbstub was merged, which touched a bunch of stuff. there was also the spinlock thing and a fix for that.
15:56marcanand related changes
15:56marcannothing specific to the vuart but those things touched the general exception entry stuff
15:59jannauI think it was before I rebased onto the gdbserver merge
16:03jannauI was previously on "display: Report time spent modesetting". I'll check if it's a "regression"
16:03povik has joined #asahi-dev
16:26roxfan has joined #asahi-dev
18:09jannauany idea how the macOS selected timing mode could persist in dcp over reboot and poweroff (macbook pro 14")?
18:12svennvram setting + DCP firmware patching from iboot maybe
18:13jannauI don't think patching is necessary, iboot probably just configures it and it persists after that
18:14jannauthe display is initialized
18:15* jannauis just surprised that the timing mode is saved in nvram
18:15svenoh, true
18:16jannauand a little annoyed since modesets are crash dcp macbook but not on other devices
20:07___nick___ has quit [Ping timeout: 480 seconds]
20:50jeffmiw has joined #asahi-dev
20:54fetsorn has joined #asahi-dev
20:55jeffmiw 11:28 <marcan> maybe there should be an official-ish list of "things for folks to pick up" <= I very much like this idea, I think it can really help the project
20:57fetsorn has quit [Remote host closed the connection]
20:58kloenk has quit [Remote host closed the connection]
20:59jeffmiwmarcan: I will be happy to look at hwmon and get someting going. I need to catch-up on SMC. I suppose the best is to state from bits/110-smc ? any suggestion/direction is more than welcome :)
21:00j`eyjeffmiw: just put commits on top of the asahi branch
21:00j`eyjeffmiw: also look at drivers/power/supply/macsmc_power.c, you can see how to write a smc driver from that
21:12jannausigh, something is broken. I had now really glacial startup from disabling the MMU in m1n1. I recorded 2 min and 14 seconds
21:12jeffmiwthanks j`ey !
21:12kloenk has joined #asahi-dev
21:12jannauand I only grabbed the phone and started recording after I saw it was slow
21:13j`eyis this on ultra?
21:13povikcould you bisect it to some m1n1 change?
21:13jannauit was not that slow earlier. no on the macbook pro 14"
21:13marcanjeffmiw: I have a big TXT of SMC key stuff, let me throw it somewhere
21:14jeffmiwmarcan: cool
21:14jeffmiwhow did you extracted it ? from tracing macos under hv I suppose ?
21:15marcanguess work, apple schematic references, experimentation
21:15jannauon the bright side: modesets (just changing the refresh rate) seem to work now on the macbook pro
21:15marcanvery little is from macos/fieldtest, they have few actual references in the software
21:16marcanyou can look at the old applesmc driver for stuff, fan/etc things should be the same I think?
21:17jannauno, :( - it failed just earlier so simpledrm kept working
21:18jeffmiwmarcan: ok will do. Thanks.
21:21svenif someone makes that list: “irq support for the i2c driver” is a nice and small task as well
21:21povikha was thinking about that too when the list was mentioned :)
21:22svenI’m happy to help whoever wants to pick that up. it’s probably als a good task for anyone who wants to get started with kernel development
21:23fetsorn has joined #asahi-dev
21:26fetsorn has quit []
21:36jeffmiwjust created this https://github.com/AsahiLinux/docs/wiki/List-of-%22things-for-folks-to-pick-up%22, then I realized that may be git issues could be more appropriate. Any opinions ?
21:39jeffmiwmarcan, sven: I added contact names(yours(and mine) in this case respectively for hwmon & i2c irq) so people know who to reach in case, feel free to remove if you don't like it
21:40svenworks for me
21:40nicolas17 has joined #asahi-dev
21:41jeffmiwif and once everyone is ok with this proposal, I'll add it to the developer section of the table of content
21:43poviki think you should just go ahead, in worst case it will get corrected later
21:50* povikexpanded on the i2c task
21:53jeffmiwadded to the ToC/SideBar then
21:57fetsorn has joined #asahi-dev
21:59fetsorn has quit [Remote host closed the connection]
22:18psykose has quit [Remote host closed the connection]
22:19psykose has joined #asahi-dev
23:06nicolas17 has quit [Quit: Konversation terminated!]
23:18amarioguysven: i can probably pick up the i2c stuff
23:19amarioguyunless someone else is already working on it
23:25yuyichao has joined #asahi-dev
23:31ModR\M has joined #asahi-dev
…