ChanServ changed the topic of #asahi-gpu to: Asahi Linux: porting Linux to Apple Silicon macs | GPU / 3D graphics stack black-box RE and development (NO binary reversing) | Keep things on topic | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-gpu
cylm_ has joined #asahi-gpu
Dcow has quit [Remote host closed the connection]
Dcow has joined #asahi-gpu
Dcow has quit [Remote host closed the connection]
Dcow has joined #asahi-gpu
<maximbaz> jannau: yes 32GB RAM, there are two warnings, one on the second line in the paste above (WARNING: CPU: 1 PID: 85 at kernel/iomem.c:107 memremap+0x1d4/0x21c), and one more earlier [1] (WARNING: CPU: 0 PID: 1 at arch/arm64/kernel/efi.c:28 efi_create_mapping+0x7c/0x168)
cylm has joined #asahi-gpu
cylm_ has quit [Read error: Connection reset by peer]
<lina> alyssa: Yay!! ^^
<lina> maximbaz: Isn't that the no-map issue? I still don't know what triggers that requirement... but try adding no-map; to the reserved-region nodes
<lina> Ohhh... I think this is a u-boot thing!
<lina> maximbaz: Pushed a fix, I think that should work
Dcow has quit [Remote host closed the connection]
cylm_ has joined #asahi-gpu
cylm has quit [Ping timeout: 480 seconds]
cylm_ has quit [Quit: WeeChat 3.7.1]
cylm has joined #asahi-gpu
jole_ has joined #asahi-gpu
jole has quit [Read error: Connection reset by peer]
cylm has quit [Quit: WeeChat 3.7.1]
cylm has joined #asahi-gpu
ella-0_ has joined #asahi-gpu
ella-0 has quit [Ping timeout: 480 seconds]
ella-0 has joined #asahi-gpu
ella-0_ has quit [Ping timeout: 480 seconds]
TellowKrinkle has joined #asahi-gpu
millenialhacker has joined #asahi-gpu
millenialhacker has quit [Remote host closed the connection]
millenialhacker has joined #asahi-gpu
SSJ_GZ has joined #asahi-gpu
cylm has quit [Quit: WeeChat 3.7.1]
millenialhacker has quit [Ping timeout: 480 seconds]
millenialhacker has joined #asahi-gpu
millenialhacker has quit [Ping timeout: 480 seconds]
millenialhacker has joined #asahi-gpu
millenialhacker has quit [Remote host closed the connection]
millenialhacker has joined #asahi-gpu
millenia_ has joined #asahi-gpu
millenialhacker has quit [Read error: No route to host]
millenialhacker has joined #asahi-gpu
millenia_ has quit [Remote host closed the connection]
millenia_ has joined #asahi-gpu
millenialhacker has quit [Read error: Connection reset by peer]
millenialhacker has joined #asahi-gpu
millenia_ has quit [Read error: Connection reset by peer]
joske has joined #asahi-gpu
<joske> lina: it does not fix this logging
<joske> lina: also on latest gpu/rust-wip (and latest m1n1 from your branch), I can get to gdm, but when I log in (GNOME wayland) the screen turns black and I can see nothing. I can switch VT a few times and then I get back to a lock scren, and then I can switch to a text console and reboot. No desktop env works.
<joske> There is no crash in journalctl, gnome-shell seems to start (but screen is black)
MajorBiscuit has joined #asahi-gpu
nuup has joined #asahi-gpu
bluetail3 has joined #asahi-gpu
joske has quit [Remote host closed the connection]
bluetail has quit [Ping timeout: 480 seconds]
bluetail3 is now known as bluetail
kov has quit [Quit: Coyote finally caught me]
kov has joined #asahi-gpu
Dcow has joined #asahi-gpu
millenia_ has joined #asahi-gpu
millenialhacker has quit [Ping timeout: 480 seconds]
MajorBiscuit has quit [Quit: WeeChat 3.6]
millenia_ is now known as millenialhacker
MajorBiscuit has joined #asahi-gpu
cylm has joined #asahi-gpu
MajorBiscuit has quit [Quit: WeeChat 3.6]
MajorBiscuit has joined #asahi-gpu
cylm has quit [Quit: WeeChat 3.7.1]
millenialhacker has quit [Remote host closed the connection]
Dcow has quit [Remote host closed the connection]
Dcow has joined #asahi-gpu
millenialhacker has joined #asahi-gpu
millenialhacker has quit [Ping timeout: 480 seconds]
gff has joined #asahi-gpu
<maximbaz> thanks lina! yeah I get something similar now, after grub everything freezes on "loading initial ramdisk" / "EFI stub: Exiting boot services", I thought it's just display stops working, but seems not the case... I'll try to get back with more useful information
gff_ has quit [Ping timeout: 480 seconds]
<alyssa> So uh.
<alyssa> I guess I'm dogfooding the GPU drivers now?
<alyssa> because after the uprev my computer still works but I guess everything is going through the 3D pipe instead of software rendering lol
<alyssa> GL_VERSION: OpenGL ES 2.0 Mesa 23.0.0-devel (git-9785945ed6)
<alyssa> GL_RENDERER: Apple M1 (G13G B0)
<alyssa> OpenGL vendor string: Asahi
<alyssa> OpenGL renderer string: Apple M1 (G13G B0)
<alyssa> OpenGL version string: 2.1 Mesa 23.0.0-devel (git-9785945ed6)
Gaspare has joined #asahi-gpu
Gaspare has quit [Read error: Connection reset by peer]
millenialhacker has joined #asahi-gpu
millenialhacker has quit [Ping timeout: 480 seconds]
<alyssa> ---
<alyssa> I'm hitting the dart_map_pages WARN pretty regularly with heavy use
<TheLink> Playing darts until someone gets hurt 😛
millenialhacker has joined #asahi-gpu
<alyssa> Lol
millenialhacker has quit [Remote host closed the connection]
millenialhacker has joined #asahi-gpu
<sven> all you need to do is move DCP over to the iommu api i guess :p
<sven> and/or maybe figure out where those allocated pages actually come from
<sven> I actually don’t think they can be 4K because you’re running a 16k kernel. but maybe they are larger pages for some weird reason
<alyssa> sven: Thank you for volunteering!
<sven> I’m about 100km from my m1s right now and once I’m back I have a usb3 bug to fix :p
millenialhacker has quit [Remote host closed the connection]
<alyssa> (-:
MajorBiscuit has quit [Ping timeout: 480 seconds]
<alyssa> jannau: I've noticed that since swiching to Lina's kernel, I get a black picture at the TTY when hotplugging, and need to change TTYs to get text again
<alyssa> this is a regression
<alyssa> I believe in the original DCP prototype, I triggered -- I mean, whoever wrote that code triggered a swap after hotplug, since the linux tty won't ordinarily swap if you don't change TTYs
<alyssa> I don't know if that was removed? or maybe it's wrong and there's some other fix we need?
<sven> ohhh… I think I hit that with dcpext as well and assumed that was yet another atcphy/dptx bug
Dcow_ has joined #asahi-gpu
<jannau> alyssa: I see that with dcpext as well, the link-status bad call is still there with the comment but I had to guard it with checks to avoid NULL ptr derefs
<jannau> hotplug handling might have changed as well
* jannau builds mesa right now to look at the dart warning
Dcow has quit [Ping timeout: 480 seconds]
<jannau> alyssa: asahi/rebased still works on t6002
cylm has joined #asahi-gpu
<alyssa> jannau: woo!
<alyssa> take supertuxkart for a spin? lol
millenialhacker has joined #asahi-gpu
millenialhacker has quit [Ping timeout: 480 seconds]
<jannau> I see now warnings with kodi but video playback is very broken
cylm_ has joined #asahi-gpu
<alyssa> yes kodi is extremely broken right now
<alyssa> haven't debugged that yet
cylm has quit [Ping timeout: 480 seconds]
<alyssa> as in I just get a black screen, no output
<alyssa> Uhhh its X11 renderers, just wayland that's totally broken
<alyssa> so that could be an app bug I suppose
millenialhacker has joined #asahi-gpu
Dcow_ has quit [Remote host closed the connection]
Dcow has joined #asahi-gpu
millenialhacker has quit [Ping timeout: 480 seconds]
<alyssa> jannau: `kodi --windowing=x11` works fine for me, including video playback
<alyssa> Pushed latest asahi/rebased in case there was some other fix I had that I forgot about
Dcow has quit [Ping timeout: 480 seconds]
digicyc has quit [Remote host closed the connection]
digicyc has joined #asahi-gpu
<maximbaz> do I understand correctly that I should be able to pass kernel param "debug_flags=0xffffffffff" (along with say "log_level=7 debug earlycon") in grub, to activate all the extra logging from this commit? I'm getting no logs before freeze, and I feel like I'm doing something silly...
Dcow has joined #asahi-gpu
<jannau> maximbaz: asahi.debug_flags=...
<jannau> `kodi --windowing=x11` works somewhat, video playback stops after a few seconds and it hangs at exit, I have to kill -9 it
<jannau> without the extra commits
<alyssa> jannau: same as me, close enough then :D
Dcow has quit [Ping timeout: 480 seconds]
<alyssa> running `LIBGL_DRIVERS_PATH=~/lib/dri/ DISPLAY=:0 glxgears`, closing the window, and repeating piles of times seems to reproduce the
<alyssa> DRM_IOCTL_MODE_CREATE_DUMB failed: Cannot allocate memory
<alyssa> Failed to create scanout resource
<alyssa> not sure if mesa or kernel leak yet
<alyssa> issue
<alyssa> I am unsure why Xwayland would be creating dumb buffers ... so I'd say we have multiple bugs here
<alyssa> Gallium is really asking for a SCANOUT buffer, uh
<jannau> funky, it takes ~2 seconds in weston+Xwayland until the glxgears window vanishes
Dcow has joined #asahi-gpu
<jannau> reproduced
Dcow has quit [Ping timeout: 480 seconds]
cylm_ has quit [Quit: WeeChat 3.5]
<jannau> it is WARN_ON(ptep[i] & APPLE_DART_PTE_VALID) from the inlined dart_init_pte()
<jannau> maybe an issue with the reserved memory
<jannau> so the leak exhaust all iova space and the iommu code tries to use the boot mappings
<jannau> so possible just a bug in the reserved memory handling on iommu side
<alyssa> ahahaha
<alyssa> My memory leak is helpful after all!
<jannau> dart-disp0 stream 0 looks full, except for some small gaps
Dcow has joined #asahi-gpu
<jannau> it tries to map something in the middle of the boot framebuffer
<alyssa> Oof
<alyssa> So there are (at least) 2 distinct bugs here then
<alyssa> 1 kernel and 1 userspace
<jannau> kernel bug spotted. it reserves the physical address. oversight on my part when I added support for translated reserved regions
Dcow has quit [Ping timeout: 480 seconds]
<jannau> so, yes, the leak found a bug via the WARN_ON
<sven> :)
<jannau> but fixing it breaks dcp since it prevents now the memmap of the rtkit shmem
<alyssa> whoops
Dcow has joined #asahi-gpu
<maximbaz> thanks jannau, I realized that dev_info!(dev, "MMU: Initializing...\n") - which I see in dmesg on HEAD~1 of linux/gpu/rust-wip just before driver crashes - is not conditional on asahi.debug_flags anyway, and on HEAD I don't see that line on screen after selecting a grub entry before everything freezes (with loglevel=7 and
<maximbaz> asahi.debug_flags=0xfffffffff, no quiet)... which makes me think somehow the freeze happens before the driver is running 🤔
<jannau> I guess the display could also freeze because dcp takes over. it would be helpful if you can boot with m1n1's hypervisor and the virtual uart
millenialhacker has joined #asahi-gpu
<jannau> wth! dma_alloc_coherent() fails
<alyssa> jannau: having fun? :p
<maximbaz> gotcha, it's unfortunately the only device I have until weekend, I'll try to get more info then! thanks again for your answers! :)
Dcow has quit [Ping timeout: 480 seconds]
<jannau> you could try to block dcp to see if that gives more information
Dcow has joined #asahi-gpu
<jannau> looks like iova.c can't handle that there's reserved mem at iova 0x0
<maximbaz> I'm up for some more experiments! May I ask for a hint, how to block dcp, or where to read more about it?
millenialhacker has quit [Remote host closed the connection]
<jannau> maximbaz: add module_blacklist=apple_dcp to the kernel commandline
millenialhacker has joined #asahi-gpu
Dcow has quit [Ping timeout: 480 seconds]
millenialhacker has quit [Remote host closed the connection]
millenialhacker has joined #asahi-gpu
Axenntio has joined #asahi-gpu
Axenntio has quit []
Dcow has joined #asahi-gpu
<jannau> I found an ugly workaround: exclude the low reserved iova via aperture_start
Dcow has quit [Ping timeout: 480 seconds]
Dcow has joined #asahi-gpu
<jannau> I wonder if the issues with reserved low iova would go away with unmanaged iommu domains. I suspose it'll remain a problem disp0 which I'd like to keep managed though
Dcow has quit [Ping timeout: 480 seconds]
Dcow has joined #asahi-gpu
zzywysm has quit [Quit: Textual IRC Client: www.textualapp.com]
Dcow has quit [Ping timeout: 480 seconds]
<jannau> alyssa, lina: https://github.com/jannau/linux/tree/gpu/rust-wip-dcp first patch is already in asahi-wip, fixes a dart build as module, 2nd commit prevents hitting that warning in dart_map_pages() but of course doesn't fix exhausting the iova space through memory leaks
Dcow has joined #asahi-gpu
SSJ_GZ has quit [Ping timeout: 480 seconds]
<maximbaz> blocking dcp unfortunately didn't give any extra information - however thank you for your helpful attitude, it's awesome to learn something new here, and I'll try to collect some more useful info when I get my hands on another device
millenialhacker has quit [Remote host closed the connection]
Dcow has quit [Ping timeout: 480 seconds]
millenialhacker has joined #asahi-gpu
Dcow has joined #asahi-gpu
millenialhacker has quit [Ping timeout: 480 seconds]
Dcow has quit [Ping timeout: 480 seconds]