marcan changed the topic of #asahi to: Asahi Linux: porting Linux to Apple Silicon macs | General project discussion | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Topics: #asahi-dev #asahi-re #asahi-gpu #asahi-stream #asahi-offtopic | Keep things on topic | Logs: https://alx.sh/l/asahi
tomtastic has quit [Quit: ZNC - https://znc.in]
tomtastic has joined #asahi
yuyichao_ has joined #asahi
doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
phiologe has joined #asahi
<marcan> PMP is the power metrics thing, yes, but I haven't looked at that part of the interface
PhilippvK has quit [Ping timeout: 480 seconds]
<marcan> powertop should work to the extent that its interfaces are supported currently
<marcan> e.g. its device-pm stats should work with my pmgr driver and its cpufreq stats should work with my cluster-pstate driver
<marcan> but no raw power numbers yet, that would come from PMP (and maybe SMC for the overall battery stat? unsure)
sajattack[m] has joined #asahi
aead has joined #asahi
<sajattack[m]> Hey everyone, really interesting project you have here. Can't say I'm a fan of Apple hardware, but I am a fan of linux and reverse engineering and I thought this would be an interesting place to be a fly on the wall at the very least. Looking forward to following your progress. Cheers.
marvin24 has joined #asahi
marvin24_ has quit [Ping timeout: 480 seconds]
kov has quit [Quit: Coyote finally caught me]
kov has joined #asahi
psykose has quit [Ping timeout: 480 seconds]
psykose has joined #asahi
darkapex has quit [Read error: Connection reset by peer]
darkapex has joined #asahi
<rkjnsn[m]> Does the DCP handling display enumeration and EDID decoding mean that daisy-chained DisplayPort are unlikely to work under Asahi, even if the underlying hardware technically supports it?
<Glanzmann> rkjnsn[m]: http://i.imgur.com/DBQpUPO.jpg
tomtastic_ has joined #asahi
tomtastic has quit [Ping timeout: 480 seconds]
<marcan> rkjnsn[m]: what do you mean by daisy-chained?
<marcan> but yes, our external display support should basically match macOS, as that is largely offloaded to DCP
<marcan> however, I'm not sure the hardware would support much more than what DCP exposes
<ograff> rkjnsn you’re talking about the right side of this diagram right? https://webcube-general.s3.amazonaws.com/eizo/media/contentassets/2017/11/21/daisy_chain.png
<rkjnsn[m]> DisplayPort cable running from my laptop to monitor 1, second cable running from monitor 1 to monitor 2 (both monitors supporting DisplayPort 1.2's MST functionality). On my 2015 MBP, Linux sees both monitors, and I can extend my desktop to both of them. If I boot into macOS, however, it only sees one monitor and the displays mirror each other.
<rkjnsn[m]> Oliver Graff: Yes.
<ograff> (I have no useful technical answer, trying to spin up on the project! Just love helping find diagrams to clarify things :) )
<rkjnsn[m]> I think I read that macOS supports MST to some extent for the case of a single high-res monitor driven by two DisplayPort streams, but for some reason they never implemented support for driving two monitors via MST.
* sven just hopes the M1x/M2/whatever will support two external screens on the macbooks
<marcan> rkjnsn[m]: that's DisplayPort MST, which I'm pretty sure is not supported by the hardware
<sven> but for the M1 I kinda expect that we'll be stuck with a single display just like macOS is
<marcan> there is only a single display controller for the external display
<marcan> it's not a DCP thing
tomtastic has joined #asahi
<izzyisles[m]> Have M1 air, driving 2 ext monitors using displaylink via dell d6000 docking station. More displays possible via displaylink.
<rkjnsn[m]> Yes. For the M1X, at least (I'm planning on buying a 16"), I was originally hoping that the hardware would still support MST for the single panel, dual stream monitors that macOS *does* support, and perhaps Linux would be able to leverage that for dual displays like on the 2015 MPB.
<ar> sven: the thing i'm amazed about, is that on the m1 mini, if you want 2 displays, only one of them can be on usbc→dp
<sven> sure, but that's unrelated. displaylink is essentially just a display-controller-over-usb3
<sven> ar: yeah... that's because they hooked up the internal display output to a dp->hdmi converter for the first display. and the external display output is hooked up to both usb-c ports :/
<ar> I've used 2×4k displays via a displaylink docking station 2 jobs ago, and it was a pain. even dragging an empty notepad window around was laggy
tomtastic_ has quit [Ping timeout: 480 seconds]
<marcan> displaylink is just a USB device, nothing magic there
<marcan> that will work on any system with USB
<sven> i accidentally bought a tb3 dock with displaylink first. they macOS driver is also painful at best
<sven> *their
<ar> marcan: assuming the drivers actually work ;)
<ar> iirc at one point their linux drivers spewed logs to dmesg… encrypted
<sven> lol
arahael has quit [Quit: WeeChat 2.7.1]
<sven> that reminds me of some logs from some 3rd party component i had to look at for $some-former-employer. i assumed they were just corrupted because i had to XOR each char with 1 but when i sent a bug report they were seriously surprised I could read their "encrypted log files"
aleasto has joined #asahi
tomtastic_ has joined #asahi
tomtastic has quit [Ping timeout: 480 seconds]
<MagMell[m]> Does the mu-one/linux 20211005 branch have merged NVME support? I still can't find any NVME disks here
<j_ey> MagMell[m]: it does
<Glanzmann> MagMell[m]: On which hardware are you trying?
<MagMell[m]> Glanzmann: Mac mini M1
<Glanzmann> MagMell[m]: Strange. Do you want to upload me the kernel and I try on mine?
<chadmed> if youre not using an initramfs youll have to say Y to it, not M
<Glanzmann> MagMell[m]: These instructions work for me: https://ab34.de/u/asahi.txt
<MagMell[m]> Glanzmann: wait
<MagMell[m]> but i set CMDLINE
<MagMell[m]> s/but i set CMDLINE/but I set CMDLINE as root=/dev/nvme0n1p3 rootwait/
<Glanzmann> MagMell[m]: This asahi.macho includes a kernel and an initramfs?
<MagMell[m]> Glanzmann: I did follow here, but I changed the config a bit, I was afraid that something was missing
<MagMell[m]> Glanzmann: includes kernel, no initramfs
<j_ey> you dont have BLK_DEV_NVME_APPLE in there
<MagMell[m]> I just rebase a 4k iommu patch, I don't know if it has anything to do with this?
<MagMell[m]> j_ey: ok thx
<chadmed> that config is missing a bunch of options that should be there
<j_ey> you need to =y all the new options that are added in the commits on that 2021... branch
<MagMell[m]> I'd better refer to ab34's config, thanks
<sven> they should default to y if you select ARCH_APPLE
<chadmed> sven: it is selected, i think some things messed up when he rebased
<Glanzmann> MagMell[m]: Btw, do you have a rootfs already on the nvme?
<MagMell[m]> Glanzmann: rootfs is there, I just tried to switch over from corellium's kernel
<Glanzmann> MagMell[m]: Have you tried to boot with my kernel?
<MagMell[m]> Glanzmann: no, I only tried the repo inside ab34/asahi.txt
<MagMell[m]> s/inside/in/
<Glanzmann> I see.
<Glanzmann> MagMell[m]: When you run git describe head in that repo do you get v5.14-rc5-11989-g1ba6f2dff23b?
<MagMell[m]> Glanzmann: ```root@s-50bd0792 [ linux@20211005 ] ! git describe HEAD
<MagMell[m]> ```
<MagMell[m]> v5.14-rc5-12255-ga87b378accea
<MagMell[m]> s/root@s-50bd0792//, s/[ linux@20211005 ] ! git describe HEAD//
<Glanzmann> I see. I did a git pull, rebuilding and trying to reproduce, let you know how it went.
<MagMell[m]> But here I rebase the three patches of 4k iommu on the 20211005 branch, this information should not help
<j_ey> MagMell[m]: that's already in that branch
<MagMell[m]> j_ey: in20211005?
<MagMell[m]> > <@_oftc_j_ey:matrix.org> Mag Mell: that's already in that branch
<MagMell[m]> * in 20211005?
<sven> that's an old version of the DART driver
<sven> it did support 4k pages but not in a sane way
<sven> you just want the code that's upstream instead
<MagMell[m]> oh...ok
<Glanzmann> MagMell[m]: I get a kernel panic.
<sven> 4k page support is not there yet, that needs additional work
<j_ey> but that's not needed for nvme
<sven> i'd just recommend to stick to 16k kernel for now unless you have a good reason for 4k
<sven> i'm pretty sure DCP won't work on 4k kernel right now either
<j_ey> I thought alyssa was using 4K..
<sven> i think that's her screen resolution and not her kernel page size :D
<j_ey> >:D
<chadmed> LMAO chuckling rn
<Glanzmann> MagMell[m]: I managed to build a kernel using alyssa's branch 20211003. I updated the instructions: https://ab34.de/u/asahi.txt (Press Ctrl+r in your browser)
<Glanzmann> That works, I build from scratch (including m1n1)
<Glanzmann> x works as well.
<chadmed> now try wayland :D
<Glanzmann> MagMell[m]: If it doesn't work for you, let me know, than I help you with it.
<Glanzmann> j_ey / sven : alyssa seems to use 16k pages: CONFIG_ARM64_16K_PAGES=y
<sven> yeah, as i said: dcp wouldn't work with 4k pages even with my patches right now
<j_ey> Ok, my bad
<MagMell[m]> Glanzmann: I'll try it now by pressing alyssa config first
<MagMell[m]> First try 16k can work, and then according to this slowly adjust it
<sven> 4k will not work right now no matter you do
<sven> +what
<MagMell[m]> I see
<j_ey> sven: not even if you patch it to make it work? :P
<Glanzmann> MagMell[m]: I also used alyssa config from the webserver with the expired ssl certificate.
<sven> j_ey: fair enough :D
povik has joined #asahi
<chadmed> will fex work without 4k pages? intuition tells me no, but im yet to try it
<nsklaus> chadmed: i'm answering a bit on the side but, it seems the team (through sven) is working on making 4k kernel for asahi, and marcan also expressed interest in making fex work on asahi, so down the road fex should be made to work on asahi one way or another
<nsklaus> my own interest about having fex running on M1 is gaining ability to run wine
<chadmed> yeah well the only showstopper i foresee is that amd64 uses 4k pages and as such binaries will expect 4k pages and will probably segfault when they see incorrect memory alignment. whether or not fex is able to present 4x 4k pages to an amd64 binary in a single 16k page, whether thats even technically feasible, or whether there exists some other workaround is beyond me though (and why i asked)
<nsklaus> the other day marcan was saying that 16k kernel would be a problem for things like wine, and sven replied there were already 4k kernel for asahi, although a work in progress
<chadmed> i expect that fex will run just fine on the M1 using sven's 4k patches though
arahael has joined #asahi
<nsklaus> we'll see with time how things turn out, but i'd say it seems there's hope for both 4k kernel and fex running on asahi
<chadmed> regardless, gentoo support for AArch64 is, for my use case, mature so the only thing id need fex for at all is running counter-strike which is an experiment i hope to have time for once im done with uni for the year
<j_ey> anyone else interested in VoidLinux on the m1?
<nsklaus> i do :)
<nsklaus> void and artix too
<chadmed> i have a friend who would
<chadmed> marcan seems pretty keen on spinning up an arch root fs already so no worries there
<mini> I actually have genuinely thought about using a m1 mac mini as a low power high performance home router - especially once thunderbolt works
<MagMell[m]> still...
<chadmed> i had intended to do one for gentoo like genpi64 but i think the fact that everything is being upstreamed makes installing gentoo similar enough to the amd64 handbook that it shouldnt really need any extra work once youve got a stage3 expanded into the root partition, which you can do from macos.
<MagMell[m]> My payload: http://athome.utopiosphere.net:2345/asahi.macho with alyssa config
<MagMell[m]> s/My payload: http://athome.utopiosphere.net:2345/asahi.macho with alyssa config/My payload: http://athome.utopiosphere.net:2345/asahi.macho (kernel with alyssa config)/
tylo1 has quit [Ping timeout: 480 seconds]
<j_ey> chadmed: its a shame theres no handbook yet though
<MagMell[m]> s/My payload: http://athome.utopiosphere.net:2345/asahi.macho with alyssa config/My payload: http://athome.utopiosphere.net:2345/asahi.macho (kernel with mu-one/linux no rebase and alyssa config)/
tylo1 has joined #asahi
<chadmed> j_ey: i dont think its a good idea for anyone to try write an arm64 handbook. every platform is so different at this stage that the whole thing will just be littered with quirks and "only do this step if youre using the namajeff computing 69420 board" notes that it would be practically worthless. now that apple has popularised arm workstations, maybe the ecosystem can settle on a platform/boot standard and a handbook
<chadmed> could be written
<Glanzmann> MagMell[m]: I can reproduce your issue on my system. But do you have used alyssa's tree?
<j_ey> chadmed: at least most of the install / setup phases could be similar
<Glanzmann> j_ey: I think its just a matter of which rootfs to extract.
<chadmed> as it stands though, the entire process of installing is similar enough to amd64 that once youve written a short article on how to get a kernel booted on $DEVICE then its all very much the same once youve got a stage3 on to the device's mass storage
<MagMell[m]> Glanzmann: I use mu-one/linux 20211005 branch
<Glanzmann> MagMell[m]: I used 20211003. Let me retry with 20211005.
tylo1 has quit [Ping timeout: 480 seconds]
<Glanzmann> MagMell[m]: Try my kernel and see if it works for you: https://ab34.de/u/Image.gz
<Glanzmann> MagMell[m]: I'm building on Debian stable (bullseye).
<MagMell[m]> I wonder if you don't specify the root here, will it show the available root partitions?
<Glanzmann> MagMell[m]: Yes, it does.
<Glanzmann> Should I reboot and try to be absolutly sure?
<MagMell[m]> No, I trying...
everslick has quit [Remote host closed the connection]
everslick has joined #asahi
<Glanzmann> I tried, scrolls down to fast, I can put a hdmi grabber inbetween.
<sven> pretty sure at least the dtb in that file is wrong. it also doesn't seem to be compiled with ans nvme support
<sven> hrm. or maybe it is
<sven> er, wait. i think i messed up. let me check again
<Glanzmann> MagMell[m]: yes, it does. See video of hdmi grabber: https://ab34.de/u/output.mkv
<Glanzmann> MagMell[m]: I would follow the steps to the point, get a working version, than deviate to whatever you want to do.
<MagMell[m]> Glanzmann: I'm wondering if I should get a USB 3.0 cable, now I'm using kmutil to write the payload in, and then the kernel wrote the root path, but it's still very strange, my compiled kernel shows that the available root partition is empty
<MagMell[m]> * I'm using `kmutil, * kmutil` to
<MagMell[m]> * I'm using `kmutil, * kmutil` to, * root path (using `CMDLINE`), but
<sven> MagMell[m]: the device tree in your payload is wrong
<Glanzmann> MagMell[m]: I use a usb 3 cable from an amd64 box to the m1n1.
<sven> it doesn't contain any nodes for usb, nvme, etc.
<sven> you must use the device tree from the mu-one branch if you want this to work
<Glanzmann> sven: How did you extract the payload?
<MagMell[m]> sven: oh...
<sven> Glanzmann: vim + xxd
<MagMell[m]> got it
<Glanzmann> sven: I see. :-)
<j_ey> Glanzmann: by reverse engineering
<j_ey> sven cant get enough of it!
<Glanzmann> I thought you have fancy tool for that.
<j_ey> binwalk could do it maybe?
* sven sometimes compiles code just to be able to look at it in objdump or something to strip away annoying abstractions :D
<chadmed> MagMell: alyssa uses an initramfs if im not mistaken, so its possible that she has some of the things you need set to Y built as modules and loaded by her initramfs
<j_ey> sven: >:D
<chadmed> youll need to tailor your config accordingly
<sven> pretty sure it's just the devicetree that's wrong
<chadmed> namely, build BLK_DEV_APPLE_NVME set to * not M in menuconfig
<Glanzmann> chadmed: She, does _not_.
<j_ey> Glanzmann: nice, I think then you can use dd with offset=N to get the dtb out
<j_ey> Glanzmann: oh, apparently binwalk can extract
<Glanzmann> j_ey: Yes, it can, just did it.
<MagMell[m]> Works!
<chadmed> awesome, congrats :D
<sven> :)
yrlf has quit [Quit: The Lounge - https://thelounge.chat]
yrlf has joined #asahi
yrlf has quit []
yrlf has joined #asahi
<povik> alyssa: finally got myself a full computer per your suggestion the other day
<povik> now i can do
<povik> root@rootfs:~# apt-get install alsa-tools
<povik> also, the trick to running in hypervisor was masking the right devices in DT
<povik> m1n1 only does that for you in the ADT of course
<rowang077[m]> nani I thought the internal speaker would be something like just beeps but this is actual "real" audio?
<povik> if you mean the proof of concept driver in m1n1, then that is real audio
<povik> dont know of any other speaker
<marcan> internal beep speakers have never been a thing on macs
<marcan> I think even the very first one had a real speaker with real PCM audio
<rowang077[m]> I see. Cool 🙂
<alyssa> j_ey: "I thought alyssa was using 4K.." ....lol
<alyssa> ngl I wouldn't mind a 16k display :-p
<alyssa> chadmed: FEX is not released and neither is Asahi. Give it time.
<alyssa> povik: good :-)
<alyssa> chadmed: I use an initramfs containing the broadcom wifi firmware and that's it. And if you're not doing wifi, you can skip that.
<povik> uh, i want alsa-utils not alsa-tools
c10l has joined #asahi
tylo1 has joined #asahi
chadmed has quit [Remote host closed the connection]
chadmed has joined #asahi
tylo1 has quit [Ping timeout: 480 seconds]
yuyichao_ has quit [Ping timeout: 480 seconds]
<alyssa> ok, I have now run out of excuses to not do my homework right now..
<alyssa> i have the next 5 hours blocked off for it. will it get done? sigh
chadmed has quit [Remote host closed the connection]
chadmed has joined #asahi
jbowen has quit [Ping timeout: 480 seconds]
jbowen has joined #asahi
jbowen has quit [Ping timeout: 480 seconds]
jbowen has joined #asahi
jbowen has quit [Ping timeout: 480 seconds]
jbowen has joined #asahi
jbowen has quit [Ping timeout: 480 seconds]
povik has quit [Quit: Page closed]
jbowen has joined #asahi
yuyichao_ has joined #asahi
tylo1 has joined #asahi
yuyichao has joined #asahi
yuyichao_ has quit [Ping timeout: 480 seconds]
jbowen has quit [Ping timeout: 480 seconds]
<Glanzmann> alyssa: Next time ask me, I'll give you reason not to make homeworks. For example, I tried the Xserver hdmi hotplug. Still not working. :-)
<alyssa> Glanzmann: glances between pile of LaTeX+notebooks and Linux tree with DCP driver
* alyssa sweats
___nick___ has joined #asahi
uncannedbean has joined #asahi
uncannedbean has left #asahi [#asahi]
<Glanzmann> alyssa: Go ahead and do your homework, you'll have the rest of your life for writing drivers. :-)
<alyssa> I also have the rest of my life to learn...
ZestOfBeans has joined #asahi
ZestOfBeans has quit []
<Glanzmann> alyssa: You'll do that anyway. :-)
ZestOfBeans has joined #asahi
ZestOfBeans has quit []
jbowen has joined #asahi
ZestOfBeans has joined #asahi
ZestOfBeans has quit [Remote host closed the connection]
ZestOfBeans has joined #asahi
ZestOfBe_ has joined #asahi
ZestOfBe_ has quit [Remote host closed the connection]
ZestOfBe_ has joined #asahi
ZestOfBeans has quit [Ping timeout: 480 seconds]
ZestOfBe_ has quit [Ping timeout: 480 seconds]
yuyichao_ has joined #asahi
kubes has joined #asahi
yuyichao has quit [Ping timeout: 480 seconds]
ZestOfBeans has joined #asahi
<nsklaus> anyone knows a nice way to move macos away from internal storage to external hdd ? (if possible keep it bootable on the external device, if it is plugged in)
ZestOfBeans has quit [Ping timeout: 480 seconds]
<nico_32> M1 is not able to boot from external device
<VinDuv> The safest way would probably be to install macOS on the external device, and at first boot, use the migration assistant to copy the data from the internal storage
<VinDuv> but yes, the M1 needs a pre-boot partition on internal storage to be able to boot from external AIUI
<VinDuv> Not sure if it’s easy to remove the “internal” macOS install without rendering the “external” one unbootable…
<arnd> I did manage to boot macOS from an external thunderbolt drive, the entire OS other than the pre-boot partition can be on that in principle, you just can't boot Linux that way (yet), and you can't do it on a non-thunderbolt USB drive
<nsklaus> nico_32: i think i made a bootable macos big sur 11.2 on an external device a few month ago. the boot loader may need to be on the internal device but beside that it is possible to have the whole macos on an external device and boot it
<nsklaus> i was thinking of migrating the already installed macos from internal storage to an external one, but if it get cumbersome to do, then maybe i'll just nuke it all and make a fresh install on an external drive.. and have linux only on internal storage (in addition to the 1TR partition for actualy booting)
ZestOfBeans has joined #asahi
<MagMell[m]> This is usb3 known issue?
<arnd> nsklaus: not sure you can actually do a fresh install to an external drive without having a working macos on the internal one.
<MagMell[m]> <MagMell[m]> "image.png" <- No...my ssd is dead :(
erincandescent has quit [Remote host closed the connection]
erincandescent has joined #asahi
<nsklaus> arnd: when i tried having a macos installed on an external drive a few months ago, i also had another copy of it on the internal drive, so you may be right about this, i'll have to try it to confirm if it's possible or not to have only one install of macos and have it on external drive
<nsklaus> my ideal setting would be to have macos on an external drive, just in case i happen to need it, (but i don't plan to particulary use it much) and have maximum space for linux on the internal drive
<nsklaus> having both macos and linux on the internal disk is too much waste of space for my taste
<arnd> yes, definitely. there is a good chance it actually works, I just mentioned it so you don't accidentally break something important if you rely on it and it doesn't work
<sven> MagMell[m]: fwiw, there is no usb3 support yet. the usb c ports only support usb 2 for now
<sven> ah, or maybe you used the usb a ports. those support usb 3 already
<MagMell[m]> sven: Is this in mu-one/linux 20211003?
JTL has quit [Remote host closed the connection]
<sven> "this"?
<sven> the only kernel that currently supports usb 3 on the usb c ports is corellium's
<MagMell[m]> sven: oh, ok
<nsklaus> arnd: i understand, thanks for telling
yuyichao has joined #asahi
ifthenelse has quit [Quit: Ping timeout (120 seconds)]
yuyichao_ has quit [Ping timeout: 480 seconds]
ifthenelse has joined #asahi
JTL has joined #asahi
kubes has quit [Quit: Leaving]
ZestOfBeans has quit [Ping timeout: 480 seconds]
ZestOfBeans has joined #asahi
<Glanzmann> MagMell[m]: You ssd should be nvme... not sda.
yuyichao_ has joined #asahi
<MagMell[m]> Glanzmann: It's because my SSD is connected to a USB3 box
<Glanzmann> Oic. I thought you use the internal nvme.
yuyichao has quit [Ping timeout: 480 seconds]
ZestOfBeans has quit [Ping timeout: 480 seconds]
ZestOfBeans has joined #asahi
ZestOfBe_ has joined #asahi
yuyichao has joined #asahi
yuyichao_ has quit [Ping timeout: 480 seconds]
ZestOfBeans has quit [Ping timeout: 480 seconds]
tylo1 has quit [Ping timeout: 480 seconds]
ZestOfBe_ has quit []
Nspace has joined #asahi
tylo1 has joined #asahi
Nspace has quit []
___nick___ has quit [Ping timeout: 480 seconds]
yuyichao_ has joined #asahi
doggkruse has joined #asahi
yuyichao has quit [Ping timeout: 480 seconds]
jbowen has quit [Quit: leaving]
<alyssa> MagMell[m]: all the USB support in mu-one/linux is sven's code, not corellium's
<alyssa> so.. no usb 3 on the type-c's, but also close to mainline now
aleasto has quit [Quit: Konversation terminated!]
doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yuyichao_ has quit [Quit: Konversation terminated!]
doggkruse has joined #asahi
doggkruse has quit []
yuyichao has joined #asahi
doggkruse has joined #asahi
doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yuyichao_ has joined #asahi
yuyichao has quit [Ping timeout: 480 seconds]