-
Notifications
You must be signed in to change notification settings - Fork 341
drm: the wlr_output_commit after commiting mode fails #2492
Comments
I did some debugging with gdb and noticed something that might be related to the bug. One breakpoint was set to tinywls After the mode was set in The problem with this is that when debugging with gdb I don't get the |
You can't submit a new output commit before you receive a frame event. This is a limitation of the DRM API. |
@emersion Also would there have been a quick way for me to find out about this without asking here? Edit: Okay I think I understood it now and fixed in my usecase by skipping the frame event that comes directly after changing the mode. Why not just don't send the frame event in the first place? |
You shouldn't need to skip events. Just render in response to a frame event and nowhere else. |
By rendering you mean calling For example if a request from a client of
Or do you mean I should not call If you mean the latter please note that I dont do that. I just set the mode for an output outside of the frame handler. |
Some pseudocode to demonstrate what I mean:
The error message is.
00:00:06.580 [ERROR] [backend/drm/atomic.c:36] eDP-1: Atomic commit failed (pageflip): Resource busy
This does not happen on the wayland backend so I assume this is a bug in the drm backend.
I hacked together a shitty patch to tinywl to demonstrate it.
The patch sets a custom mode to 1000x1000 on an output if a dpms request is send. (You can use the my also shitty wlr-dpms for testing. Use the hack_test branch.)
Tested on wlroots 0.12 with intel graphics.
I would be happy if someone could help me find the bug :)
Edit: To clarify here is the control flow.
wlr_output_power_manager.set_state
wlr_output_set_mode
and thenwlr_output_commit
wlr_output.events.frame
is emitted.wlr_renderer_begin
, wlr_renderer_end`wlr_output_commit
. This commit will fail due to the error mentioned aboveHere are the logs
The text was updated successfully, but these errors were encountered: