You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Download and compile kmscube: git clone https://gitlab.freedesktop.org/mesa/kmscube.git
Boot into Raspi Bookworm Light (tty only)
Run kmscube
Press Enter to exit process
Note,that this works as expected, on process exit it restore video mode and you can see console text with no issue.
Boot into Raspi Bookworm with Wayfire desktop
Switch to tty with Alt+Ctrl+F1
Run kmscube
Press Enter to exit process
Expected result: video mode is restored and command line appears
Actual result: empty screen, pressed text don't appears on the screen, but you can type clear command and Enter in blind mode and it leads to video mode restore
I tried to save video mode and restore it before process exit and it helps. So there is obvious issue with restore video mode, because process is exited and it's expected to return into original console instead of keep it in unknown mode with no picture.
The text was updated successfully, but these errors were encountered:
qrp73
changed the title
KMS DRM don't restore video mode on process exit when running in parallel with Wayfire
[KMS DRM] don't restore video mode on process exit when running in parallel with Wayfire
Jun 21, 2024
The kernel fbdev emulation that puts the console on the screen is triggered by the close of the last file handle on the relevant /dev/dri/cardN node.
Switching tty using ctrl-alt-fN doesn't make Wayfire close any file handles, although presumably it relinquishes DRM MASTER as otherwise nothing else can use DRM.
kmscube runs and uses KMS, but does not restore anything afterwards (very few apps will). There are still file handles from Wayfire open to the card, so the framebuffer emulation isn't restored and you get a blank screen. There will be a couple of triggers that do reinstate the framebuffer, with your clear obviously being one.
I guess ideally the KMS handling wants to look for whether anyone has claimed master permissions to trigger the framebuffer emulation, but I suspect there are good reasons why mainline haven't tackled that.
Steps to reproduce:
git clone https://gitlab.freedesktop.org/mesa/kmscube.git
Note,that this works as expected, on process exit it restore video mode and you can see console text with no issue.
Expected result: video mode is restored and command line appears
Actual result: empty screen, pressed text don't appears on the screen, but you can type
clear
command and Enter in blind mode and it leads to video mode restoreI tried to save video mode and restore it before process exit and it helps. So there is obvious issue with restore video mode, because process is exited and it's expected to return into original console instead of keep it in unknown mode with no picture.
The text was updated successfully, but these errors were encountered: