SDL: KMS/DRM backend leaves me stuck with no input, forced to hard-reset machine

I compiled https://github.com/libsdl-org/SDL/commit/32f909f7e36a270d3b761bf15d320906ecd31eb1 hoping to be able to test out the KMS/DRM driver. configure-output.txt config.log.txt

Then I launched my test program with SDL_VIDEODRIVER=kmsdrm on a TTY. While it rendered fine, even with an accelerated SDL_Renderer if desired, none of keyboards and mouse/touchpad worked (it was a laptop with desktop peripherals attached, I tested both external and internal input devices). I was essentially stuck in the application with no way to interact with it or leave, while its animated opening scene rendered fine with no lag. Inside the regular GNOME 3 desktop, I can interact with it just fine.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 32 (17 by maintainers)

Commits related to this issue

Most upvoted comments

As a casual SDL consumer (i.e. pygame committer), I’d say it’s even a pitfall that sometimes with KMSDRM (or Rpi backend) and udev/evdev, there is no way to receive pygame.QUIT events (which are wrapping SDL_QuitEvent). Alt+F4 is just Alt+F4, and there is no window frame with an [x] to click on. This also leaves unsuspecting users forced to hard-reset their machine if they don’t have SSH set up!

Properly solving this would probably require the use of something like seatd, to get access to the input devices in the same way that a Wayland compositor would, without requiring the user to be in the input group.