#
…

2021-11-25

00:05yuyichao has quit [Ping timeout: 480 seconds]
00:34amw has joined #asahi
00:54psykose has joined #asahi
00:54psykose has quit [Remote host closed the connection]
00:59psykose has joined #asahi
01:56nctcf^ has quit [Ping timeout: 480 seconds]
02:39darkapex1 has joined #asahi
02:43darkapex has quit [Ping timeout: 480 seconds]
02:47littledust3403[m] has joined #asahi
03:01marcanI bet it just takes a while to boot after a reset...
03:08phiologe has joined #asahi
03:25palmer_ has joined #asahi
03:25palmer_ has quit [Remote host closed the connection]
03:28kov has quit [Quit: Coyote finally caught me]
03:31c10l8 has joined #asahi
03:38c10l has quit [Ping timeout: 480 seconds]
03:50palmer_ has joined #asahi
03:50palmer_ has quit [Remote host closed the connection]
04:10crabbedhaloablut has joined #asahi
04:14loki_val has quit [Ping timeout: 480 seconds]
04:17loki_val has joined #asahi
04:21crabbedhaloablut has quit [Ping timeout: 480 seconds]
04:21marvin24_ has joined #asahi
04:25marvin24 has quit [Ping timeout: 480 seconds]
04:29cth451_desktop has quit [Remote host closed the connection]
05:33kajiryoji has quit [Ping timeout: 480 seconds]
05:36chamomile has quit [Ping timeout: 480 seconds]
05:40squags_ has quit [Ping timeout: 480 seconds]
05:40squags has joined #asahi
05:48squags has quit [Ping timeout: 480 seconds]
05:57squags has joined #asahi
06:05squags has quit [Ping timeout: 480 seconds]
06:14cth451_desktop has joined #asahi
06:14squags has joined #asahi
06:22squags has quit [Ping timeout: 480 seconds]
06:27squags has joined #asahi
06:38sailorek1234 has joined #asahi
06:57aeadOnce everything is merged and well supported, how well is Linux expected to be able to handle the heterogenous cores in the M1 / M1 Max? Does the scheduler have good support for "big.little"?
06:58aeadIt seems to me the answer could be one of three things: it's good at knowing which threads belong on the big and little cores; or, it's aware of the difference in compute capacity and just schedules all threads proportionally to each core's rough performance; or it doesn't do much special
06:58bgb has joined #asahi
06:59aead(I Googled a little before asking it _seems_ like 2 might be the answer based on a paper about teaching CFS how to treat cores proportionally, but concrete info seems kinda thin)
07:04sorearremember that big.LITTLE has been a reality for Android for years and that's in the upstream kernel
07:09aeadyeah but I'm curious how smart the scheduler is really. It seems like Apple does a great job of putting the "right" threads on each core because it exposes an API for userspace to tell the kernel what the QoS of the process is
07:09aeadwhich, if that does exist on Linux now (not sure?) it's unlikely anything would make use of it anyway
07:10aeadit seems it'd have to pull some really clever tricks to do the same thing just based on pure heuristics
07:10aead(and smartphone SoC manufacturers are notorious for not upstreaming their device-specific tweaks, AFAIK)
07:11BlitzWorkslwn has some good articles on what it does and does not do
07:11aeadoh I'll restrict my search to lwn. good point!
07:11BlitzWorkstry looking for the 'sched' schedule policy
07:12kode54I mean, macOS also tends to want to shove background/idle threads onto the LITTLE cores so they use less power overall
07:12kode54while it also tends to put interactive tasks and foreground apps on the big ones
07:17bgb_ has joined #asahi
07:21bgb has quit [Ping timeout: 480 seconds]
07:47bgb has joined #asahi
07:48bgb_ has quit [Ping timeout: 480 seconds]
08:29squags has quit [Ping timeout: 480 seconds]
08:30squags has joined #asahi
09:27FireFox317can anyone here run the release version of macos 12.0.1 kernel under the hypervisor? it gets stuck in the beginning of the boot process for me
09:27FireFox317the previous 11.something works fine
09:37FireFox317ah macos panics with 'panic(cpu 0 caller 0xfffffe0014b57f3c): "REQUIRE fail: NULL != prop @ const void *get_dt_pointer(IORegistryEntry *, const char *, vm_size_t *):106:/System/Volumes/Data/SWE/macOS/BuildRoots/b8ff8433dc/Library/Caches/com.apple.xbs/Sources/AppleSEPManager/AppleSEPManager-722.40.2/SEPHibernation/InvalidateHmac.cpp: " @InvalidateHmac.cpp:106
09:39FireFox317so apparantly something is removed from the adt and macos doesnt like that
09:40j_eyI didnt think m1n1 changed the adt though..
09:40_jannau_are you booting from the right startup disk? i.e. the one which has mac os 12.0.1 installed?
09:41FireFox317_jannau_, oh that might be it
09:41FireFox317the startup disk is set to the one that has m1n1 installed
09:43yuyichao has joined #asahi
09:47as400 has joined #asahi
09:48as400jannau: I have a question - keyboard patches are not included in your PKGBUILD. Am I right ?
09:48j_eyas400: yes
09:48FireFox317_jannau_, nope same panic. Previously I could just set the startup disk to the m1n1 partition and still boot macos under the hypervisor.
09:48as400May I ask why ?
09:49FireFox317The panic message suggests that something is missing in the adt
09:49FireFox317hmm, does each partition/os install have a different adt? then it may be using the old adt from 11.something to boot 12.0.1
09:51_jannau_as400: preliminary policy for patches to be included is either in asahilinux/linux or submitted to a linux mailing list and I didn't had time for more yet
09:53_jannau_firefox317: I think since macos 12 each install uses and probably requires a matching last stage iboot. hence my question about the startup disk
09:53j_eyas400: you can quite easily cherry pick them if you want to
09:54as400jannau: thx, no offence. Just asking.
09:55as400j_ey: thx. I will as soon as my mbp arrives.
09:55FireFox317_jannau_, ah okay. But i cant set the startup disk to the macos install and still boot m1n1 to run the hypervisor right? so i think my only option is to update the firmware on the m1n1 partition to 12.0.1 right?
09:56squags has quit [Read error: Connection timed out]
09:58_jannau_firefox317: I'm not sure that anything except using m1n1 as custom boot object on the mac os install you want to virtualize is going to work
09:59squags has joined #asahi
09:59_jannau_you can probably modify the ADT or boot args to tell the kernel which partition is the system partition
10:03FireFox317_jannau_, but you cant install m1n1 on the same partition as the mac os install right? I think apple designed it in a way that each os install has its own firmware version, and thus adt version
10:04FireFox317they are on the same disk (nvme), but not the same partition
10:06_jannau_you can configure m1n1 as custom boot object on every mac os install / volume group. That's different from the asahi installer use case. The installer is designed for a separate linux install
10:11FireFox317_jannau_, aha okay that makes sense. I had m1n1 installed on a seperate partition
10:14FireFox317_jannau_, is it documented somewhere how to install m1n1 on the same mac os install?
10:18gabuscus_ has quit [Read error: Connection reset by peer]
10:22gabuscus has joined #asahi
10:47gabuscus has quit [Ping timeout: 480 seconds]
10:50gabuscus has joined #asahi
11:00bgb_ has joined #asahi
11:04bgb has quit [Ping timeout: 480 seconds]
11:08squags has quit [Ping timeout: 480 seconds]
11:09squags has joined #asahi
11:12FireFox317_jannau_, wait, so from macos 12 m1n1 has to be in the same container for the hypervisor to work? I just updated m1n1 with the installer (in a seperate container), but it still fails to boot
11:12FireFox317macos is now panicking with: 'rootvp not authenticated after mounting @bsd_init.c:961'
11:17as400did anyone get kyboard to work on mbp m1pro ?
11:18mpsas400: what is 'mbp m1pro', old one from previous year or new model
11:19mpsI'm lost in their naming scheme
11:20_jannau_as400: yes, it should work on the 14/16 inch macbook pros. you need to add the SPI node to t6001.dtsi
11:26darkapex2 has joined #asahi
11:27as400mps: Macbook Pro M1 Pro 2021
11:28as400jannau: do you have this node somewhere around ?
11:29as400I'm absolutely not comfortable with dtb stuff
11:29mpsas400: aha, thanks (have to find 'market' name for one I have)
11:31darkapex1 has quit [Ping timeout: 480 seconds]
11:37jannaumight need a "power-domain" property if combined with pmgr
11:42kettenisit would indeed:
11:55as400Thanks guys
12:07mpsI don't know details but because keyboard works maybe these patches could be sent to kernel ML
12:11kettenismarcan will undoubtly tell you they need cleaning up (and I'd agree with him)
12:11j_eyI agree!
12:12j_eyI have a new SPI driver, just not pushed anywhere yet
12:14_jannau_I started looking into adding a spi hid transport
12:15as400Does the touchpad also work ? Or some other property has to be added ?
12:16j_eytouchpad should work
12:16nctcf^ has joined #asahi
12:16j_ey_jannau_: oh cool
12:18svenwould be nice to get a spi driver on the ML at some point
12:18kettenisit may make sense to add the min/max coordinates for the touchpad in the device tree
12:18kettenissince it seems those vary between models
12:19kettenisand msybe properties describibg the keyboard layout/language
12:19j_eysven: Ive been delaying it since I felt like some more understanding of the hw could be good. but maybe its not that important
12:20mpsas400: in my build touchpad is detected and work with evtest but not with xorg or consolation (daemon which uses libinput on consoles for handling pointing devices)
12:21svenj_ey: as long as there’s no obscure magic or similar weird things it might be good enough. Did you write that driver from scratch?
12:21svenit should be fairly simple since the HW probably doesn’t even do DMA
12:22_jannau_I think apple does spi dma through sio
12:22squags has quit [Ping timeout: 480 seconds]
12:23svenbut I still suspect that SIO just uses a busy loop then
12:23mpsprobably I didn't refactored patches correctly
12:23j_eysven: i used the register defs and stufd from corellium
12:23kettenisthat might actually be a legacy from how this worked in the T2
12:24kettenisI don't think there is a point in making it more complicated than necessary
12:24svenagreed
12:25FireFox317_jannau_, so i can just reduce the security of my main macos partition and then use kmutil to make it boot m1n1? without actually overwriting the actual macos kernel
12:25svenimho just start with a simple driver that doesn’t do DMA and only add that later if it makes sense
12:26j_eysven: i think i sent you the driver, you can see its quite simple. its just some of the register bits that felt a bit weird
12:27svenhmmm… I might’ve forgotten about that. sorry :(
12:29squags has joined #asahi
12:31kettenisplease switch to a compatible that follows our naming scheme before submitting this
12:31kettenisif possible, the same as I mention in
12:32kettenissince that saves me renaming things in the OpenBSD driver ;)
12:35kettenisthe CLKCFG and CLKIDLE bits are maybe a bit questionable
12:35sveni think for clk_prepare_enable the same comment i got for my watchdogv1 applies. technically you should only disable the clock after devm has unregistered the spi controller so you should use devm_add_action_or_reset or however it's called
12:36svenin practise it just doesn't matter because the clock is just a dumb constant frequency clock anyway
12:37squags has quit [Ping timeout: 480 seconds]
12:42svenand yeah, i agree with kettenis that CLKCFG and CLKIDLE sound weird
12:44svenREG_AVAIL_TXFIFO as well because it seems to do available = FIFO_SIZE - REG_AVAIL_TXFIFO
12:44kettenisthe "AVAIL" register actually contains the FIFO levels
12:45kettenismaybe the register needs a better name
12:45squags has joined #asahi
12:54squags has quit [Ping timeout: 480 seconds]
12:55squags has joined #asahi
12:57svenj_ey: so REG_AVAIL just contains the fifo levels and the max value it takes is 0x10 here
12:57sventhat should explain the FIFO_SIZE
12:59kov has joined #asahi
13:00svenBIT(4) in there might be something like tx_fifo_full
13:03bingoChecker has joined #asahi
13:03bgb_ has quit [Read error: Connection reset by peer]
13:07bgb_ has joined #asahi
13:23ianlienfa[m] has joined #asahi
13:31as400jannau: could you loan me your .config ?
13:33marcanmps: see this is why we don't send corellium drivers to the kernel ML
13:33marcanbecause they are mostly wrong :p
13:33marcan(those weird defs came from there)
13:33marcanwe're not going for "it works" here, we're going for maintainability and correctness, and that means doing things right
13:34artemist has quit [Ping timeout: 480 seconds]
13:34marcanj_ey: also, do you think you can implement runtime-pm in that spi driver? that'd be another good test case for the pmgr stuff, and it should be easy to add (and does not add a hard dependency in either direction)
13:36j_eymarcan: I can take a look. im not exactly sure what runtime-pm does.. (im assuming turn stuff off if its idle?)
13:37marcanyes, suspend the device when it is idle. it's what tells pmgr to turn it off.
13:37_jannau_as400: I have no config with enabled keyboard. you need APPLESPI and the config the spi driver introduces
13:37marcanj_ey: look at the patch to add runtime-pm to the samsung driver for an example; also there's a good chance some other SPI driver has it too
13:38marcanthe important thing is MMIO will be inaccessible while suspended, so you need to make sure to always resume it before doing anything
13:38svenj_ey: oh, and unless you enjoy hearing maz rant again: _relaxed everywhere :D
13:40marcanthat too :p
13:45mpsmarcan: yes, I understand your stance on this because I'm one who always (nearly) insist on correctness first but sometimes ... I'm impatient
13:45marcanunfortunately being impatient doesn't make things go faster :(
13:46mpsyes, I agree. and had my fingers 'in fire' whenever I was impatient
13:46artemist has joined #asahi
13:48mpsin last decade I had to work in financial applications field and my knowledge on hacking hardware vanished (mostly) so I can't help with making some drivers and fixes, just could test what all you make
13:48mazsven: I like that I don't have to say anything anymore. the _relaxed police is now doing its job! :D
13:50marcanmaz: btw, did you see that the PERST patches apparently break 10G NICs? my guess is it just takes longer to initialize after PERST...
13:56mazmarcan: where was that reported? 100ms is quite a long time, but I wonder if it could be that the 100us delay before releasing #PERST is too short.
13:57marcanhere, see cth451_desktop's last message
13:57marcanunfortunately there's no dmesg of the failed case
13:58marcan(people, please provide logs!)
13:59mazcould also be that the DT hasn't been updated to take care of the polarity.
13:59mazand please report things over email. I'm not scanning this channel looking for problems!
14:05kettenisdifficult to diagnose problems when people combine random trees with random DTs
14:06bgb has joined #asahi
14:06bgb_ has quit [Read error: Connection reset by peer]
14:10as400jannau: I have them enabled but it restarts config on me. Is this how it's supposed to be using your PKGBUILD ? I'm cross compiling - not sure if it makes any difference.
14:13kovas400, this config has a few other bits, but it has the keyboard stuff https://cloud.kov.dev.br/s/D8o7BTspgkZtPkE
14:14as400kov: thx, I'll try
14:14kov"few other bits" = driver for the usb ethernet I was using, not sure if anything else that is relevant
14:16Gaelan has quit [Quit: ZNC 1.8.2 - https://znc.in]
14:16Gaelan has joined #asahi
14:17FireFox317marcan, how did you find out that the AVD needs firmware? I'm trying to trace the device, but i'm not seeing the firmware getting copied
14:19svenif it's the same co-proc like the others it'll just put the firmware somewhere in RAM and write a pointer to some configuration register
14:21bgb_ has joined #asahi
14:22FireFox317sven, hmm yeah that makes sense. The ADT also states that a DART is used, so maybe that's why i dont see the writes?
14:22sventhe wires are to RAM, that's why you don't see them
14:22sven*writes
14:22svenit'll just map the firmware using the DART then
14:23sailorek1234 has quit []
14:25FireFox317sven, oh ofcourse. I think it makes more sense now
14:26sveni'd expect it to write a pointer to the first 0x8000 bytes of the MMIO region (i.e. the region just before the mailbox interface)
14:27bgb has quit [Ping timeout: 480 seconds]
14:31j_eysven: yes i have relaxed now! :D
14:35as400kov: it's ok now - thx. Which model do you have ?
14:36kovas400, I have the Air, waiting for a Pro 14" Max to be delivered
14:37as400How long does MBA go on battery on Linux ?
14:42kovnot sure, haven't measured that yet, I don't think it'd be representative at this point anyway
14:43aleasto has joined #asahi
14:44as400yes, you're probably right. But it would be nice starting point if somebody measured it and then we could compare it after few months.
14:51marcansven: I'm not even sure if AVD has the same mailbox though
14:51marcanit's not an ASC style thing as far as I could tell
14:52svenoh, hrm. true
14:52marcanit's just a random M3 core they threw into that IP block
14:52svenhrm, might be more similar to the thunderbolt co-proc mailbox then
14:52sventhat one's at least called "M3"
14:52marcanor just custom
14:52marcanit's not an m3wrap
14:52marcanit's just "there happens to be an m3 inside avd"
14:52svenhrm, okay. probably custom then
14:56marcanfirefox317: I was poking around ioreg to find out what codecs/levels it supports, and I found a firmware-size property and that set all the alarms ringing
14:56marcanI looked at the kext and it has the firmware embedded (a whole bunch actually, for different IP core versions)
15:05FireFox317yep presumably supports ADS HEVC AVC and H264
15:10as400I'm trying to compile kernel with keyboard support for t6001 but it seems I'm missing "pinctrl_nub" node. Anyone knows how to define it ?
15:11nctcf^ has quit [Remote host closed the connection]
15:15kettenisshould use apple,t6000-pinctrl instead of apple,t8103-pinctrl
15:15as400jannau: thx - you're the saviour.
15:16as400kettenis: thx - I was going to ask this question
15:23_jannau_the hw decoder support vp9 as well
15:26_jannau_kettenis: not that it makes a practical difference. t600x support still PoC and needs cleanup
15:39kettenisthe driver matches on apple,pinctrl
16:14bgb has joined #asahi
16:18bgb_ has quit [Ping timeout: 480 seconds]
16:20marcanfirefox317: AVC is H264 and I don't think it supports Adaptive DNA Storage...
16:20marcanit supports AVC, HEVC, and VP9
16:21marcanthough apple calls VP9 some weirdo internal codename I forget all throughout their driver stack, because I guess it was secret or they're allergic to calling it VP9 or something?
16:33Gaelan has quit [Quit: ZNC 1.8.2 - https://znc.in]
16:34Gaelan has joined #asahi
17:14as400 has left #asahi [#asahi]
17:17bingoChecker has quit [Quit: Leaving]
17:26dottedmagmarcan: Is it prores 422?
18:13marcandottedmag: prores is a separate hardware block, not AVD
18:27Misthios has quit [Quit: Misthios]
18:27Misthios has joined #asahi
18:28nrl^ has joined #asahi
18:31Misthios has quit []
18:32Misthios has joined #asahi
18:44Misthios has quit [Quit: Misthios]
18:44Misthios has joined #asahi
18:46Misthios has quit []
18:47Misthios has joined #asahi
18:55Misthios has quit [Quit: Misthios]
18:55Misthios has joined #asahi
18:56X-Scale` has joined #asahi
18:56Misthios has quit []
18:56Misthios has joined #asahi
19:00X-Scale has quit [Ping timeout: 480 seconds]
19:13aleasto has quit [Ping timeout: 480 seconds]
20:54opticron has quit [Ping timeout: 480 seconds]
20:56bgb_ has joined #asahi
20:57___nick___ has joined #asahi
20:57HardWall has quit [Remote host closed the connection]
20:57___nick___ has quit []
20:59___nick___ has joined #asahi
21:03bgb has quit [Ping timeout: 480 seconds]
21:08___nick___ has quit [Ping timeout: 480 seconds]
22:45kode54they call it VP9 in the SDK headers, at least
23:41povik has quit [Ping timeout: 480 seconds]
23:45jannauhttps://github.com/jannau/AsahiLinux-PKGBUILD updated with keyboard/trackpad support
23:49povik has joined #asahi
23:50X-Scale has joined #asahi
23:54X-Scale` has quit [Ping timeout: 480 seconds]
…