-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DrmOutputManager
doesn't work on Apple Silicon (M2)
#1661
Comments
So no, Where exactly does the panic happen? I can not directly correlate the panic to the source here: https://github.com/kenoss/sabiniwm/blob/archive/smithay-4deb3d5-doesnt-work-on-apple-silicon/crates/sabiniwm/src/backend/udev.rs#L1244 From the log it looks like the drm device returns a smithay/src/backend/drm/error.rs Line 91 in c24b431
WouldBlock in this case. Unfortunately https://doc.rust-lang.org/std/io/enum.ErrorKind.html#variant.ResourceBusy is only available since 1.83 which is higher than our MSRV. So we could try to use https://doc.rust-lang.org/std/io/struct.Error.html#method.raw_os_error and match on the raw code for now.
You could either try to patch smithay to handle the error with https://doc.rust-lang.org/std/io/struct.Error.html#method.raw_os_error or for a quick test do something similar with inspecting the error by downcasting it in you (Possible that the driver needs some time for the commit and declines drm operations until it is finished) |
Any chance we could bump the MSRV @cmeissl ? |
I just finished bumping our toolchain to |
Then we probably should do a workaround with raw_os_error. |
I can prepare something tomorrow latest, maybe already a bit later today. |
We already depend on rustix, which provides both. A function to get a errno from an std IO error and a definition for EBUSY. So this should be easyly doable. Will open a PR a bit later. |
Context
I'm updating smithay in my Wayland compositor sabiniwm.
I forked it from anvil and it shares the basic structure with anvil, especially udev.rs.
In this work, I found that a corresponding commit of smithay 4deb3d5 works on a machine with an NVIDIA GPU but doesn't on Apple Silicon (M2).
The branch is archive/smithay-4deb3d5-doesnt-work-on-apple-silicon.
There are two commits corresponding to smithay 4deb3d5 (for backend updates 5186cf7..71dc1c5).
DrmOutputManager
in favor ofSurfaceComposition
. It works on NVIDIA but doesn't on M2.An crash occurs here if we use initial_render.
Log on dfb0f8f (Precisely speaking, 5c86480 with smithay with
warn!()
s):Log on 414f98f:
I found that
DrmOutputBuilder::build()
calls.DrmCompositor::commit_frame()
.Removing the call makes it works (not calling
render_frame()
doesn't affect the behavior):Environment
Machine with NVIDIA, Arch Linux
M2 Mac Book Air, Asahi Linux
Questions and proposition
render_frame()
andcommit_frame()
calls? As the calls don't affect the behavior (AFAICS), I propose to remove them.WDYT?
Note that I tried to reproduce it with anvil, not using sabiniwm, but it crashes and looks not easy. Sorry.
The text was updated successfully, but these errors were encountered: