summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-04-24 07:48:11 +0000
committerAlyssa Ross <hi@alyssa.is>2022-05-11 09:23:04 +0000
commita9c192e00d17548f75e18465baf359813bc05e72 (patch)
treed45be9562d29a80c34e294fed86039f3aa74477d
parent316da12490fbe99ebcd54cbf9718fdeaabf19639 (diff)
downloadspectrum-a9c192e00d17548f75e18465baf359813bc05e72.tar
spectrum-a9c192e00d17548f75e18465baf359813bc05e72.tar.gz
spectrum-a9c192e00d17548f75e18465baf359813bc05e72.tar.bz2
spectrum-a9c192e00d17548f75e18465baf359813bc05e72.tar.lz
spectrum-a9c192e00d17548f75e18465baf359813bc05e72.tar.xz
spectrum-a9c192e00d17548f75e18465baf359813bc05e72.tar.zst
spectrum-a9c192e00d17548f75e18465baf359813bc05e72.zip
host/rootfs: fix Weston hotplugging
On the Spectrum host, the kernel delivers uevents to mdevd.  By
default, if mdevd doesn't have a handler for an event, it won't do
anything, and other processes that might be interested in the uevent
hear about it.  This means that Weston isn't notified about input
device hotplugs.  (And USB devices can appear after init has started,
so any USB device counts as hotplugging even if it's attached before
boot or even built in to the computer.)

To fix this, we configure mdevd to rebroadcast events it doesn't
handle on Netlink group 4.  These events will then be picked up by
Weston via libudev-zero, which listens on group 4 for hotplug events.

Reported-by: Ville Ilvonen <ville.ilvonen@unikie.com>
Fixes: 372bacd ("etc/s6-rc: add weston service")
Message-Id: <20220424080020.32216-1-hi@alyssa.is>
Tested-by: Ville Ilvonen <ville.ilvonen@unikie.com>
-rw-r--r--host/rootfs/etc/s6-rc/mdevd/run2
1 files changed, 1 insertions, 1 deletions
diff --git a/host/rootfs/etc/s6-rc/mdevd/run b/host/rootfs/etc/s6-rc/mdevd/run
index f838d2d..c4615c8 100644
--- a/host/rootfs/etc/s6-rc/mdevd/run
+++ b/host/rootfs/etc/s6-rc/mdevd/run
@@ -2,4 +2,4 @@
 # SPDX-License-Identifier: EUPL-1.2
 # SPDX-FileCopyrightText: 2020-2022 Alyssa Ross <hi@alyssa.is>
 
-mdevd -D3 -b134217728
+mdevd -D3 -O4 -b134217728