ChanServ changed the topic of #asahi-alt to: Asahi Linux: porting Linux to Apple Silicon macs | User-contributed/unofficial distribution ports | Logs: https://alx.sh/l/asahi-alt
chadmed has quit [Quit: Konversation terminated!]
<amw> Glanzmann: I did the re-install and it created a small FAT "EFI - UEFI" partition with uboot, m1n1 and the firmware.tar in it
<amw> It left the rest of the free space un-allocated - so I have added another 200GB partition to my Linux boot!
pjakobsson has quit [Ping timeout: 480 seconds]
pjakobsson has joined #asahi-alt
<Glanzmann> amw: I don't understand. Can you paste 'parted print free'?
<Glanzmann> amw: Do you need help to fix something, or does everything work?
pjakobsson has quit [Ping timeout: 480 seconds]
pjakobsson has joined #asahi-alt
<mps> is there a way to apply plain diff in git tree, someone posted me diff for config of kernel as plain diff
<j`ey> using `patch`?
<mps> j`ey: didn't work
<mps> diff is here https://tpaste.us/qa9K
<mps> looks strange to me
<j`ey> oh that style, never tried with that
<mps> I can apply with patch diff made with 'diff -u' usually
<_jannau_> patch should detect the format automatically. does `patch -n` work? if not the diff is probably corrupted
<mps> _jannau_: no it doesn't work
<mps> `patch -p1 --dry-run < ~/config-asahi.aarch64.diff` => patch: **** Only garbage was found in the patch input
<mps> fixed 'by hand'
<mps> thanks all
isoriano has joined #asahi-alt
<Glanzmann> isoriano: Can you try this kernel and let me know if it improves? https://tg.st/u/linux-image-5.19.0-asahi-00002-ga120b858ebeb_5.19.0-asahi-00002-ga120b858ebeb-1_arm64.deb
<Glanzmann> isoriano: Can you also paste the output of dmesg for the 6.0 kernel?
<isoriano> 3.356969] rtkit-helper 24e400000.mtp: RTKit: syslog message: afe_pwr.c:484: failed waiting on Touch reset completion event
<isoriano> [ 3.459951] rtkit-helper 24e400000.mtp: RTKit: syslog message: bootloader.c:452: Failed to attach to AFE (-6)
<isoriano> [ 3.459967] rtkit-helper 24e400000.mtp: RTKit: syslog message: bootloader.c:453: AFE Chip Boot Failure: No HINT_L
<isoriano> [ 3.459974] rtkit-helper 24e400000.mtp: RTKit: syslog message: afe_pwr.c:496: AFE bootload failed
<isoriano> [ 3.459982] rtkit-helper 24e400000.mtp: RTKit: syslog message: mac_touch_pwr_mgr.c:235: [TPM] Mac Power Manager State Machine Stopped
<isoriano> [ 3.460017] rtkit-helper 24e400000.mtp: RTKit: syslog message: afe_transport.c:179: afe_transport_stop already stopped
<isoriano> [ 3.460071] dockchannel-hid 24eb30000.input: Got GPIO command for bad GPIO multi-touch#167
<isoriano> [ 3.460161] rtkit-helper 24e400000.mtp: RTKit: syslog message: afe_pwr.c:302: AFE reset request failed
<isoriano> [ 3.470089] rtkit-helper 24e400000.mtp: RTKit: syslog message: touch.c:88: Touch Reset Ext Request: OK
<isoriano> [ 3.475128] NET: Registered PF_QIPCRTR protocol family
<isoriano> [ 4.203735] ieee80211 phy0: brcmf_p2p_set_firmware: failed to update device address ret -52
<isoriano> [ 4.205673] ieee80211 phy0: brcmf_p2p_create_p2pdev: set p2p_disc error
<isoriano> [ 4.207199] ieee80211 phy0: brcmf_cfg80211_add_iface: add iface p2p-dev-wlan0 type 10 failed: err=-52
<isoriano> [ 4.470151] rtkit-helper 24e400000.mtp: RTKit: syslog message: afe_pwr.c:484: failed waiting on Touch reset completion event
<isoriano> [ 4.573284] rtkit-helper 24e400000.mtp: RTKit: syslog message: bootloader.c:452: Failed to attach to AFE (-6)
<isoriano> [ 4.573297] rtkit-helper 24e400000.mtp: RTKit: syslog message: bootloader.c:453: AFE Chip Boot Failure: No HINT_L
<isoriano> [ 4.573311] rtkit-helper 24e400000.mtp: RTKit: syslog message: afe_pwr.c:496: AFE bootload failed
<isoriano> [ 4.573329] rtkit-helper 24e400000.mtp: RTKit: syslog message: mac_touch_pwr_mgr.c:235: [TPM] Mac Power Manager State Machine Stopped
<isoriano> [ 4.573343] rtkit-helper 24e400000.mtp: RTKit: syslog message: afe_transport.c:179: afe_transport_stop already stopped
<isoriano> [ 9.500232] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
<isoriano> [ 10.608295] dockchannel-hid 24eb30000.input: Interface multi-touch is already starting
<isoriano> [ 11.103365] rfkill: input handler disabled
<isoriano> [ 20.682416] rfkill: input handler enabled
<isoriano> [ 21.102095] dockchannel-hid 24eb30000.input: Interface multi-touch is already starting
<isoriano> [ 7232.674162] macsmc-rtkit 23e400000.smc: RTKit: syslog message: charger.cpp:1976: Not charging:400001
<isoriano> isoriano@m2mbp-debian:~$
<Glanzmann> isoriano: In the future, please use a paste service, such as https://tg.st/p
<Glanzmann> isoriano: Is you trackpad and bt audio back with the kernel downgrade?
Votes78 has quit [Killed (NickServ (Too many failed password attempts.))]
Votes78 has joined #asahi-alt
isoriano has quit [Quit: Leaving]
isoriano has joined #asahi-alt
isoriano has quit []
isoriano has joined #asahi-alt
<isoriano> No. BT lists the device but you cannot connect to it. Trackpad is not working.
<isoriano> Linux m2mbp-debian 5.19.0-asahi-00002-ga120b858ebeb #1 SMP Sat Aug 13 21:22:23 CEST 2022 aarch64 GNU/Linux
<j`ey> isoriano: sounds like you might have the wrong device tree
<j`ey> or some other reason for the dockchannel GPIOs not being requested
<j`ey> [ 2.730988] rtkit-helper 24e400000.mtp: RTKit: syslog message: afe_pwr.c:484: failed waiting on Touch reset completion event
<isoriano> It worked initially and I was updating from time to time via @Glanzmann's script .. curl -sL https://tg.st/u/ksh | bash
<isoriano> bascially when he introduced the patch for U-Boot and kbd support ..
<isoriano> the touchpad stopped working.
<isoriano> but the kbd in u-boot was working ;-)
<j`ey> does the keyboard work in uboot still
<j`ey> ?
<isoriano> yes
<j`ey> Glanzmann: how does m1n1 uboot etc work on debian?
<Glanzmann> Same as everywhere else.
<j`ey> Glanzmann: but do you have packages or?
<Glanzmann> isoriano: Could you run the 'ksh' script again. I rebuild all artefacts with the 5.19 tree that asahi-dev uses.
<Glanzmann> j`ey: No, I don't have packages. I just have a script that overwrites the to-be-chainloaded m1n1+dtb+u-boot in /boot/efi/m1n1/boot.bin
<j`ey> ok
<Glanzmann> j`ey: Deinstall all old kernels and install the latest.
<Glanzmann> here it is: https://tg.st/u/ksh
<Glanzmann> isoriano: Can you please run 'curl -sL https://tg.st/u/ksh | bash' again and reboot and see if that fixes your issues?
<j`ey> Glanzmann: ta
<Glanzmann> j`ey: Maybe I should build packages for m1n1. But I hope that soon Debian upstream will take care of that and I can go back to sleep. :-) I'm also afraid that everything breaks if u-boot/m1n1/dtb is not in sync with the kernel.
<Glanzmann> So I did not build packages, because I was afraid that someone updated m1n1 without the kernel or vice versa and as a result break their system.
<j`ey> Glanzmann: fair enough
<j`ey> I just wanted to check the dtb had apple,stm-reset-gpios in, and it looks like it does
<isoriano> ok installed will reboot .. ran the script .. this message is intentionally, right?
<isoriano> W: Possible missing firmware /lib/firmware/apple/tpmtfw-*.bin for built-in driver dockchannel_hid
<Glanzmann> Yes, they're normal and to be expected.
<isoriano> ok, reboot now
isoriano has quit [Quit: Leaving]
* Glanzmann knocks on wood thrice.
<Glanzmann> j`ey: I also throught about putting m1n1 in the kernel package, but than you can not install multiple kernels...
<Glanzmann> thoguht*
<Glanzmann> j`ey: Probably not going to happen, but I think the cleanest way would be to teach our boot chain to pick the right device tree on a per kernel basis. Or just wait until the device tree settles.
<j`ey> yeah, backwards compat is a goal.. and is usually fine
isoriano has joined #asahi-alt
<Glanzmann> isoriano: Is everything working again?
<isoriano> No, still does not work while the kbd does ..
<isoriano> Linux m2mbp-debian 5.19.0-asahi-00002-g84ad91b47c9c #1 SMP Tue Aug 16 18:27:52 CEST 2022 aarch64 GNU/Linux
<isoriano> work in uboot.
<Glanzmann> isoriano: Can you please run 'last' and identify the kernel version that worked for you?
<Glanzmann> Than I'll upload you the same.
<isoriano> must have been one of the rc7 versions.
<Glanzmann> Can you install that kernel in addition to the one you already have and pick the rc7 in grub?
<Glanzmann> Let's see if that fixes it.
<Glanzmann> Maybe I should buy an m2 to test these things myself.
<isoriano> rebooting
isoriano has quit [Quit: Leaving]
isoriano has joined #asahi-alt
<isoriano> no. not working. looks like uboot is causing the trouble.
<j`ey> isoriano: did you have keyboard working in uboot before?
<Glanzmann> I see.
<isoriano> because the kbd was not working in uboot while the touchpad was
<j`ey> or did you just update to the ubott with kb support
<j`ey> touchpad in uboot..?
<isoriano> one of the updates also updated uboot
<isoriano> no in Debian
<Glanzmann> j`ey: I used the u-boot 'asahi' branch from kettenis, but switched to the asahi branch once I realized that there was keyboard support in.
<j`ey> Glanzmann: could be worth downgrading that, and trying it out
<Glanzmann> isoriano: Here is a u-boot without the keyboard support: https://tg.st/u/u-boot-2022-08-16.bin
<Glanzmann> You need to download and copy it to /boot/efi/m1n1/boot.bin
<Glanzmann> Make a backup copy of you old boot.bin in the same directory just in case.
<isoriano> rebooting
isoriano has quit [Quit: Leaving]
<Glanzmann> j`ey: What I don't get is, I'm using the same u-boot/m1n1/kernel as asahi-dev and jannau has tested it. So I wonder what breaks the touchpad. When I was debugging the systemd issue for Linus, I also used that branch under Fedora and the keyboard and touchpad worked. Strange.
<Glanzmann> That was on the m2 air of a friend.
<j`ey> yeah I'm not sure either
<j`ey> 'Failed to request GPIO apple,stm-reset-gpios' seems important
<Glanzmann> I see.
isoriano has joined #asahi-alt
<isoriano> Voila!
<Glanzmann> Shit.
<Glanzmann> I mean good, that it works for you, but shit that somehow the new u-boot breaks the touchpad under Linux.
<j`ey> isoriano: on the newest kernel right?
<isoriano> nopes .. still 5.19rc7 .. now I would have to update to the latest kernel
<Glanzmann> The device tree that I packaged with the u-boot comes from the latest kernel btw.
<isoriano> Linux m2mbp-debian 5.19.0-rc7-asahi-00002-g174f375813fe #1 SMP Wed Jul 27 10:48:38 CEST 2022 aarch64 GNU/Linux
<Glanzmann> isoriano: Can you try the latest kernel as well? You can find it here: https://tg.st/u/k.deb
<isoriano> reboot
isoriano has quit []
isoriano has joined #asahi-alt
<isoriano> back for good ... Linux m2mbp-debian 5.19.0-asahi-00002-g84ad91b47c9c #1 SMP Tue Aug 16 18:27:52 CEST 2022 aarch64 GNU/Linux
<Glanzmann> And it works?
<isoriano> yes
<isoriano> uboot no good ..
<j`ey> I wonder if you can test the uboot from asahi/alarm
<isoriano> btw .. one prob still exists which I did not have with Asahi is that BT is not working as well. Lists the device but cannot connect
<Glanzmann> hmm. Did the bt work with the rc7 kernel?
<isoriano> no. not on Debian
<Glanzmann> But bt worked before on Debian?
<isoriano> no
<Glanzmann> Oh, okay. I never tried it myself, but there are others that report that it worked at least on m1.
<isoriano> yeah. This is an M2 13" MBP :-)
<isoriano> It worked on Asahi.
<Glanzmann> I see.
<isoriano> Ok, just let me know in case you want me to test something .. I like to test :-)
<Glanzmann> isoriano: Have you tested on Asahi/Alarm also if the u-boot with keyboard and touchpad works?
<Glanzmann> isoriano: I mean we could test the u-boot that ships with alarm. Let me extract it for you.
<isoriano> Ok.
<Glanzmann> marcan: Is there a seperate installer link for the '-dev' version?
<isoriano> i think it is 5:52 in Japan ... he may be sleeping ..
<Glanzmann> Hopefully.
<Glanzmann> isoriano: Can you drop me your email in a msg or via email and than I get back to you once I found the -dev u-boot?
<isoriano> sure
<Glanzmann> Thanks.
<Glanzmann> Ah, there we go.
<isoriano> ok
<j`ey> thats just uboot, not m1n1+uboot
<Glanzmann> j`ey: Just extracted it, I'll build one.
<Glanzmann> isoriano: Can you put https://tg.st/u/uboot-dev-2022-08-16.bin into /boot/efi/m1n1/boot.bin and make a backup copy of the old boot.bin just in case?
<isoriano> sure
<Glanzmann> I concated it the following way: https://pbot.rmdir.de/u/DlGmsEwVFoOJoAHtb6HGAA
<isoriano> reboot
isoriano has quit [Quit: Leaving]
isoriano has joined #asahi-alt
<isoriano> Back to the original problem .. kbd works in uboot .. touchpad does not work
<Glanzmann> Would be strange if it would be anything different.
<Glanzmann> But good that we ruled that out.
<isoriano> ok
<Glanzmann> isoriano: So, do you have by any chance still alarm installed?
<j`ey> isoriano: touchpad is expected to not work in uboot
<Glanzmann> j`ey: I think he means that the keyboard in u-boot works, but the touchpad in linux does not.
<isoriano> mate .. when i mention touchoad not working then once it has booted :-)
<j`ey> yes but 'kbd works in uboot .. touchpad does not work' isnt worded the best. im trying to be as clear as possible
<j`ey> keyboard in uboot works, but neither keyboard or touchpad work in linux, right?
<isoriano> sorry .. I should be more precise!
<Glanzmann> jannau: Do you have by any chance a m2 mbp 13" and does the touchpad work for you with the asahi-dev repository?
<Glanzmann> isoriano: When you boot linux, and the touchpad does not work in linux, does the keyboard work?
<Glanzmann> Because I think if it does, that would be strange, because it is the same device, isn't it j`ey?
<isoriano> yes sure .. i am typing via the kbd ... not an external one.
<Glanzmann> So things get stranger. Hmm.
<j`ey> Glanzmann: they communicate over different endpoints, so it does seem like they have different 'devices' behind it
<isoriano> To be precise. While I can use the kbd in uboot, once Linux boot i cannot use the touchpad but the kbd as usual.
<Glanzmann> j`ey: I see. So two devices, but same 'spi'.
<j`ey> it's not spi anymore for the m2, it's this 'mtp' co-processor thing
<Glanzmann> Ah, yes, I remeber.
<Glanzmann> isoriano: Have you still the official asahi installed so that we can rule out Debian as the culprit?
<isoriano> No. I would have to reinstall.
<j`ey> it's a shame that dockchannel doesn't tell us why the GPIO request failed
<j`ey> 'Failed to request GPIO apple,afe-reset-gpios'
<Glanzmann> Yep.
<Glanzmann> j`ey: If we're lucky marcan or jannau can reproduce it on m2 mbp 13" and fix it.
* Glanzmann goes to sleep, good n8 everyone.
<jannau> Glanzmann: yes, touchpad works with the asahi-dev repo
<Glanzmann> jannau: Thank you for checking.
<j`ey> ooh
<j`ey> I bet it's related to SMC being a module?
<isoriano> good n8 Glanzmann
<isoriano> ok. i will leave my email with glanzmann and you can let me know if there is something I can test. Thanks for your support.
<j`ey> hm, debian should have CONFIG_APPLE_SMC
<Glanzmann> j`ey: So, it does, but CONFIG_APPLE_SMC=y
<jannau> does it have CONFIG_GPIO_MACSMC=y?
<j`ey> yeah
<Glanzmann> jannau: Yes, it does.
<j`ey> so might not be that then, I just saw an EPROBE_DEFER in the gpio code
<Glanzmann> But I could build isoriano a kernel with the asahi kernel config and see if that fixes it.
<isoriano> What
<isoriano> Yes
<isoriano> I meant
<j`ey> https://termbin.com/eu9l this might help pinpoint the error
<Glanzmann> compiling.
<jannau> could be dtb mismatch regarding rtk-helper, that's in the aahi-dev u-boot but only in the 5.19 release kernel
<jannau> not sure what's exactly is tested but asahi-dev u-boot is not compatible with 5.19.0-rc7-asahi
<j`ey> jannau: we're back on the 5.19 non-rc now
<Glanzmann> jannau: We tested both with the rc7 and the 5.19 release kernel and the 6.0-rc.
<jannau> don't use th 6.0-rc1 one, that one i afaik completly untested
<Glanzmann> jannau: Yep, I removed it. I tested in on m1 air and there it worked.
<isoriano> downloading
<Glanzmann> This is the 5.19.0 without the 4k-iommu patch and the asahi config.
<Glanzmann> jannau / j`ey: The kernels I ship for Debian still have the 4k-iommu patch, maybe that is the culprit somehow.
<Glanzmann> This is also something I should drop.
<j`ey> dont think it's the issue here
<isoriano> reboot
<jannau> content of /sys/kernel/debug/gpio would be interesting
isoriano has quit [Remote host closed the connection]
isoriano has joined #asahi-alt
<isoriano> Ok. so I could not boot the kernel. It fails just after uboot wit a blinking cursor and then it pops up with error initramfs
<Glanzmann> I see, than lets try j'eys patch.
<Glanzmann> Are you still able to boot Linux?
<isoriano> I booted .. Linux m2mbp-debian 5.19.0-asahi-00002-g84ad91b47c9c #1 SMP Tue Aug 16 18:27:52 CEST 2022 aarch64 GNU/Linux
<isoriano> with uboot-dev
<isoriano> and touchpad is working
<isoriano> u-boot-2022-08-16.bin
<isoriano> vmlinuz-5.19.0-asahi-00002-g84ad91b47c9c
<Glanzmann> So now the touchpad works for you. What I don't get is, I thought we have tried that before.
<isoriano> And honestly I am astonished as well! Or did we test uboot-dev with the 5.19rc7 kernel?
<Glanzmann> We tested uboot-dev with 5.19.rc7
<Glanzmann> But we at some point tried the very same tree as uboot-dev with the 5.19 which did not work.
<Glanzmann> So, if you want, you can try to u-boot and see if it still works.
<Glanzmann> curl -sLo /boot/efi/m1n1/boot.bin https://tg.st/u/u-boot.bin
<Glanzmann> And make a backup of the boot.bin, just in case.
<isoriano> rebooting
isoriano has quit [Quit: Leaving]
isoriano has joined #asahi-alt
<isoriano> So it did not work with the latest boot.bin you send (touchpad) and now it is not working anymore with the configuration that was working just before I switched boot.bin
<Glanzmann> Perfect, than it is time or j'eys patch.
<j`ey> (untested of course)
<Glanzmann> isoriano: Also can you please paste /sys/kernel/debug/gpio
<isoriano> -r--r--r-- 1 root root 0 Jan 1 1970 gpio
<isoriano> which uboot shall I use?
<j`ey> isoriano: cat /sys/kernel/debug/gpio
<Glanzmann> isoriano: Stick with the uoot-dev for now that is tested
<j`ey> jannau: looks like the mtp gpios arent in there ^
<isoriano> ok. rebooting.
isoriano has quit [Quit: Leaving]
isoriano has joined #asahi-alt
<isoriano> No change. touchpad not working.
<jannau> shutdown gpio on 23c100000.pinctrl is missing as well
<Glanzmann> can you paste the ouput of 'dmesg'?
<jannau> probe order is different for me
<isoriano> there you go.
<j`ey> oh yeah, smc probes after
<j`ey> #define EPROBE_DEFER 517
<jannau> are CONFIG_HID_DOCKCHANNEL and CONFIG_APPLE_DOCKCHANNEL built as module?
<Glanzmann> jannau: No, both with =y.
<Glanzmann> Recompiling.
<j`ey> hopefully there can be a fix that doesnt require that!
<jannau> that explains the probe order difference but the isue seems to be that the dockchannel driver can not deal EPROBE_DEFER for the gpios. based on the dockchannel debug mesages the gpios might have to requested earlier so that EPROBE_DEFER can be handled by deferring dockchannel probe as well
<Glanzmann> This is the kernel with the dockchannel options as modules.
<isoriano> downloading
<isoriano> and reboot
isoriano has quit [Remote host closed the connection]
<j`ey> jannau: it looks very non obvious how it could handle the probe defer
<j`ey> wait..
<j`ey> PTR_ERR(gpio) == EPROBE_DEFER, should be PTR_ERR(gpio) == -EPROBE_DEFER ?
isoriano has joined #asahi-alt
<isoriano> Voila ... Linux m2mbp-debian 5.19.0-asahi-00002-gbceb3b08f1bc #1 SMP PREEMPT Wed Aug 17 00:16:37 CEST 2022 aarch64 GNU/Linux
<isoriano> working
<Glanzmann> Perfect.
<Glanzmann> j`ey / jannau Thank you for getting to the bottom of this.
<j`ey> marcan: https://termbin.com/86wv (woops left in the first chunk, but maybe leave it in anyway)
<Glanzmann> j`ey: Should we try the patch?
<Glanzmann> isoriano: Up for another round?
<isoriano> Side effect ... my BT icon has disappeared from the toolbar
<isoriano> sure. what next?
<j`ey> Glanzmann: well them being =m will probably mask it, so might want to rebuild them as =y?
<jannau> j`ey: yes, good find
<jannau> marcan: there is 'return -PTR_ERR(dchid->dc);' on https://github.com/AsahiLinux/linux/blob/asahi/drivers/hid/dockchannel-hid/dockchannel-hid.c#L1108 looking wrong as well
<j`ey> yeah
<Glanzmann> isoriano: Compiling a kernel with j'eys patch and DOCHCHANNEL options set to =y and see if it fixes your touchpad issue.
<isoriano> downloading
<isoriano> rebooting
isoriano has quit [Remote host closed the connection]
isoriano has joined #asahi-alt
<isoriano> perfect
<isoriano> but bluetooth is not working at all anymore.
<isoriano> No blueman etc
<Glanzmann> isoriano: Touchpad is working. Perfect.
<Glanzmann> About the BT, that is my fault. The module is not compiled in, one second.
<Glanzmann> This kernel has BT module enabled.
<isoriano> downloading
<isoriano> reboot
isoriano has quit [Remote host closed the connection]
isoriano has joined #asahi-alt
<isoriano> ok. BT enabled, but does not connect to the external soundbox. ok, maybe we can check that at a later point in time.
<isoriano> maybe the fw missing for BT?
<Glanzmann> isoriano: Can you paste the output of 'dmesg'?
<Glanzmann> Thanks, I'll try to get bt working tomorrow for me and than we talk another time about bt.
<Glanzmann> Have a good night sleep, I need it.
<isoriano> good night
<Glanzmann> n8
isoriano has quit [Quit: Leaving]
psykose has left #asahi-alt [#asahi-alt]