marcan changed the topic of #asahi to: Asahi Linux: porting Linux to Apple Silicon macs | Not ready for end users / self contained install yet. Soon. | 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
MajorBiscuit has quit [Quit: WeeChat 3.3]
<marcan> j`ey: I'm bringing up support on a new chip; there's a good chance it works on the M1 chip just adding the IDs now
nabaiste^ has quit [Ping timeout: 480 seconds]
<j`ey> marcan: oh ok, cool!
nabaiste^ has joined #asahi
<fionera[m]> Hi y'all I finally got myself a m1 max today and made it boot a nixos install with the asahi kernel. I noticed that the system doesnt reset on shutdown and just halts, is that a known issue?
Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Dcow has joined #asahi
<steffen[m]> fionera: a watchdog driver is required for reboot. I don't know if that's in the asahi kernel branch yet. https://github.com/AsahiLinux/docs/wiki/HW:WDT
<fionera[m]> steffen: I saw this commit and thought it was implemented :) https://github.com/AsahiLinux/linux/commit/389d64447cee1e5727e1acf70c0fd4bce9ab9c73
Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
riker77_ has joined #asahi
riker77 has quit [Ping timeout: 480 seconds]
riker77_ is now known as riker77
darkapex1 has joined #asahi
darkapex has quit [Ping timeout: 480 seconds]
kov has quit [Quit: Coyote finally caught me]
<tpw_rules> the watchdog driver is in the asahi branch
<tpw_rules> and it works fine in nixos on mac mini with the CONFIG_APPLE_WATCHDOG=y
<tpw_rules> fionera[m]: does the built in keyboard work for you?
<tpw_rules> (the watchdog facilitates reboot, it hangs on shutdown for me too)
<tpw_rules> fionera[m]: ^
phiologe has quit [Ping timeout: 480 seconds]
<marcan> j`ey: BCM4378 (the one in M1s) works perfectly fine with the work I did yesterday, just added the IDs and rambase
<marcan> well, at least as far as "ip link set wlan0 up"; haven't bothered trying a full install with wireless tools yet
<marcan> so yes, whatever's broken it's something about the new chip
<tpw_rules> marcan: have you published anywhere the script you used to extract the firmware?
<marcan> it's not pushed yet
<marcan> it's not an extraction script right now, it's a renaming script
<tpw_rules> ok
marvin24 has joined #asahi
<marcan> pushed to asahi-installer, go to src/ and run python -m firmware.wifi /usr/share/firmware/wifi /tmp/linux-firmware.tar
<marcan> this will be integrated into the installer itself later, right now it's just that part of the logic
<marcan> (and won't read from /usr but rather from a mounted recovery dmg instead)
<tpw_rules> is there any meaningful differences between the firwmare in the different OS versions?
<marcan> no idea, but probably? they do have security bugs in there
<marcan> they had a nice wifi pwn recently
marvin24_ has quit [Ping timeout: 480 seconds]
<tpw_rules> oh, does the installer avoid downloading the whole ipsw and just get the central directory first?
<marcan> yes
<marcan> it streams it
<tpw_rules> very clever
<marcan> it's just an HTTP-backed block cache layer under the standard zip support in python
<marcan> we're already downloading the whole 1GB recovery image part anyway, so the wifi firmware isn't anything extra
<marcan> this also means we don't need any staging space for the ipsw; everything is downloaded straight to the destination
amarioguy has quit [Ping timeout: 480 seconds]
nabaiste^ has quit [Ping timeout: 480 seconds]
<marcan> ah, actually, NVRAM wasn't being downloaded; with that added it fails... because apparently it *really* wants a macaddr entry in the nvram? heh
<marcan> looks like all but one of the standard linux-firmware nvram files have a default MAC burned in
<marcan> also there's some spurious whitespace in a few of Apple's nvram files that Linux hates
<marcan> sounds like I should have the firmware copier also fix these things
<tpw_rules> it would also be good if you could have it sort the files before putting them in the tar, for reproducibility
<marcan> yeah, I think right now I sort the files at scan time but not directories?
<tpw_rules> i admit i checked in a pathological case, but that is not enough
<marcan> yeah, I'll just sort the output of the final file generator
<tpw_rules> also, are all those different firmwares really relevant to m1 machines?
<marcan> no, some are for T2 machines
<marcan> which are largely identical as far as wifi, except the module name and antenna SKU will have to come from DMI or UEFI vars or something
<marcan> I intend to work that out once the M1 stuff is done, so the same patch works for everyone
<tpw_rules> ok. i don't think 9 megs is a problem but not carrying around the T2 ones might help reduce the number of versions of that tar
<marcan> maybe, but then we'd have to start shipping a list of firmwares to filter, and meh
<tpw_rules> that's fair
<marcan> I'd rather just ship everything for everyone
<tpw_rules> does idevicerestore work on m1 macs yet? can it recover from destruction of the NOR flash?
<marcan> tpw_rules: it works, I haven't tested NOR destruction yet
<marcan> I semi-recently made it work for Monterey, it should work on all machines
Glanzmann has quit [Quit: EOF]
<long[m]> thanks everyone for all that you do. I'm excited to get an M1 Mac sometime soon, but have a 2019 Macbook Air (2019 Intel) with a T2 chip in it. Am I understanding it correctly that with all the work that's being done for the M1 Mac's I'd be able to benefit from it on my Intel Macbook Air 2019 with a T2 chip in it? Sorry for the silly question, but a lot of this is waaay over my head.
<long[m]> wanting to eventually get Linux properly working on that 2019 Macbook Air so it's not just sitting in a drawer lol
<marcan> long[m]: wifi yes, also keyboard/touchpad may improve (at least code-wise, not sure if anything users would notice)
<marcan> most of the rest is not really related
<long[m]> great! thank you marcan. I was debating selling it to aid in paying for the M1 Macbook Air
chadmed has joined #asahi
<jannau> the updated touchpad driver will report pressure and we will probably figure out how to use the force touch actuator
<jannau> not sure where force touch would be implemented
<marcan> looks like 4387 works fine too with the macaddr fix and proper ramsize
<marcan> not sure why the ramsize calculation that works for all the other chips doesn't work here
<marcan> I guess there's some kind of carveout or something we don't know about
<marcan> ah... I think I know what's going on
<marcan> different bank sizes for chunks of RAM at the end; the calculation assumes a constant bank size
<marcan> spoke too soon, fails now? maybe there's some race
<marcan> yeah, it works sometimes and fails sometimes, wonder what's up
<chadmed> jannau: you could probably just have it report to libinput as a gesture so that its user/DE configurable
<chadmed> or as mouse button 3
amarioguy has joined #asahi
<jannau> the pressure? that is already reported as pressure and libinput / user space may do with it what they want
<chadmed> nah i mean the force touch event, as i understand your msg that is registered by the touchpad independent of the pressure reporting
<jannau> ah, that is already reported as click, I was speaking about the feedback
<chadmed> ah right yeah that makes more sense
amarioguy has quit [Ping timeout: 480 seconds]
<zimsneexh> I'd love to try the wifi patches but how does wifi.py work? What args does it need?
somdkls^ has joined #asahi
<marcan> 13:28:34 <@marcan> pushed to asahi-installer, go to src/ and run python -m firmware.wifi /usr/share/firmware/wifi /tmp/linux-firmware.tar
<marcan> the wifi patches aren't ready yet
<zimsneexh> oh i read the tweet about it working fine on M1 and thought i'd try, guess i'll wait more then
<mps> marcan: you mean this branch https://github.com/AsahiLinux/linux/commits/wifi-wip is not ready yet?
<zimsneexh> That's the branch i was gonna try aswell
<marcan> yes, it's not ready yet, that's why it says "wip"
<marcan> seriously, you guys...
* mps impatiently wait for it
<marcan> that's just something I pushed last night because alyssa wanted to look at my OTP parser
<marcan> "it worked once for me" != "here's a branch for everyone to test"
<marcan> if I didn't link a branch for people to try then it's not ready
<mps> marcan: np, I can wait for sure. and thanks again for good work
<zimsneexh> of course.
<zimsneexh> I was just curious and thought I'd give it a try - I didn't expect it to be working flawlessly or anything of the sorts
<marcan> sure, but until we're at the point where it works properly for *me* and I've implemented everything that needs implementing there's no point in people trying it, because you're all just going to run into all the issues I already know about
<kettenis> marcan: on the j293 the wifi firmware sometimes doesn't come up
<kettenis> (with the OpenBSD driver)
<kettenis> but on j274 it always seems to work
<zimsneexh> Well aware, just curiousity like I said
<marcan> kettenis: I suspect there's a race condition somewhere, where the firmware comes up before the host has initialized something it needs to initialize, and crashes
<kettenis> marcan: so your issue is also that the firmware sometimes doesn't come up?
<marcan> it outright crashes; at least the '87 has console debug and spits out a big crashlog
<kettenis> (I haven't spent a lot of time investigating that problem since it tries a 2nd time when the interface is brought up and that attempt almost always succeeds)
<marcan> it actually comes up, then immediately crashes
<Namidairo> did brcm80211 even have any 11ax hardware before this
MajorBiscuit has joined #asahi
kov has joined #asahi
<NightRaven[m]> @mps it works image2.gz thanks so much give me a Ping if you want be to try to any other .gz files
chadmed has quit [Remote host closed the connection]
chadmed has joined #asahi
<NightRaven[m]> Hi I am stuck on something I have added a user but how can I add it to the login system
<mps> NightRaven[m]: well, I think I will build kernels next days as new things (drivers) are added (and improved or fixed)
<NightRaven[m]> mps: Oh ok
<mps> I hope I will start to write short howto and scripts about installing alpine
<mps> but as usual depends on free time and how much I have to work on $day_job
<chadmed> the easy solution is to simply not have a day job ;)
<mps> chadmed: :-)
Glanzmann has joined #asahi
<Glanzmann> mps: I was thinking about doing the same thing for Debian Linux.
<Glanzmann> mps: Like my asahi.txt but with less complicated steps and a video.
<mps> Glanzmann: nice, then we could share work
<chadmed> i had planned on working on something for artix and gentoo while i have some time off but my 14" is still in processing and isnt due to ship until im meant to be on a sailing trip :(
<chadmed> hopefully i have some time toward the end of jan to have a look at it before uni starts again
<NightRaven[m]> mps: I found something when you do reboot it work but when you try to shutdown it gets stuck
<j`ey> NightRaven[m]: known issue
<NightRaven[m]> Oh ok
<mps> besides all works I do, I'm nominated by alpine to get one SBC from RISC-V foundation to add/improve alpine on riscv64
<mps> board is not arrived so maybe I should hurry with m1
<mps> NightRaven[m]: poweroff still doesn't work, driver is not yet added to kernel
<NightRaven[m]> Oh ok makes sense
<Glanzmann> mps: My idea was the following, boot to 1tr, use the asahi installer to get the sub partition, create a partition and curl | gunzip | dd a minimum debian installation on the block device. And supply a boot chain that can boot of that netboot image.
MajorBiscuit has quit [Ping timeout: 480 seconds]
<mps> Glanzmann: well, that could be long-term solution ofc. for now I thinking about creating installation on usb (maybe with u-boot) and instructions how to 'move' it to nvme
<Glanzmann> Glanzmann: I assume marcan will end up doing something similiar but much more furbished and safe in the installer in the end.
<Glanzmann> mps: I see, but I see so many people wanting to try it out in here but struggeling. So I thought about how to make it as fast and easy as possible.
<mps> hackish yes, but for now i intend to write it for experienced users
<mps> later when things settle write 'true' installer
<sven> yeah, it doesn't really help anyone at this point if unexperienced end users are struggling to get something to work that they won't be happy with anyway
<Glanzmann> And to be honest, if I have not done an installation recently I take 2 hours to install Linux on a mac, because I forgot how the asahi installer works and I forget that I need to boot to 1tr to create an empty partition to use, etc ...
<marcan> reminder that u-boot cannot do nvme properly with linux yet
<mps> marcan: yes, I know
<sven> another reminder that nvme in asahi can kernel panic if you look at it wrong :P
<mps> sven: I'm lucky then, didn't happened to me, knocks on wood
<Glanzmann> sven: For me nvme never paniced on the mini and worked several days with it, but i keep that in mind.
<sven> it'll happen when a command times out and the error recovery path is triggered
<Glanzmann> sven: I read that and can imagine it, but it never happened to me. How did you trigger that behaviour?
<sven> don't remember the exact condition, maybe it was also only admin commands
<Glanzmann> Probably. I did a lot of I/O testing also with concurrent I/O, debootstrapped, install hundreds of packages and used it to work with it 12 hours a day ...
egavinc has quit [Quit: Leaving]
<mps> also I used it about 16 hours on day in last few days
<Glanzmann> Only thing that gets on my nerves is the bad random 4k performance, but 'eaymydata' is my friend and than it is fucking fast obviously. But after reading the backlog from sven in -dev I got an idea how fucking complicated this nvme on m1 is.
<sven> 🤷‍♂️
<sven> this thing is still WIP, i _know_ it has issues
<Glanzmann> mps: Me, too. I also do not reboot unless I want to try a new kernel. So I had already uptime with 7 days and longer. And currently my mini has 2 days uptime ...
<mps> I make daily archives to be safe
<Glanzmann> sven: I know, I'm not complaining. I'm just telling you how fucking good it works. :-)
<Glanzmann> mps: I have no state on my workstations that is not somewhere else, so I don't care if I loose all data on my workstation (mostly git repositories).
<mps> only what irritates me is usb realtek wifi dongle, too often reconnents to wifi AP
<Glanzmann> But I never lost anything. Only stupid thing I did is deleting 1tr and wondering why macos was no longer able to apply updates. But marcan talked me through a complete device restore using a second mac, which worked after 3 to 4 retries.
<Glanzmann> mps: I recently bought a wifi-6 access point from tp (EAP660). This thing has a 2.5 GBit/s port. But funny thing is that it give me more throughput when I connect it on a 1 Gbit/s port. Only like 5-10% more.
<mps> I left these things to my son to care for them
<Glanzmann> sven: I just checked, the mini did not give me issues since 27th Sep with the various versions of the NVMe driver. https://pbot.rmdir.de/OxO-xhIPosnjYlIHQSiYbg
<sven> doesn't matter
<sven> as i said, this thing is WIP and i've almost rewritten it
aleasto has joined #asahi
<Glanzmann> sven: Do did a good job. :-)
<sven> there will be a time where testing like this will be incredibly helpful, but right now i already know that the driver has issues and that i've essentially rewritten it anyway
<Glanzmann> s/Do/You/
<Glanzmann> sven: Btw. is there an easy way to tell Linux to never flush the cache or do I need to change the kernel, if I don't want to flush the cache on a sync?
<sven> no idea
<landscape15[m]> <tpw_rules> "landscape15: did you ever get..." <- I didn’t tried yet. I’ll give a feedback if it works ;)
gabuscus has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
gabuscus has joined #asahi
amarioguy has joined #asahi
<Glanzmann> mps: Have you tried this tree? https://github.com/pipcet/linux/commits/pearl The commits from the last 24 hours sound promising. :-)
<dottedmag> An interesting twist: Apple produces so few variants of the computers, and the hardware between variants is so similar that user-testing is of way lesser importance than on PC platform. There are just not many variants to test.
<j`ey> pipcet is doing their own thing.. that's not based on anything that will go upstream
<j`ey> so my suggestion is to not use that, or if you do, at least dont report any issues or whatever here!
<Glanzmann> Oh, I did not know.
<landscape15[m]> mps: honestly I would have set a stricter license for asahi (not MIT)
___nick___ has joined #asahi
___nick___ has quit []
___nick___ has joined #asahi
MajorBiscuit has joined #asahi
amarioguy has quit [Ping timeout: 480 seconds]
darkapex2 has joined #asahi
darkapex1 has quit [Ping timeout: 480 seconds]
<chadmed> landscape15: how come?
Dcow has joined #asahi
m42uko has quit [Quit: Leaving.]
m42uko has joined #asahi
Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<fionera[m]> <tpw_rules> "and it works fine in nixos on..." <- I try to build the kernel in nixos itself rn and then keyboard doesnt work anymore. tho the manually build one works. So its probably smth with the config. I didnt try reboot yet, let me see
<jannau> fionera[m]: keyboard/tp need CONFIG_SPI_HID_APPLE, CONFIG_HID_APPLE, CONFIG_HID_MAGICMOUSE
<jannau> those are currently not enabled by default. mostly an oversight
<j`ey> CONFIG_PINCTRL_APPLE_GPIO=y
MajorBiscuit has quit [Ping timeout: 480 seconds]
Dcow has joined #asahi
<fionera[m]> <jannau> "fionera: keyboard/tp need CONFIG..." <- Yeah I made a derivation that uses the recommended config from the wiki but smh that doesnt work
<j`ey> wiki is out of date
<sven> maybe we should just delete those pages
<fionera[m]> j`ey: It works for me with that tho
<j`ey> ok I guess amw updated it
MajorBiscuit has joined #asahi
Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aleasto has quit [Remote host closed the connection]
JamesTaylor[m] has joined #asahi
MajorBiscuit has quit [Ping timeout: 480 seconds]
MajorBiscuit has joined #asahi
somdkls^ has quit [Remote host closed the connection]
amarioguy has joined #asahi
chadmed has quit [Remote host closed the connection]
n1c has joined #asahi
dsrt^ has joined #asahi
egavinc has joined #asahi
Dcow has joined #asahi
<Dcow> marcan: congrats on the wifi success. really appreciate this.
<marcan> it's not done yet
<Dcow> lol. checked your twitter and thought it's done. it's better than yesterday anyway
<marcan> the firmware likes to crash on startup for some reason
<Dcow> I've always thought that bluetooth will came with wifi, since it's the same chip... could you give us some light on the bluetooth plans?
<marcan> it's a different function
<marcan> it needs its own changes
<Dcow> big or small?
<Dcow> are you planning to work on this in the near future?
leah2 has quit [Remote host closed the connection]
leah2 has joined #asahi
leo60228 has quit [Ping timeout: 480 seconds]
<SamAdams[m]> Have we consulted with this person regarding wifi drivers on Mac OS/Linux? They are doing the same thing, but reverse, transforming Linux wifi drivers to Mac OS. We have the Mac OS Wifi drivers and need to bring them to Linux.
<tpw_rules> that problem is already solved
<tpw_rules> more or less
egavinc has quit [Quit: Leaving]
chengsun has joined #asahi
Fruit has left #asahi [#asahi]
Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Dcow has joined #asahi
Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Dcow has joined #asahi
<mps> Glanzmann: I looked at pipcet kernel few months ago and talked with him in private but decided to not play with because I want to follow that what will be upstreamed
<mps> and using debian is not option for me
<mps> landscape15[m]: what you mean with 'stricter license for asahi'? I didn't set any licence and I don't work on asahi project. did you meant to send msg to someone else?
<Glanzmann> mps: I see.
<Glanzmann> mps: Since you're using Linux on an m1 laptop, do you have anything to adopt the backlight or turn it off?
mavericks has joined #asahi
<landscape15[m]> mps: sorry, I meant the official asahi repo.
<mps> landscape15[m]: I'm not asahi project member
<mps> Glanzmann: no, nothing yet
darkapex3 has joined #asahi
<mps> /sys/class/backlight is empty
darkapex2 has quit [Ping timeout: 480 seconds]
Glanzmann has quit [Quit: EOF]
n1c has left #asahi [#asahi]
Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
leo60228 has joined #asahi
gladiac is now known as Guest8870
gladiac has joined #asahi
Guest8870 has quit [Ping timeout: 480 seconds]
Dcow has joined #asahi
MajorBiscuit has quit [Quit: WeeChat 3.3]
___nick___ has quit [Ping timeout: 480 seconds]
<fionera[m]> is it known that atleast on the m1 max the usb gadged is kinda flaky and fails to init hpm0?
<sven> and the usb curse strikes again!
<sven> i hoped we had fixed hpm issues at this point :(
<j`ey> fionera[m]: heres the old m1n1 issue https://github.com/AsahiLinux/m1n1/issues/101
<fionera[m]> it doesnt happen if I dont have a cable in the machine while booting but its very very flaky and even without touching anything it stops working
<fionera[m]> right now I cant get it to work at all :/ but I dont know why yet
Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Dcow has joined #asahi
<jannau> fionera[m]: under linux? only hpm0? how do you boot?
<fionera[m]> I dont boot at all :( I have to reboot m1n1 until it doesnt happen
<fionera[m]> manually ofc
<fionera[m]> oh now it happend on hpm2. (/me is now actively watching it)
<jannau> I haven't seen any issues but my on device m1n1 is from november 8th with modifications
<jannau> I haven't noticed any issues with chainloading though
<jannau> interesting, I can't update it although kmutil configure-boot did not complain
<jannau> worked now. I might have typed `bputil configure-boot ...`
<jannau> I can't reproduce with vf2eac15 but I feel your pain. rebooting m1n1 through long pressing power is annoying
<jannau> fionera[m]: I don't think the hpm init should be affected by a bad cable but have you tried with a different cable or can easily try?
<fionera[m]> I sadly dont have a reliable way to reproduce it yet since I also dont have a clue how to fix. It fixed itself either by time or switching cables
<fionera[m]> the cable is the official nintendo switch cable so i dont think its bad quality
Latrina has quit [Quit: Powered by AlpineLinux under the supervision of Docker.]
yrlf has quit [Quit: The Lounge - https://thelounge.chat]
Latrina has joined #asahi
yrlf has joined #asahi
el_mugroso has joined #asahi
el_mugroso has quit []
el_mugroso has joined #asahi
el_mugroso has quit []