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
pb17 has quit [Ping timeout: 480 seconds]
pb17 has joined #asahi-dev
tobhe has joined #asahi-dev
hexdump01 has joined #asahi-dev
hexdump0815 has quit [Ping timeout: 480 seconds]
tobhe_ has quit [Ping timeout: 480 seconds]
nora has joined #asahi-dev
nora_ has quit [Ping timeout: 480 seconds]
___nick___ has joined #asahi-dev
___nick___ has quit []
dramforever has joined #asahi-dev
___nick___ has joined #asahi-dev
___nick___ has quit []
___nick___ has joined #asahi-dev
<dramforever> Hi, I'm currently using a "custom" built NixOS kernel and I'm trying to figure out what i'm doing wrong. I'm on an "Apple MacBook Pro (14-inch, M1 Pro, 2021)" and asahi-6.14.8-1, and on boot, if I have a monitor plugged into HDMI, there's a chance that it hangs around where graphical interface should be starting with only a cursor on the top left on the laptop screen and nothing on HDMI. At this point the system is responsive to sysrq but
<dramforever> otherwise hung...
<dramforever> sysrq "w" tells me dcp_hotplug is blocked and in the stack trace it looks like it's calling apple_crtc_atomic_disable then dcp_poweroff then it tries to mutex_lock which just blocks, so it looks like a deadlock? Is there anything known like that?
<dramforever> (I'm currently trying to copy down the whole stack trace from my photo...)
<chadmed> wayland or x11?
<dramforever> wayland, sddm in fact
<chadmed> is sddm being launched in kwin_wayland? iirc it still doesnt do this by default
<dramforever> oh, it might be weston not kwin_wayland, let me check
<dramforever> no it's kwin_wayland
<chadmed> hmm
<dramforever> i configured it to do that
<chadmed> we did have issues at some point with something similar but i thought the issue was fixed
<chadmed> that was related to planes though and wasnt an issue with crtc ops
<dramforever> this seems to be highly dependent on the timing of loading of a few kernel modules
<chadmed> likely a race or deadlock then
<dramforever> Stack trace is like this https://fars.ee/AH-SPBD-9uv6NFYlpJTSXvT7YzBr
<dramforever> I hope I copied everything down right
<dramforever> is this... supposed to happen? I see drm_client_dev_hotplug twice but I don't know if they're for the same dev
chadmed has quit [Quit: Konversation terminated!]
chadmed has joined #asahi-dev
dramforever has quit [Quit: Leaving]
dramforever has joined #asahi-dev
dramforever has quit [Remote host closed the connection]
ddxtanx has quit [Remote host closed the connection]
ddxtanx has joined #asahi-dev
Calandracas_ has quit [Ping timeout: 480 seconds]
mattia013_ has joined #asahi-dev
mattia013 has quit [Ping timeout: 480 seconds]
mattia013_ is now known as mattia013
flokli has quit [Quit: WeeChat 4.6.2]
flokli has joined #asahi-dev
pb17 has quit [Ping timeout: 480 seconds]
pb17 has joined #asahi-dev
dramforever has joined #asahi-dev
<dramforever> just for the record i'm going back to asahi-6.14.6-1 for now and see for sure if it's just the new update, and then possibly crawl through the git log and see if anything looks like it could be responsible
dramforever has quit [Quit: Leaving]
dramforever has joined #asahi-dev
<dramforever> ... nope same thing in 6.14.6-1
psykose has quit [Remote host closed the connection]
psykose has joined #asahi-dev
<jannau> dramforever: can ssh in and restart sddm?
<dramforever> i can't believe i've never tried that, but honestly i don't expect it to work with the drm thing just locked
<jannau> if it does work, I can reproduce it. Since restarting sddm worked I never blamed it on the driver
dramforever has quit [Quit: Leaving]
pb17 has quit [Remote host closed the connection]
pb17 has joined #asahi-dev
<chadmed> lmfao i spent almost all day chasing an off-by-one
dramforever has joined #asahi-dev
<chadmed> (of my own making of course)
<dramforever> jannau: it does not work :(
<dramforever> on restart sddm asks systemd-logind to open the gpu for it, and then logind joins the team of blocked processes
<chadmed> that sounds like something very wrong with your system. sddm should not need to ask to open the gpu
<dramforever> i'm not sure about the logind part but i'm fairly certain that's how systemd works
<chadmed> oh yes i misunderstood
<chadmed> i thought logind was asking _you_ for permission to open the gpu
<jannau> I assume gpu means the display controllers drm device. not sure if it is sddm itself or if that's deferred to kwin though
<dramforever> yeah sorry, some drm device
<dramforever> the thing i'm seeing is systemd-logind blocked in an open syscall on some drm stuff
<dramforever> i also bpftrace'd drm_client_dev_hotplug and it's definitely the same device both time, so it's recursing and just deadlocking on itself
dramforever has quit [Remote host closed the connection]
pb17 has quit [Ping timeout: 480 seconds]
pb17 has joined #asahi-dev
dramforever has joined #asahi-dev
<dramforever> New observation: I can get this (suspected) deadlock without even starting SDDM. It occurs at the module loading stage. Starting SDDM at the right time actually *prevents* the deadlock
ravikant_ has joined #asahi-dev
<chadmed> is it _only_ with a second monitor plugged in?
<dramforever> yes, if by "second monitor" you're counting the internal display as the first
ravikant__ has joined #asahi-dev
ravikant__ has quit []
dramforever has quit [Remote host closed the connection]
dramforever has joined #asahi-dev
<dramforever> so i reverted this and it obviously solves my problem but that doesn't really explain anything https://github.com/AsahiLinux/linux/commit/794a1166e09f0b836b95c13fc7f999c5a08a6260
<dramforever> (obviously, as in, disconnected_hpd_event which calls drm_kms_helper_connector_hotplug_event deadlocks, so i just removed disconnected_hpd_event)
<dramforever> okay this is the "full" stack trace https://fars.ee/DkfT i get when the deadlock happens
<dramforever> since this happens just with few kernel modules, i could theoretically try to reproduce it with a "clean" kernel and a busybox initramfs but i'm not doing that today...
Calandracas has joined #asahi-dev
ravikant_ has quit [Ping timeout: 480 seconds]
mattia013 has quit [Remote host closed the connection]
dramforever has quit [Remote host closed the connection]
mattia013 has joined #asahi-dev
Ansh has joined #asahi-dev
Ansh has quit []
chadmed has quit [Quit: Konversation terminated!]
chadmed has joined #asahi-dev
chadmed has quit []
chadmed has joined #asahi-dev
chadmed has quit []
chadmed has joined #asahi-dev
chadmed has quit []
chadmed has joined #asahi-dev
chadmed has quit []
chadmed has joined #asahi-dev
cow123_ has quit [Remote host closed the connection]
cow123 has joined #asahi-dev
chadmed has quit [Quit: Konversation terminated!]
chadmed has joined #asahi-dev
chadmed has quit []
chadmed has joined #asahi-dev
chadmed has quit []
chadmed has joined #asahi-dev
chadmed has quit []
chadmed has joined #asahi-dev
chadmed has quit []
chadmed has joined #asahi-dev
chadmed has quit []
chadmed has joined #asahi-dev
___nick___ has quit [Ping timeout: 480 seconds]
pb17 has quit [Ping timeout: 480 seconds]
pb17 has joined #asahi-dev
okb has quit [Read error: Connection reset by peer]
pb17 has quit [Ping timeout: 480 seconds]
pb17 has joined #asahi-dev