#
…

2021-10-02

00:06JTLchadmed: with MRIs, it makes me almost fall asleep while in the machine :D
01:20Emantor has quit [Quit: ZNC - http://znc.in]
01:20Emantor has joined #asahi
01:24kode54 has quit [Quit: The Lounge - https://thelounge.chat]
01:24Frisches_T has quit []
01:41tylo has joined #asahi
01:58___nick___ has joined #asahi
02:05kode54 has joined #asahi
02:14chadmedthe field inside the tube can be multiple Teslas strong. most are ~1-1.5T
02:14chadmedoops disregard
02:14kode54 has quit [Ping timeout: 480 seconds]
02:15chadmedJTL: yeah same if im going for a longer cerebral or joint MRI ill usually have a power nap in the tube lmao
02:24marcanchadmed: the receipt I got said this was somewhere between 1.5T to 3T (for billing purposes)
02:24marcanand I thought the antenna was part of the cage they put around your head?
02:27chadmedah yeah youre right, i was half asleep last night not gonna lie :P
02:28psykosebetter than being half awake
02:34tomtastic has joined #asahi
02:35tomtastic_ has quit [Ping timeout: 480 seconds]
02:36phiologe has joined #asahi
02:40PhilippvK has quit [Ping timeout: 480 seconds]
02:53tomtastic_ has joined #asahi
02:56tomtastic has quit [Ping timeout: 480 seconds]
03:05marvin24_ has joined #asahi
03:09marvin24 has quit [Ping timeout: 480 seconds]
03:48kode54 has joined #asahi
03:53tomtastic_ has quit [Quit: ZNC - https://znc.in]
03:53tomtastic has joined #asahi
04:03marvin24 has joined #asahi
04:06marvin24_ has quit [Ping timeout: 480 seconds]
05:40tomtastic_ has joined #asahi
05:41tylo has quit [Ping timeout: 480 seconds]
05:42tomtastic has quit [Ping timeout: 480 seconds]
05:44tylo has joined #asahi
05:52tylo has quit [Ping timeout: 480 seconds]
07:01tylo has joined #asahi
07:09tylo has quit [Ping timeout: 480 seconds]
07:16tomtastic_ has quit [Ping timeout: 480 seconds]
07:19tomtastic has joined #asahi
07:28aleasto has joined #asahi
07:31zopieux has quit [Ping timeout: 480 seconds]
07:33zopieux has joined #asahi
07:46povik has joined #asahi
08:16tylo has joined #asahi
08:25tylo has quit [Ping timeout: 480 seconds]
08:46riker77 has quit [Quit: Quitting IRC - gone for good...]
08:56riker77 has joined #asahi
11:09tomtastic has quit [Ping timeout: 480 seconds]
11:38tomtastic has joined #asahi
11:44kettenis_ is now known as kettenis
11:44jvoisin has joined #asahi
14:18alyssamarcan: with the help of cpu pstates.py and a bunch of ugly mesa rebases, I finally managed to get my m1 warm :-p
14:36rowang077[m]I wonder is the difference between the M1 macbook air and the pro due to cooling difference? As in it's thermal throttling or is it a different configurations done by Apple.
14:41kettenisthe base model has a 7-core GPU instead of an 8-core GPU, so that is a configuration difference
14:41kettenisbut otherwise it is just thermals
14:43rowang077[m]Isn't that configurable? I thought you can get an 8-core GPU with the air.
14:44kettenisyes, that's not the base model
14:45rowang077[m]so there is no soc/configured difference between the upgraded air and the Pro/mini as far as we know?
14:47rowang077[m]So let's say I were to liquid cool all M1 computers. The perf delta between them would be negligable.
14:55alyssacherrypicked more commits from marcan 's tree, so now the hack in m1n1 goes away :)
15:05alyssalooking forward to seeing my tree lighten
15:08marcanrowang077[m]: correct
15:08marcanpeople have modified Airs to have better cooling already
15:11alyssamarcan: I butchered the git history when cherrypicking (🤷), but I now have your latest pwrstate patches in my tree
15:11alyssaand can confirm that everything works as before + NVMe works with stock m1n1 now
15:11marcanawesome :)
15:11alyssaso that's one hack gone, 17 to go :-p
15:12kettenisgotto rename your branch at some point
15:12alyssakettenis: this is now in "fewer-hacks-2"
15:12alyssayou will notice there is no "no-hacks" branch 😜
15:14marcanalyssa: it's monocommit crap, but if you want to try cherry-picking cpufreq/wip (just pushed) on top, that should give you working cpufreq (including MCC control)
15:14marcanand scheduling
15:14marcanI *think* the devicetree merge shouldn't be too bad :)
15:14alyssamy whole tree is monocommit crap tbh
15:15alyssaI figure it'll be sorted out at upstream time.
15:15alyssaand when people keep doing random fixup commits and force pushes and entire drivers get swapped in and out ... yeah, not problem to do the git surgery for them 12 times over 😉
15:16marcanhopefully as things are less interdependent the merges will become a lot easier
15:16alyssayeah, here's hoping
15:16alyssaI just totally gave up on device tree tbh.
15:16marcanI still want to at least have a *script*, something I keep around manually, of how to merge a known-good branch, as a base
15:16marcanI think that cherry-pick shouldn't be too bad
15:16marcanit changes cpus which haven't changed since forever
15:16alyssaI was trying to maintain history but then with the pstate->pwrstate I noped out and squashed into one big "all the new DT since upstream"
15:16marcanand adds some devices at the top of the devices part
15:17alyssaand so much of the history was "add these 6 devices because Corellium" so it's not history worth preserving at this point
15:17marcanheh yeah
15:17alyssaanyway, let's see cpufreq/wip
15:18alyssawhat's the core base/power change?
15:19marcanjust an API variant I was missing, and actually some of it is obsolete and can be removed I think
15:20marcan(it was for a prior attempt)
15:20alyssaI suppose you'll be cleaning up the git history in the next few days anyway so no point in me doing surgery now.
15:20marcanyeah, exactly
15:20alyssaanyway, cherry-picked, let's give her a spin
15:20marcanjust apply it if you want to try it functionally
15:21marcanjust force pushed with the obsolete change removed, but you don't have to care
15:21marcandid you get any conflicts?
15:24alyssaa trivial one on the DT (versus DCP), otherwise no ☺️
15:26alyssaTTY> FDT: Usable memory is 0x800e08000..0x9dad88000 (0x1d9f80000)
15:26alyssaTTY> FDT: failed to get reg property of CPU
15:26alyssaguess I botched the DT cherrypick
15:27marcanyeah that looks like a bad merge of some sort
15:27marcanoh wait hold on
15:27marcanno, that's me
15:28marcanalyssa: pushed m1n1 update
15:28marcansorry, forgot about that one
15:30alyssastill not happy..
15:30alyssa(yes i chainloaded)
15:31marcansame error?
15:31alyssaoh err better now
15:31alyssabut have a kpanic
15:31alyssawith errr pcie wat?
15:32alyssasysfs_create_groups/kernfs_activate
15:32marcanI mean backtrace
15:32marcanbtw, you know about the "lower" thing in the hv, right?
15:32marcanah, you're running this base metal for now?
15:33marcanthat makes pasting the backtrace harder :p
15:33alyssawould screencap but dealing with an irl thing
15:33marcanI'm going to sleep soon :p
15:33alyssa(and typing with 1 hand and uh)
15:35marcanalyssa: yeah you're going to have to run the HV, I think the important bits scrolled off the screen
15:36marcanI suspect there's probably a warning or something useful before the big explosion
15:36marcanthis looks like I or someone else botched something with kobjects/sysfs, or possibly that something else exploded first and the failure path is broken
15:36marcan(and left behind bad state)
16:04povik has quit [Quit: Page closed]
16:16aleasto has quit [Ping timeout: 480 seconds]
16:17j_eymarcan: wat, people have modified the airs to have better cooling??
16:17aleasto has joined #asahi
16:17marcanyeah, it's actually easy, you remove a thermal insulator and replace it with a thermal pad
16:17marcanonly problem is it might cook your lap ;)
16:17marcanbut I hear it works well on a desk
16:18j_eyoh, so that's what the lap in laptop stands for
17:41kettenissee the youtube link for the LTT video I posted
17:50alyssamarcan: uhm it just booted fine now. uh.
17:51nskl has joined #asahi
17:52alyssa3 good boots in a row. Hm.
17:52alyssaWonder how I got into such a bad state
17:55alyssahm. maybe just got the system screwed up, i was having trouble with m1n1 at first too. meh.
17:57nsklaus_ has quit [Ping timeout: 480 seconds]
18:02alyssaanyway have cpufreq+mcc cherrypicked
18:02alyssait doesn't.. seem to be working... looking for obvious problems on my side
18:05alyssaoh, actually seems to be ok.
18:05alyssaschedutil is just finnicky.
18:05alyssayep, works, okay
18:05alyssamarcan: nicely done :-)
18:08VinDuv has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
18:08VinDuv has joined #asahi
18:09alyssacool. one less hack on the pile.
18:10alyssa(+650 on the branch but hey)
18:16tylo has joined #asahi
18:16alyssacurrently missing: SPI, shutdown, wifi, thunderbolt.
18:20VinDuv has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
18:21VinDuv has joined #asahi
18:24tylo has quit [Ping timeout: 480 seconds]
18:24alyssacherry-picking the corellium wifi commits, I'm curious what the story is there
18:24alyssaof course building a kernel with wireless support means rebuilding the whole kernel. on my chromebook. grumble.
18:25alyssathere is a lot in this commit I don't understand yet
18:26alyssathere's also a lot of debugging stubs in here as I can see.
18:26tylo has joined #asahi
18:34tylo has quit [Ping timeout: 480 seconds]
18:39alyssalooking at the commit hunk by hunk, we have:
18:39alyssa1. error handling change, can probably be dropped
18:39alyssa2,3. adding BCM4378 to the allowlist
18:40alyssa4. Doing something funny with the firmware path. This smells of hack.
18:40alyssaok we're ceasing to make sense to me
18:41alyssaripping apart the mp_global_t struct because... why? this is hack.
18:41alyssawill need to get fixed i guess..
18:42alyssa5. module parameters for mac address, chip id, and nvram. these seem to be unused, maybe was leftover from debug?
18:43alyssathis is related to this "OTP" thing that's Apple specific. I
18:43alyssa'm trying to understand what that is.
18:45alyssaI guess they use it to read out the vendor/modrev/module/chiprev/serial. but they don't seem to *do* anything with that information?
18:45alyssaso can all that code maybe be dropped?
18:45alyssaif so, the commit becomes a /lot/ smaller :)
18:46alyssaokay, back to the top
18:46alyssanext they rip apart mp_global for no clear reason. probably was a debug thing..
18:48alyssanext functional thing is brcmf_fw_set_macaddr .. sketchy string parsing code in kernel space but the functional change is prepending the string "macaddr=aa:bb:cc:dd:ee:ff" into NVRAM with the appropriate MAC used
18:49alyssaI don't see where they set that MAC address. if it was OTP, fine. but actually the MAC address should be from the ADT anyway.
18:49alyssasome unexplained change to nvram length, probably MAC related
18:50kettenism1n1 makes sure the mac address is available as a local-mac-address property
18:50alyssaallowing vif==NULL for no p2p whatever that is, need to read the context
18:50alyssakettenis: yeah, saw that 👍
18:50kettenisthere should be a standard interface to fetch it
18:50alyssaoh and the registers are moved around. How... lovely.
18:51alyssafeedc0de ... uh
18:51alyssa....RANDOMBYTES? how.. random....
18:51alyssaokay. er. right. uhm. okay
18:52kettenisfeel free to give patrick@openbsd.org a shout
18:52kettenishe added support to our bwfm(4) driver
18:53kettenisand I don't think he was impressed by what corellium did...
18:54kettenis(unfortunately I can't get it to work anymore; some subtle thing in the PCIe driver maybe)
18:55alyssaoh and this needs SMC support to light up the wifi PCI port right..
18:55alyssaforgot that particular detail
18:58alyssaI had a cherrypick of corellium SMC but that's probably dead by now.
18:59kettenisyeah, that needs to be redone based on sven's mailbox/rtproc stuff
18:59alyssa....oh and that's another "rebuild the whole kernel" config change.
19:09alyssaj_ey: I hear you and Sven have an SMC?
19:10alyssaoh, found it
19:18kettenisthe way I envisaged the SMC stuff working is by having a "pwren-gpios" property next to the "reset-gpios" property on the root port node
19:27kettenispwren-gios is how the hifive unmatched handles powering up devices behind the bridge
19:27kettenisbut maybe this needs to tie in with rfkill somehow
19:37alyssaok this will involve too many hacks for me to deal with right now
19:37alyssawho needs wifi anyway.
19:39j_eyus with the laptops D:
19:47alyssaj_ey: thanks for volunteering to finish this mess
19:47aleasto has quit [Quit: Konversation terminated!]
19:48* alyssais tapping our.
19:49* alyssarolled back the smc+wifi stuff
19:49alyssaand now wow look how bug-free my kernel feels now! :-p
19:50aleasto has joined #asahi
19:54alyssaso. better question. why is there a 1s stall during boot. and why does it seem to be the fault of the ... UART?
19:58alyssaj_ey: ...Yeah, disabling the UARTs shaves a second off my boot time.
19:58j_eyI havent seen anything like that :/
20:00alyssaj_ey: specifically, serial0
20:00alyssaserial2 is ok
20:00alyssaat ~s it says "serial: ttySAC0 at MMIO... is APPLE S5L"
20:00alyssaat 2.28s it says "printk: console [ttySAC0] enabled"
20:01alyssaoh let me twiddle my kernel cmdline
20:01j_eyI dont have my m1 here :(
20:02alyssaokay, huh. fine
20:02alyssaworks: net.ifnames=0 rw root=/dev/nvme0n1p4 rootwait rootfstype=ext4 console=tty0
20:02alyssadoes not work (1 sec delay): net.ifnames=0 rw root=/dev/nvme0n1p4 rootwait rootfstype=ext4
20:07alyssamarcan: FWIW, linux (kernel + userspace) boots 20% faster if I run cpu_pstates.py first
20:08alyssa(the kernel has the cpufreq patches)
20:08alyssaI assume all the cpufreq scheduling only kicks in later in boot, so cranking everything up early on is a win.
20:09alyssaI don't think that's a bug in your cpufreq/mcc, and I don't think linux is easy to fix here
20:10alyssaso I sort of wonder if it makes sense to set everything to max in m1n1, and then let the cpufreq/mcc drivers turn it down once the system is booted and that infrastructure is kicking
20:11alyssaWhat I don't know is if that "turning it down" happens correctly.
20:24kettenisdownside of cranking stuff up in m1n1 is that it leaves the cores spinning in a high power state
20:25kettenisbut maybe this could be done in the code that runs just after we set them loose
20:28j_eyor at least make the p cores higher than 600mhz
21:37alyssakettenis: where are you worried about?
21:37alyssaidling in m1n1? (do it in the kboot path)
21:38alyssaor in the OS itself? (if the kernel has cpufreq drivers, it'll downclock a few seconds after boot. if it doesn't, it should expect bad pmgmt anyway and at least this way it goes brrr)
21:38alyssaI guess u-boot/grub
21:40mazalyssa: do we really care about *that*?
21:42mazalyssa: on my system, that's 0.2 of a second to probe all three ports...
21:44alyssaI could make the same quip about _relaxed accessors 😉
21:45maznot quite. relaxed accessors have a system-wide effect, and are used all over the place. boot happens *once*.
21:47* alyssaboots a stupid number of times, probably because she's used to suspend/resume being broken on all of her devices
21:48mazI mean, I'm all for a speedy boot. but if we are going to start optimising for boot time, there are a lot of other things that would help. disable kernel logging, for a start.
21:48povik has joined #asahi
21:49alyssafair enough!
21:49mazanyway, I wasn't supposed to stop by IRC, just on my way to pick some booze in the basement! :D
21:49alyssaenjoy! :-p
21:55* alyssais writing a python SMC driver because.. uh... that's a great question
21:55povikhave fun
21:55alyssathanks :-p
21:55alyssaI would like to understand it better
21:56alyssathere's my PC excuse
21:56poviki finally got to the point where i have something in linux to test
21:56povik(audio-driver-wise)
21:56povikfew days of coding with no testing
21:56povikwhat can go wrong
21:56povikalso, i havent yet tried linux on the m1 at all
21:56poviktoday will be a first
21:56povikand already loaded with new code
21:57aleasto has quit [Quit: Konversation terminated!]
21:58povikso the question is where do i get userspace with alsa tools
21:58povik or maybe just trying with some userspace will be enough at first
21:58povik*with any userspace
21:59j_eymaz: santé!
22:01* alyssais biased of course.
22:02povikdont know your biases :)
22:02povikwhat do i do with that? can i convert that to initrd easily?
22:02alyssapovik: it's a full debian rootfs
22:02alyssaeasiest is to format a USB drive as ext4 and copy it there
22:03alyssa*extract
22:03alyssaand then boot with root=/dev/sda0
22:03povikyeah but that means i need working usb
22:03alyssaand grab patches for USB+Ethernet on the mini and then you'll have yourselfa computer
22:03povikhm, intersting suggestion
22:03alyssamaz: 's tree has just enough for type-A USB+Ethernet on the mini
22:17kettenisalyssa: worried about spinning in U-Boot, the EFI bootloader and the OpenBSD installer which uses a non-SMP kernel
22:36tylo has joined #asahi
22:44tylo has quit [Ping timeout: 480 seconds]
22:48tylo has joined #asahi
22:58tylo has quit [Ping timeout: 480 seconds]
22:58Techcable has quit [Quit: ZNC - https://znc.in]
22:59Techcable has joined #asahi
23:08___nick___ has quit [Ping timeout: 480 seconds]
23:24alyssaok, banged out enough Python to switch off rfkill in a m1n1 experiment
23:24alyssaand now I can see the radios in lspci
23:26povikwhere did the smc driver you were using before come from?
23:26X-Scale has joined #asahi
23:26povikcorellium?
23:26alyssapython code in m1n1
23:26alyssathere's no smc driver on the linux side right now
23:28tylo has joined #asahi
23:28X-Scale` has quit [Ping timeout: 480 seconds]
23:28aralyssa: oh, bluetooth on m1 isn't on usb? i'm kinda surprised
23:28alyssaar: bluetooth and wifi are both over a braodcom chip on PCIe
23:34alyssaAnyway, with that script in place I can punt on SMC driver shenanigans
23:36* alyssabuilds brcmfmac
23:37tylo has quit [Ping timeout: 480 seconds]
23:40alyssaDriver bails during probing due to a Corellium hack. Fun.
23:46tylo has joined #asahi
23:48* alyssareplaces a Corellium hack with an Alyssa hack 😅
23:49povikgo for it
23:49povikcan i specify bootargs for linux when booting in hypervisor?
23:49alyssapovik: stick it in your device tree
23:49alyssachosen { .. }
23:49povikah, was afraid that is the answer
23:51alyssaokay. now need to procure the firmware. fun.
23:56alyssascavenger hunt!
23:57tylo has quit [Ping timeout: 480 seconds]
…