From 7db3251222835d84e201cfd5b391d6bfc978b63b Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Tue, 29 Dec 2020 14:49:20 +0000 Subject: [PATCH] mkosi/kodi: don't rely on udev to discover joysticks 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. --- .../kodi/mkosi.extra/etc/systemd/system/kodi-wayland.service | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mkosi/kodi/mkosi.extra/etc/systemd/system/kodi-wayland.service b/mkosi/kodi/mkosi.extra/etc/systemd/system/kodi-wayland.service index ab91f0a..b455e60 100644 --- a/mkosi/kodi/mkosi.extra/etc/systemd/system/kodi-wayland.service +++ b/mkosi/kodi/mkosi.extra/etc/systemd/system/kodi-wayland.service @@ -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 -- 2.48.1