]> git.rmz.io Git - dotfiles.git/commitdiff
mkosi/kodi: don't rely on udev to discover joysticks
authorSamir Benmendil <me@rmz.io>
Tue, 29 Dec 2020 14:49:20 +0000 (14:49 +0000)
committerSamir Benmendil <me@rmz.io>
Tue, 29 Dec 2020 17:55:54 +0000 (17:55 +0000)
SDL prefers relying on udev events to discover and register new
joysticks. However inside the container, udev isn't running. We have
mounted /run/udev, but it seems that this is not sufficient.

As a workaround, tell SDL to prefer a fallback method of discovering new
joysticks.

mkosi/kodi/mkosi.extra/etc/systemd/system/kodi-wayland.service

index ab91f0ad784c94a4903ba182728051c755a64183..b455e60cc1e0a353d3e69cdb1ab74029786fa90c 100644 (file)
@@ -7,6 +7,10 @@ Conflicts=getty@tty1.service
 [Service]
 User=kodi
 Group=kodi
+
+# It seems that udev events aren't propagated to sdl within nspawn. So udev hotplug doesn't work.
+# SDL offers alternative methods to discover new devices, inotify and polling, use one of those.
+Environment=SDL_JOYSTICK_DISABLE_UDEV=1
 Environment=WINDOWING=wayland
 
 RuntimeDirectory=kodi