* [PATCH] host/rootfs: fix Weston hotplugging
@ 2022-04-24 8:00 Alyssa Ross
2022-05-11 9:07 ` Ville Ilvonen
2022-05-11 9:23 ` Alyssa Ross
0 siblings, 2 replies; 3+ messages in thread
From: Alyssa Ross @ 2022-04-24 8:00 UTC (permalink / raw)
To: devel; +Cc: Ville Ilvonen
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] host/rootfs: fix Weston hotplugging
2022-04-24 8:00 [PATCH] host/rootfs: fix Weston hotplugging Alyssa Ross
@ 2022-05-11 9:07 ` Ville Ilvonen
2022-05-11 9:23 ` Alyssa Ross
1 sibling, 0 replies; 3+ messages in thread
From: Ville Ilvonen @ 2022-05-11 9:07 UTC (permalink / raw)
To: Alyssa Ross; +Cc: devel
On Sun, Apr 24, 2022 at 11:02 AM Alyssa Ross <hi@alyssa.is> wrote:
>
> 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?
It does. Thanks a lot.
-Ville
>
> 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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] host/rootfs: fix Weston hotplugging
2022-04-24 8:00 [PATCH] host/rootfs: fix Weston hotplugging Alyssa Ross
2022-05-11 9:07 ` Ville Ilvonen
@ 2022-05-11 9:23 ` Alyssa Ross
1 sibling, 0 replies; 3+ messages in thread
From: Alyssa Ross @ 2022-05-11 9:23 UTC (permalink / raw)
To: Alyssa Ross, devel; +Cc: Ville Ilvonen
This patch has been committed as a9c192e00d17548f75e18465baf359813bc05e72,
which can be viewed online at
https://spectrum-os.org/git/spectrum/commit/?id=a9c192e00d17548f75e18465baf359813bc05e72.
This is an automated message. Send comments/questions/requests to:
Alyssa Ross <hi@alyssa.is>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-11 9:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-24 8:00 [PATCH] host/rootfs: fix Weston hotplugging Alyssa Ross
2022-05-11 9:07 ` Ville Ilvonen
2022-05-11 9:23 ` Alyssa Ross
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).