ChanServ changed the topic of #asahi-dev to: Asahi Linux: porting Linux to Apple Silicon macs | Non-development talk: #asahi | General development | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-dev
<amarioguy> btw is pmc0 always the cpu cycle register?
<amarioguy> the asahi docs are slightly unclear on this
<amarioguy> (for apple pmcs to clarify lol)
derzahl has joined #asahi-dev
capta1nt0ad has joined #asahi-dev
derzahl has quit [Ping timeout: 480 seconds]
derzahl has joined #asahi-dev
<karpouzi> hmm, feels unlikely that this would be inconsistent with x64 https://lkml.iu.edu/hypermail/linux/kernel/0511.3/1019.html
<karpouzi> (amarioguy)
nsklaus has quit [Remote host closed the connection]
karpouzi has quit [Quit: leaving]
derzahl has quit [Ping timeout: 480 seconds]
derzahl has joined #asahi-dev
capta1nt0ad has quit [Remote host closed the connection]
derzahl has quit [Ping timeout: 480 seconds]
Z750 has quit [Remote host closed the connection]
Z750 has joined #asahi-dev
nicolas17 has quit [Quit: Konversation terminated!]
c10l1 has joined #asahi-dev
c10l has quit [Read error: Connection reset by peer]
steven has quit [Quit: ZNC 1.8.2 - https://znc.in]
steven has joined #asahi-dev
<jannau> amarioguy: pmc 0 and 1 are hardcoded to cycles and instructions
nate8 has joined #asahi-dev
faruk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chadmed_ has quit [Remote host closed the connection]
chadmed_ has joined #asahi-dev
leitao has joined #asahi-dev
MajorBiscuit has joined #asahi-dev
cylm has quit [Ping timeout: 480 seconds]
leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
leitao has joined #asahi-dev
mkurz has joined #asahi-dev
<j`ey> t8110 dart support was applied by joerg, yay, 7 fewer patches in bits/020-t6000-dart
<jannau> probably to late for t8110 device trees
<chadmed_> j`ey: the patch number actually went down for the first time ever with 6.2 :P
<j`ey> :o
jluthra has quit [Remote host closed the connection]
jluthra has joined #asahi-dev
<jannau> sven: dp-altmode works even when connected on boot, only the hotplug event is missing in that case. altmodes/displayport.c doesn't issue that if HPD is set during configuration
<sven> yeah, that's a probe dependency issue
<sven> compare how e.g. usb-role-switch or the typec-mux works to how that OOB event works
<sven> if you manage to have dcp up and running before tipd it'll work even when connected during boot iirc
mkurz has quit [Quit: Leaving]
mkurz has joined #asahi-dev
<jannau> no, the problem I see is that dp_altmode_status_update() is only called once. it set dp altmode up then and never genereates a hotplug event
leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sven> huh, true. never saw that here though
<sven> I vaguely remember making it working during boot by adding a sleep somewhere in tipd
<sven> and I thought I tracked that down to the probe dependency order
leitao has joined #asahi-dev
<jannau> I'm currently using my dcp tree with component based probing, i.e. without deferred probing so it should be up earlier
<jannau> I don't remember if the port links have an influence on probe order but if they do it might be stable now
mkurz has quit [Quit: Leaving]
leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<amarioguy> jannau: gotcha thanks
leitao has joined #asahi-dev
hertz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
espo has quit [Quit: fBNC - https://bnc4free.com]
leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
WindowPa- has joined #asahi-dev
WindowPain has quit [Read error: Connection reset by peer]
espo has joined #asahi-dev
<sven> ping over thunderbolt with dma. for some reason there's a pretty high latency though:
<sven> # ping google.de
<sven> PING google.de (142.250.185.195) 56(84) bytes of data.
<sven> 64 bytes from fra16s52-in-f3.1e100.net (142.250.185.195): icmp_seq=1 ttl=115 time=141 ms
<sven> my internet is sometimes pretty bad but it's not _that_ bad :D
WhyNotHugo_ is now known as WhyNotHugo
<jannau> yeah! so 80ms for the first meter and 60ms for the remaining kilometers
faruk has joined #asahi-dev
<maz> feels like interrupt latency, not DMA.
<maz> are you doing MSIs? or INTx?
<sven> MSIs
<sven> the dma comment was just to say that the iommu finally works, I'm not sure what exactly causes that latency
<maz> right. it could be that the MSI write is buffered somewhere. can you configure the memory type for the MSI mapping?
<sven> I wouldn't know how
MajorBiscuit has quit [Read error: Connection reset by peer]
<sven> well... maybe I'm just gonna blame Broadcom for this
<sven> 64 bytes from fra24s04-in-f3.1e100.net (142.250.186.35): icmp_seq=2 ttl=115 time=17.0 ms
<sven> that's via a USB adapter via my old apple thunderbolt display
<sven> which also completely breaks bus rescanning. I had to rescan like 5 times before everything was up :/
<sven> I need to figure out how to that properly
faruk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
faruk has joined #asahi-dev
leitao has joined #asahi-dev
MajorBiscuit has joined #asahi-dev
___nick___ has joined #asahi-dev
mkurz has joined #asahi-dev
<mkurz> jannau: sven: Just curious: HDMI Out does work on the Mac Mini according to the wiki. the the MacBooks its WIP. Does it depend on some other stuff to make it work?
<chadmed_> mkurz: the hdmi port on the laptops is actually a displayport on an atcphy
<chadmed_> theres a dp to hdmi chip on the board
chadmed_ has quit [Remote host closed the connection]
<maz> sven: do you get similarly high latency with local communication?
chadmed_ has joined #asahi-dev
<mkurz> chadmed_: understand. Hmm.. Not sure if I understand everything correct, but is it possible to connect an external monitor or beamer to the macbook? The wiki says DCP does work in the asahi-edge kernel? Or maybe I just don't get it
<mkurz> chadmed: And if I understand correct DCP is needed for displayport to work?
<maz> I wonder if there is some aggressive PM going on on the TB side that would delay something...
<chadmed_> DCP works, but the code to route a dp signal from it to the type-c phy is not yet in the kernel
<mkurz> chadmed_: You mean the asahi-edge kernel?
<chadmed_> DCP is just the display controller, theres a whole ballet dance that needs to happen between it, the DP routing circuitry, the usb-c mux chip, the ATCPHY...
<sven> maz: I figured out the latency issues, it was mostly me being dumb. I had to enable some quirks I didn't understand in tg3 to make the adapter work. one of them replaced every single register access with an indirect one through config space
<chadmed_> yes, DCP is not the only thing involved here
<sven> the bigger issue is that everything in that tg3 bar reads back as 0xffffffff
<sven> (tg3 is the 15000+ lines broadcom driver)
<mkurz> chadmed_: OK, got it. So currently it is not possible to connect a external display/beamer?
<chadmed_> no, hence why HDMI Out on the feature page is WIP
<mkurz> chadmed_: Sad :(
<maz> sven: tg3 is a horrible driver (to be fair, most bcm drivers are like that). the -1 returns are pretty worrying though.
<sven> yeah, it sounds like something is still a bit broken. no idea what exactly though
<chadmed_> mkurz: itll get there soon enough, better to release something that works reliably than a hacky janky mess
<sven> it only happens with that bcm device so far
<sven> the ohci/ehci controllers in this old thunderbolt display work fine e.g.
<maz> makes you wonder what sort of glue they used to put this contraption together...
<sven> I don't think I want to know ;)
<mkurz> chadmed_: Sure! Looking forward to it! I am very happy with Asahi already!
<chadmed_> society if there was no broadcom: https://imgur.com/a/5XcLfJm
<sven> I think I'm just missing some magic poke somewhere. the adapter works fine under macos
King_InuYasha has joined #asahi-dev
nsklaus has joined #asahi-dev
leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
derzahl has joined #asahi-dev
leitao has joined #asahi-dev
<kettenis_> sven: what thunderbolt ethernet is that? the apple one?
<sven> yes
mkurz has quit [Quit: Leaving]
<sven> it uses the same chip as the internal one
<kettenis_> heh, so I have the same stack of dongles here now
<kettenis_> but no thunderbolt support in openbsd yet of course
<sven> does openbsd already have support for the "normal" Thunderbolt NHI?
<kettenis_> nope; but it nevertheless works on my x9
<kettenis_> guess the firmware handles everything there
<kettenis_> s/x9/x1/
<sven> yeah, there are firmware connection managers especially on older hardware afaik
<kettenis_> it is a gen9 so fairly recent
<sven> shows how clueless I am still about thunderbolt ;)
<sven> does hotplug also work?
<kettenis_> I'm kinda disappointed though; one of the reasons I got the x1 was because I wanted to look at what was needed in OpenBSD to have thunderbolt support
<kettenis_> turns out that apart from a bug in the pci bridge resource management it just worked
<kettenis_> inlcuding hotplug
<kettenis_> just looks like normal PCIe hotplug to the os
<sven> hah. sounds like some firmware somewhere does all the heavy lifting then
<sven> from what I understand the NHI driver establishes the tunnel and then usually the pcie just gets a hotplug interrupt on x86
leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
leitao has joined #asahi-dev
nsklaus has quit [Quit: Konversation terminated!]
nsklaus has joined #asahi-dev
leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
leitao has joined #asahi-dev
seeeath has joined #asahi-dev
faruk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bisko has joined #asahi-dev
faruk has joined #asahi-dev
landscape15 has joined #asahi-dev
landscape15 has quit []
bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bisko has joined #asahi-dev
MajorBiscuit has quit [Ping timeout: 480 seconds]
MajorBiscuit has joined #asahi-dev
cylm has joined #asahi-dev
faruk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
seeeath has joined #asahi-dev
MajorBiscuit has quit [Quit: WeeChat 3.6]
bcrumb has joined #asahi-dev
bcrumb has quit [Quit: WeeChat 3.8]
bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nsklaus has quit [Remote host closed the connection]
<jannau> I didn't noticed until now (or forgot) that hpmBusManager is an i2c device too. macos reads something after interrupts, maybe the interrupt source?
aaron465 has joined #asahi-dev
gladiac has joined #asahi-dev
leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bisko has joined #asahi-dev
WindowPain has joined #asahi-dev
WindowPa- has quit [Remote host closed the connection]
bisko has quit [Ping timeout: 480 seconds]
leitao has joined #asahi-dev
derzahl has quit [Remote host closed the connection]
___nick___ has quit []
___nick___ has joined #asahi-dev
___nick___ has quit []
___nick___ has joined #asahi-dev
bisko has joined #asahi-dev
bisko has quit [Ping timeout: 480 seconds]
bluetail has quit [Quit: The Lounge - https://thelounge.chat]
bluetail has joined #asahi-dev
faruk has joined #asahi-dev
leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hertz has joined #asahi-dev
bisko has joined #asahi-dev
aaron465 has quit [Quit: ZNC 1.8.2 - https://znc.in]
jeffmiw has joined #asahi-dev
<jeffmiw> back trying ot recover my mba M1 that is not booting at all any more (no sign of life). I compiled & installed all the libimobiledevice tools but I'm getting this error when doing an idevicerestore --latest -v :
<jeffmiw> Sending iBEC (497779 bytes)...
<jeffmiw> ERROR: Device did not disconnect. Possibly invalid iBEC. Reset device and try again.
nicolas17 has joined #asahi-dev
<jeffmiw> I can see the device usb enumeration: [Fri Jan 20 20:46:40 2023] usb 3-1.1: Product: Apple Mobile Device (Recovery Mode)
<jeffmiw> anyone faced this previously ? I saw mention that marcan you were able to recover a mpb with idevicerestore ?
<mps> jeffmiw: for me idevicerestore didn't worked and I solved this by using another macbook with macos
<mps> don't know if my problem was like your
<jeffmiw> and how did you solve it ? Latest Apple Configurator 2 ? or something else ? my other mac is a mba 2012 and I can't get latest Apple Conf 2 on it ...
<mps> I used m1 macbook
<jeffmiw> did you have any sign of life (apple logo or missing disk icon ) ?
<jeffmiw> or just a black screen ?
<mps> I had apple logo
<mps> nothing more
<tpw_rules> jeffmiw: you are not in DFU mode
<jeffmiw> and do you remember how usb enum was seen ? was it Product: Apple Mobile Device (Recovery Mode) ?
<mps> but I think if it is identified on other machine it should work, my idevicerestore was old and I was lazy to uprage all 'batteries' needed for it
<mps> jeffmiw: I forgot exact details
<mps> I followed tpw_rules guide above
<jeffmiw> tpw_rules: thanks, let me try to fix this then. usefull guide !
bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chadmed_ has quit [Ping timeout: 480 seconds]
<jeffmiw> having some hope: got into DFU mode for real, got an apple logo now :) thanks tpw_rules !
<nicolas17> DFU mode by itself doesn't show anything on screen, so if you're seeing an Apple logo it means the restore process actually made some progress
<nicolas17> yay
bisko has joined #asahi-dev
<tpw_rules> yeah that means it's pretty much worked
<jeffmiw> humm getting stuck now at the "Waiting for device to enter restore mode..." step. I must have not configured usbmuxd correctly. I did the make & make install, and launched it with sudo. Anything else to be done for it to work ?
<tpw_rules> did you start usbmuxd?
<nicolas17> well, is usbmuxd running?
<nicolas17> on some distros it auto starts on boot or on USB-device-connect (via udev)
bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
___nick___ has quit [Ping timeout: 480 seconds]
jluthra has quit [Remote host closed the connection]
jluthra has joined #asahi-dev
seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
seeeath has joined #asahi-dev
<jeffmiw> ok so I was running an old already installed version of usbmuxd. with the latest one, I was able to recover my mba M1 ! Thanks for the help. Now back to hwmon driver :)
<nicolas17> how did it break in the first place?
hightower3 has joined #asahi-dev
bisko has joined #asahi-dev
bisko has quit []
chadmed_ has joined #asahi-dev
hightower4 has quit [Ping timeout: 480 seconds]
<jeffmiw> I deleted some partitions of the asahi minimal install to grow my asahi linux partition with parted. everything worked well till the next reboot without any sign of life
<jeffmiw> linux=>desktop
<jeffmiw> parted must have left the partition table in a state that iboot was not happy with.
<jeffmiw> note that I have not lost any macos(I have 2 of them) or asahi data while doing the recovery
nate8_ has joined #asahi-dev
nate8 has quit [Ping timeout: 480 seconds]
hertz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bisko has joined #asahi-dev
bisko has quit []
bisko has joined #asahi-dev
bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bisko has joined #asahi-dev
bisko has quit []
nate8_ has quit []
hertz has joined #asahi-dev
chadmed_ has quit [Remote host closed the connection]
chadmed_ has joined #asahi-dev
zalyx has quit [Ping timeout: 480 seconds]