#
…

2021-09-20

01:19___nick___ has joined #asahi
02:13boardwalk has joined #asahi
02:37malvo has quit [Ping timeout: 480 seconds]
02:37malvo has joined #asahi
02:47PhilippvK has joined #asahi
02:51phiologe has quit [Ping timeout: 480 seconds]
03:17marvin24 has joined #asahi
03:21marvin24_ has quit [Ping timeout: 480 seconds]
03:29quarkyalice__ has joined #asahi
03:37artemist has quit [Ping timeout: 480 seconds]
03:37quarkyalice__ has quit [Ping timeout: 480 seconds]
03:41artemist has joined #asahi
03:43lemonsus[m]Hey, noob here. I was just a little confused on what Asahi is supposed to be or how it would work for a noob like me. So for example when I installed Linux on my x86 laptop, I just used a Pop!_OS ISO and was able to install it via USB. What would be different with Asahi? and what sort of caveats might there be with installing and using Linux on an M1 as opposed to x86?
03:45chadmedthe process for installing would be slightly different but there is an install helper in the works to make this as painless as possible. as for the second question, you may find that some of the software you use on a day to day basis has no arm64 binaries, so youll need to find alternatives. arm support is mature in most distros though so if you use your distro's repos you shouldnt find too many examples of this
03:47chadmedthe big show stopper is gaming of course, though i plan on trying some funky stuff with qemu-user once we have vulkan support just to see how viable it is. some dude on youtube got gta v's windows build working via rosetta 2 in a vm at 60 fps which is extremely impressive, but i fear qemu-user is a whole lot slower than rosetta
04:59phireyou might be interested in FEX. It's still a work in progress but it's aiming to be a much faster qemu-user
05:04phirethere is also box86/box64, but I don't know much about them
05:05chadmedyeah marcan recommended fex last time i mentioned trying to get csgo up and running
05:25marcanyeah, FEX is probably the future
05:25marcanassuming it works well enough, that's something that would be preinstalled/configured in our arch images once we have them
05:26marcanso... sounds like I have a Mac Mini teardown + scope probing stream to do today...
05:26marcan... need to get a corner of my room clean first though
05:27i509vcb[m]At least some stuff like the JVM has aarch64 support, I think it's a 4x performance reduction to run that through rosetta
05:27i509vcb[m]Likely because you have 2 layers of JIT compliation
05:28chadmedvirtually everything that people use every day will have aarch64 support if youre grabbing it from a big distro
05:29i509vcb[m]Until JDK 17 (GA 3 days ago) you actually had to use an early access build on macos to not use rosetta
05:29chadmedyeah but thats a macos ABI problem not an aarch64 problem
05:29marcanlinux has much better arm64 support out of the box than macos, and likely will for at least a couple more years
05:29marcanbecause it's been supported for a long time now
05:29marcanconversely, Apple did a really good job with Rosetta to work around that
05:30chadmedrosetta 2 really is quite impressive yeah
05:30i509vcb[m]aarch64 on linux has definitely worked well in my experience, although kinda annoying that pi I had was faulty out of the box
05:30i509vcb[m]eh just rambling at this point
05:30chadmedyour first mistake was buying a pi tbh
05:30marcantalking about distro support here; hardware is a whole different story
05:31marcanlet's just say it's, uh, been a long road to pis getting onboard the upstreaming/proper drivers train
05:31phireif rosetta 2 follows the path of rosetta 1, it won't stick around for long
05:31chadmedferal ghoulish piece of hardware, barely anything works properly without their proprietary blobs, downstream kernel and downstream binaries in their raspberry pi os repos
05:31phireapple will kill it to force vendors to port their applications to native
05:31marcanthese days you can use upstream kernels, especially with the pi 4 and such IIRC
05:31marcanbut yeah, it's still a patchfest to get everything working properly
05:32marcanthat's exactly what I *don't* want to happen with Asahi
05:32marcanwhich is why we're shaving all the yaks
05:32marcanlast night I wrote the 3rd attempt at a clocks driver (now a genpd driver)
05:32chadmedmarcan: i spent a good few months doing *nothing* in my spare time but trying to get my pi 4 working with a completely upstream gentoo root, just gave up in the end
05:32marcanI think this has a good chance of being the good one
05:32marcan(branch pmgr/dev on our repo)
05:33marcanso now this unblocks upstreaming all the other drivers, and also thanks to the way this all works (much more nicely than the old clock framework), isn't really a hard dependency in any direction
05:33marcanI'm very happy with how it worked out
05:34marcantoday let's see if I can debug that weirdo USB thing with an oscilloscope; then after that cpufreq which will be simple since it's using the same framework, just with frequency switching enabled
05:35marcanand I guess at that point, with sven sending off i2c etc, all I really have to do urgently is put together an asahi/devel testing branch or such, finally...
05:35marcan... and then, finally, it's time to tackle the GPU
05:35marcanso hopefully by next week I'll be in GPU mode
06:15maor26 has joined #asahi
07:05aleasto has joined #asahi
07:13tophevich[m]marcan: It's been some time seeing you kernal hacking on stream, might we get to enjoy one some time after the hardware debugging session?
07:16quarkyalice has quit [Remote host closed the connection]
07:26* tophevich[m]also hasn't seen you streaming kern_e_l hacking in a while :D
07:36marcantophevich[m]: kernel is what's next, I just keep distracting myself with hardware reverse engineering in preparation of :p
07:37marcan(like right now; I just poked around the PMGR pstate bits some more...)
07:42tophevich[m]marcan: those poking sessions are very welcome, my comment should not invoke the perception that I would rate one over the other, just that if you do kernel hacking, I'd be interessted follow you on those as well :)
07:42quarkyalice has joined #asahi
07:42quarkyalice_ has joined #asahi
07:49tomtastic_ has quit [Quit: ZNC - https://znc.in]
07:49tomtastic has joined #asahi
07:50quarkyalice has quit [Ping timeout: 480 seconds]
08:05gabuscus_ has joined #asahi
08:07j_eymarcan: whats the likelyhood of stream today out of 10? (I would say low since its already 5pm, but you seem to mostly ignore time lol)
08:08gabuscus has quit [Ping timeout: 480 seconds]
08:26chadmed has quit [Quit: Konversation terminated!]
08:41awal3 has quit [Ping timeout: 480 seconds]
08:56marcanj_ey: low because I got distracted with pmgr stuff *again*... finally worked out what the clocks/events/power domains fields are (mostly)
08:57marcanthat now explains the massive init sequence that the pmgr driver does, it's scanning through all the tables that dump_pmgr.py prints and poking those registers (which are in a big array, somehow)
08:57marcannot entirely sure what those registers represent, seeing as they are homogeneous for devices/clocks/pds/events
08:57marcanbut at least with that there's no more "lists of magic pokes" left that we can't explain
08:57marcanmaybe m1n1 should do this init... though we don't really know what it does yet
08:59marcantophevich[m]: I normally stream whatever I do as long as I'm in the mood; I was actually originally planning to stream last night's thing but I ended up too tired, though I'd sleep, then couldn't sleep, then decided to hack on that driver anyway... not quite up for a stream at that point :p
08:59marcan*thought
09:01j_eythe driver was only like 500 lines in the end
09:02j_eyerr 141 lines lol
09:03j_eyusually its ~200 lines for a driver that basically does nothing!
09:03marcanyeah, the work was mostly figuring out how the genpd stuff works!
09:03marcanthankfully it's pretty simple :)
09:04marcanalso I think I spent more time adding runtime PM to the serial driver (because sequencing and enable/disable mismatches and...) :p
09:07j_eyprobably not if you include all the pmgr RE time :P
09:07marcanthough so far most of that has been "finding out all the things I don't need to care about"
09:08tophevich[m]marcan: yes, most important is that you hit your groove, if a stream fits into that, it's only sugar on top. I'm not trying to push you to stream, just want to make sure you know it is appreciated.
09:08marcanthe PLLs are *locked*, we can't get ourselves into that mess even if we wanted to!
09:08marcanthank you apple security design
09:08marcanmeans they can't afford to let osx do anything nasty :D
09:08marcanalso, seriously, no other SoC vendor does this remotely this well
09:08quarkyalice has joined #asahi
09:09marcantophevich[m]: I'm happy that people enjoy them :)
09:10quarkyalice__ has joined #asahi
09:10marcanI think to this day the most no-nonsense system I'd seen was the Wii, but that still has some memory init (that we never had to worry about because it was done by the stage 1 bootloader) and some PLL (?) and related nonsense (that we did, since we replaced the stage 2 bootloader)
09:11marcanbut the M1 is arguably even better, especially relative to all the stuff it does
09:14milek7I dunno, 'tons of signed proprietary firmware' doesn't sound that good to me
09:14quarkyalice_ has quit [Ping timeout: 480 seconds]
09:15quarkyalice_ has joined #asahi
09:15marcantons of signed proprietary firmware that works, does its job, is behind IOMMUs so cannot backdoor the main system, and takes a ton of work off of Linux? I have no problem with that
09:16marcanproprietary firmware is only a problem when it becomes a problem
09:17quarkyalice has quit [Ping timeout: 480 seconds]
09:17marcaneverything runs proprietary firmware; people don't generally complain about the blob in their mouse because it works and doesn't get in the way
09:20quarkyalice has joined #asahi
09:21quarkyalice__ has quit [Ping timeout: 480 seconds]
09:26quarkyalice_ has quit [Ping timeout: 480 seconds]
09:29frode_0xa has joined #asahi
09:32phireI'm curious if it's possible to overclock the Wii's VI, make it output more than 480p
09:35phireThough the AV encoder chip might be the actual limiitation.
09:36frode_0xa has quit [Quit: leaving]
09:37frode_0xa has joined #asahi
09:42tophevich[m]marcan: You hit the nail on the head with the example. I think this is something where we humans are very much intuitively wrong, as if we see something seperated (in our mind clearly seperated) it is "OK", because it is not part of the system. But in reality that seperation is quite arbitrary. If it is "part" of your system, the firmware seems to be software, if it is not it seems to be part of the hardware ... But as a system is by
09:42tophevich[m]definition created by many distinct parts, this distinction can only be made arbitrary and there our intuition will fall back to what we perceive physically as seperate. Also at which point is firmware, and at which point does it become software. What kind of firmware can be "seen" as "hardware"?
09:52dottedmagany* Linux sits on top of tons of immutable proprietary hardware. why single out firmware? (*except RISC-V on top of a OpenFPGA-chip that you have somehow manufactured manually?)
09:54dottedmagtophevich[m]: Is the distinction trully useful? I don't see practical differences between hardwired circuits, a resident blob in hardware, loadable firmware and a proprietary driver as long as it does not cause problems.
09:55dottedmagThe only kinda-useful difference is for pluggable peripherals, where you don't want to be running a proprietary driver on the main CPU, because you'll be limited in the set of machines you might plug this peripheral into.
10:05tophevich[m]marcan: What I'm saying (trying to) is that in most cases it is most likely not useful, but that we humans will do it anyways as we are "programmed "to do so. And as we know that is the case we need to remind ourselves of the fact that we do it intuitivly wrong in most/many cases, as we will do it on physical perception ...
10:14tophevich[m]I mean in general, regarding those topics you realy want to answer (or it boils down to), how much control do I have over my hardware, and how much control has my hardware over me. Be it data privacy, security, usability, availabilty ... That's what you want to have realy answered I think.
10:14tophevich[m]Or how much it can be trusted in to do as expected in those regards
10:54alyssamarcan: "all I really have to do urgently is put together an asahi/devel testing branch or such"
10:54alyssayou won't be able to automate this, and I've already sunk in the cost of dealing with this. go to gpu, do not pass go, do not collect 200 yen
11:12chadmed has joined #asahi
11:49leah2 has quit [Remote host closed the connection]
11:51leah2 has joined #asahi
12:41awal3 has joined #asahi
12:54frode_0xa has quit [Quit: leaving]
13:19jbowen has joined #asahi
13:43X-Scale has joined #asahi
13:49X-Scale` has quit [Ping timeout: 480 seconds]
14:03malvo has quit [Ping timeout: 480 seconds]
14:04malvo has joined #asahi
14:32malvo has quit [Ping timeout: 480 seconds]
14:33malvo has joined #asahi
14:56marcanalyssa: I'm not trying to automate this any more, I intend to just do some manual merges and call it a day
14:59skipwich has joined #asahi
15:06skipwich has quit [Remote host closed the connection]
15:07skipwich has joined #asahi
15:29j_eymarcan: lool man, smp in the hv is insane
15:29j_eythat progress bar was like 5mins before I think? now 2s
15:32marcanalyssa: also 200 yen... that's barely enough for a coffee :p
15:36j_eymarcan: getting this error when trying to run trace_gpio.py https://paste.gg/p/anonymous/b474259dedad4d55a02b8b786a60aed3
15:40marcanj_ey: fixed
15:46Andalu30 has joined #asahi
15:47leah2 has quit [Remote host closed the connection]
15:47leah2 has joined #asahi
15:50j_eymarcan: thanks!
15:58j_eymarcan: heh i guess this is the mba trying to sleep? https://paste.gg/p/anonymous/81f41db9237c4b12a72b858f031611cf
16:00marcanj_ey: yup
16:00marcansleep kills it :)
16:00marcan(as in systemwide sleep)
16:00alyssamarcan: thatsthejoke.jpg
16:01j_eymarcan: it's annoying it seems in gpio/pinctrl there's no interrupt enable/disable. you have to clear the the interrupt type to 0, so to enable it again you have to write the type out again, which means storing the type in the driver
16:02marcanheh, annoying...
16:03kettenisj_ey, does assigning the interrupt to group 0 work?
16:04j_eykettenis: group 0 is a valid group!
16:05kettenisgroup 7 then?
16:05j_eyalso valid
16:05kettenisone of the 8 groups has no AIC interrupt associated with it
16:08j_eynow Im confused :)
16:10alyssastarting "introduction to sw design" homework, someone get the stopwatch
16:14bdju has joined #asahi
16:18alyssa(for the week)
16:19alyssaj_ey: thx
16:19j_eymaybe you should do 2 nd major
16:19alyssa<marcan> TIL you're also a goddamn formal mathematician
16:43yuyichao has quit [Ping timeout: 480 seconds]
16:49kettenisheh, I suppose I could consider myself an informal mathematician
16:51Andalu30 has quit [Ping timeout: 480 seconds]
16:53yuyichao has joined #asahi
16:59quarkyalice__ has joined #asahi
17:00quarkyalice__ has quit [Remote host closed the connection]
17:20roxfan"pointer arithmetician"
17:52maor has joined #asahi
17:59maor26 has quit [Ping timeout: 480 seconds]
18:52sveni technically have a physics degree. that surely also makes some kind of mathematician!
18:55j_eyoh yeah, you have a physics degree? what's plancks constant?
18:56sorearthat's something you've only been able to memorize in the last 2 years
18:57svenj_ey: 1 in natural units :P
18:57dottedmagj_ey: It's a constant someone came up with to give Maltese people a letter for H sound (they have misused their H letter to mean "no sound")
18:58j_eysven: bah youre too clever
18:58svenmust be the physics degree! :-P
18:58kettenisc = 1, h = 1, h_bar = 1
18:59j_eye = mc^2
18:59sorearkettenis: 2pi = 1?
19:01kettenisyeah, that's where things wnet wrong...
19:02kettenisso now you know why i do this computer stuff
19:08povik has joined #asahi
19:08povikhello all
19:08poviki made the speaker on mac mini come alive
19:10j_eymic drop ^^
19:10povikalthough wait a minute, it's missing m1n1.hw.i2c
19:11povik(that actually isn't in m1n1)
19:11povikgive me a minute
19:11j_eypovik: so I assume you've been hv tracing macOS?
19:12poviknow it's fixed
19:12povikj_ey: to some degree
19:12povika lot is found out by poking mmio
19:12povikthe script has an embedded console, so i can poke and listen when the audio stops
19:13povikbut e.g. the mca-switch writes is subset of what macos does
19:13poviki tried to keep it to minimum
19:14j_eyso is the speaker on the mini likely to be the same asm mba?
19:14j_eys/asm/as/
19:14j_eypovik: any chance you can record a video of it?
19:14povikj_ey: some chance
19:15alyssapovik: damn, nice!
19:15sveninteresting that the DART just works. i couldn't get another stream of the sio dart to work properly (aes engine)
19:15poviklet me know when someone else also gets it working
19:15sveni'll definitely give it a try tomorrow :)
19:15j_eypovik: i think you messed the paste up?
19:15poviksven: i had some issues, but nothing i could pin down to dart for sure
19:15alyssapovik: you have two copies of the same script there..?
19:16j_eypovik: line 592 seems to be the start of the file again
19:16povikyour're right, thanks, fixed
19:18povikj_ey: re: mba, the leaked schematic has the same part driving the speakers
19:18povikbut i don't know if that's the mba or pro
19:19alyssapovik: script works here 😁
19:19alyssaaudio is distorted though
19:19alyssa(higher pitch than it should, and I think also faster .. so just skipping samples I guess?)
19:19povikalyssa: try passing -r 48000 to sox
19:20povikbehind -t raw
19:21alyssa"Error getting /arm-io/gpio clock-gates" uh
19:23povikyeah, i don't know if /arm-io/gpio has any
19:23povikthat didn't stop me from trying
19:23alyssasounds about right for r/e experiments
19:24alyssahm this isn't coming up reliably
19:24povikworks best after fresh reboot
19:24alyssaalso that
19:25alyssa(not discounting sox weirdnesses ofc)
19:25alyssapovik: -r 48000 fixes the distortion 👍
19:26povikgreat, i put it in the paste
19:27alyssapovik: do we know if this is the 'right' way of driving audio?
19:27povikwhat's the 'right' way?
19:27alyssaNo idea, I'm a graphics person :-p
19:27povikwell then we should ask someone
19:28alyssabut like -- for display, you can technically drive the display registers directly. but you're not supposed to, that's the DCP's responsibility
19:28alyssa(as is very clear from a hv trace of macOS)
19:29povikright, well no, i am not missing a coprocessor in the loop
19:30alyssaanyway, great work 🙂
19:31alyssaheadphones next? 😋
19:35povikcould be easy now
19:35povikbut there's an exam i have to study for first
19:36povikguess i exhausted the procrastination budget
19:37alyssarelatable.
19:37povikthought so
19:44roxfanhm, ios15 is out but not macos 12
19:44roxfanstill buggy?
19:58kettenisI think I have the power domain stuff sorted out for u-boot
19:59kettenisstill need to sort out the dependencies for the various devices that aren't in marcan's device tree yet
20:00kettenisbut the "children of syscon
20:01kettenis" model seems to work fine in u-boot
20:01roxfanchildren of the syscorn
20:01j_eyit does sound like a band name
20:49jbowen has quit [Quit: leaving]
20:58alyssapovik: also, licensing for that python code? (so we can stick it in m1n1/experiments)
21:01povikalyssa: anyone can do as they please with it
21:01poviki will be happy to prepare a PR under the standard m1n1 license (MIT, i think?)
21:02alyssaplease do so :-)
21:03povikokay, will do tomorrow probably
21:47maz has quit [Read error: Connection reset by peer]
21:48maz has joined #asahi
21:57aleasto has quit [Quit: Konversation terminated!]
21:58povik has quit [Quit: Page closed]
22:01aleasto has joined #asahi
22:03aleasto has quit []
22:04aleasto has joined #asahi
22:10aleasto has quit [Remote host closed the connection]
22:13aleasto has joined #asahi
22:31aleasto has quit [Quit: Konversation terminated!]
23:01alyssalooking at the ADT, i guess headphones are over i2c2 with the cs42l83 part
23:01alyssathat particular chip doesn't have linux support, but related e.g. cs42l73 is there
23:02mindw0rk[m] has joined #asahi
23:06psykose has quit [Ping timeout: 480 seconds]
23:07alyssaok uh back to gfx
23:08alyssamarcan: hv is giving me an SError now with the macos stuff
23:08psykose has joined #asahi
23:09alyssalet's see
23:12alyssayeah still happening
23:13alyssaalso unsure about the kernel cmdline
23:14alyssaokay i think this is working again yes ok
23:15alyssait just really wants cpus=1 which i assume breaks smp
23:17alyssatrying changing to cpus=8. this is new kind of broken
23:21yuyichao has quit [Ping timeout: 480 seconds]
23:24alyssaright, er. with latest m1n1 and existing cmdline (cpus=1) it works
23:24alyssabut no faster than before
23:24alyssa (and now it's hanging in the middle of a request. uh.)
23:27* alyssajust wants a trace of a mode set
23:28alyssayeah hv is definitely hanging more than usual. uh
23:32alyssalast week's hv build seems to work ok* so I think this is a recent regression with SMP?
23:32alyssa* still trying to boot
23:33yuyichao has joined #asahi
23:33alyssawas about to say old one was hung too but it's just super slow and freezing randomly.
23:33alyssalinux side CPU usage is normal
23:34alyssawell. except for avahi-daemon running like crazy (...)
23:46maor has quit [Ping timeout: 480 seconds]
23:49alyssaextracted 33MB of logs from the hypervisor. hopefully /something/ in this pile of needles proves useful..
23:50marcanalyssa: I don't see some pmgr hooks I've recently added, are you sure this is up to date?
23:58alyssaI, er, thought so
23:58alyssamarcan: also what kernel cmdline?
…