From: Alyssa Ross <hi@alyssa.is>
To: devel@spectrum-os.org
Cc: Ville Ilvonen <ville.ilvonen@unikie.com>
Subject: [PATCH] host/rootfs: fix Weston hotplugging
Date: Sun, 24 Apr 2022 08:00:21 +0000 [thread overview]
Message-ID: <20220424080020.32216-1-hi@alyssa.is> (raw)
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")
---
Ville, does this fix the internal keyboard and mouse on your ThinkPad T560?
host/rootfs/etc/s6-rc/mdevd/run | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
base-commit: 402c7fd0637e834f97b0ea1a2abb89c417e7469d
--
2.35.1
next reply other threads:[~2022-04-24 8:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-24 8:00 Alyssa Ross [this message]
2022-05-11 9:07 ` Ville Ilvonen
2022-05-11 9:23 ` Alyssa Ross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220424080020.32216-1-hi@alyssa.is \
--to=hi@alyssa.is \
--cc=devel@spectrum-os.org \
--cc=ville.ilvonen@unikie.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://spectrum-os.org/git/crosvm
https://spectrum-os.org/git/doc
https://spectrum-os.org/git/mktuntap
https://spectrum-os.org/git/nixpkgs
https://spectrum-os.org/git/spectrum
https://spectrum-os.org/git/ucspi-vsock
https://spectrum-os.org/git/www
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).