[systemd-devel] [PATCH] login: rerun vconsole-setup when switching from vgacon to fbcon

David Herrmann dh.herrmann at gmail.com
Wed Nov 5 05:43:02 PST 2014


Hi Ray

On Wed, Nov 5, 2014 at 2:30 PM, Ray Strode <halfline at gmail.com> wrote:
> From: Ray Strode <rstrode at redhat.com>
>
> The initialization performed by systemd-vconsole-setup is reset
> when changing console drivers (say from vgacon to fbcon), so we
> need to run it in that case.
>
> See
> http://lists.freedesktop.org/archives/systemd-devel/2014-October/023919.html
> http://lists.freedesktop.org/archives/systemd-devel/2014-October/024423.html
> http://lists.freedesktop.org/archives/systemd-devel/2014-November/024881.html
>
> This commit adds a udev rule to 71-seat.rules to make
> systemd-vconsole-setup get run when the fbcon device becomes available.
> ---
>  src/login/71-seat.rules.in | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/login/71-seat.rules.in b/src/login/71-seat.rules.in
> index ad26acbb..cbcfb53 100644
> --- a/src/login/71-seat.rules.in
> +++ b/src/login/71-seat.rules.in
> @@ -1,43 +1,44 @@
>  #  This file is part of systemd.
>  #
>  #  systemd is free software; you can redistribute it and/or modify it
>  #  under the terms of the GNU Lesser General Public License as published by
>  #  the Free Software Foundation; either version 2.1 of the License, or
>  #  (at your option) any later version.
>
>  ACTION=="remove", GOTO="seat_end"
>
>  TAG=="uaccess", SUBSYSTEM!="sound", TAG+="seat"
>  SUBSYSTEM=="sound", KERNEL=="card*", TAG+="seat"
>  SUBSYSTEM=="input", KERNEL=="input*", TAG+="seat"
>  SUBSYSTEM=="graphics", KERNEL=="fb[0-9]*", TAG+="seat", TAG+="master-of-seat"
> +SUBSYSTEM=="graphics", KERNEL=="fbcon", RUN+="/usr/lib/systemd/systemd-vconsole-setup"

Looks good. I just don't like stuffing it into 71-seat.rules. I mean,
it's in no way related to seats, is it?

Kay, Tom, Lennart? Any better ideas where to put it? Otherwise, I will
apply the patch.

Thanks
David

>  SUBSYSTEM=="usb", ATTR{bDeviceClass}=="09", TAG+="seat"
>
>  # 'Plugable' USB hub, sound, network, graphics adapter
>  SUBSYSTEM=="usb", ATTR{idVendor}=="2230", ATTR{idProduct}=="000[13]", ENV{ID_AUTOSEAT}="1"
>
>  # Mimo 720, with integrated USB hub, displaylink graphics, and e2i
>  # touchscreen. This device carries no proper VID/PID in the USB hub,
>  # but it does carry good ID data in the graphics component, hence we
>  # check it from the parent. There's a bit of a race here however,
>  # given that the child devices might not exist yet at the time this
>  # rule is executed. To work around this we'll trigger the parent from
>  # the child if we notice that the parent wasn't recognized yet.
>
>  # Match parent
>  SUBSYSTEM=="usb", ATTR{idVendor}=="058f", ATTR{idProduct}=="6254", \
>                    ATTR{%k.2/idVendor}=="17e9", ATTR{%k.2/idProduct}=="401a", ATTR{%k.2/product}=="mimo inc", \
>                    ENV{ID_AUTOSEAT}="1", ENV{ID_AVOID_LOOP}="1"
>
>  # Match child, look for parent's ID_AVOID_LOOP
>  SUBSYSTEM=="usb", ATTR{idVendor}=="17e9", ATTR{idProduct}=="401a", ATTR{product}=="mimo inc", \
>                    ATTR{../idVendor}=="058f", ATTR{../idProduct}=="6254", \
>                    IMPORT{parent}="ID_AVOID_LOOP"
>
>  # Match child, retrigger parent
>  SUBSYSTEM=="usb", ATTR{idVendor}=="17e9", ATTR{idProduct}=="401a", ATTR{product}=="mimo inc", \
>                    ATTR{../idVendor}=="058f", ATTR{../idProduct}=="6254", \
>                    ENV{ID_AVOID_LOOP}=="", \
>                    RUN+="@rootbindir@/udevadm trigger --parent-match=%p/.."
>
>  TAG=="seat", ENV{ID_PATH}=="", IMPORT{builtin}="path_id"
> --
> 2.1.0
>


More information about the systemd-devel mailing list