chiark / gitweb /
login: rerun vconsole-setup when switching from vgacon to fbcon
authorRay Strode <rstrode@redhat.com>
Wed, 5 Nov 2014 13:30:52 +0000 (08:30 -0500)
committerDavid Herrmann <dh.herrmann@gmail.com>
Thu, 6 Nov 2014 09:56:52 +0000 (10:56 +0100)
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 make systemd-vconsole-setup get run when
the fbcon device becomes available.

(david: moved into new file 90-vconsole.rules instead of 71-seats.rules;
        build-failures are on me, not on Ray)

Makefile.am
src/vconsole/90-vconsole.rules [new file with mode: 0644]

index 3686103b52e91423883b4c06b9a2e4d01b915fee..f614b86c07b56b9dc66f734836a933bea5032b56 100644 (file)
@@ -4439,6 +4439,9 @@ rootlibexec_PROGRAMS += \
 nodist_systemunit_DATA += \
        units/systemd-vconsole-setup.service
 
+dist_udevrules_DATA += \
+       src/vconsole/90-vconsole.rules
+
 SYSINIT_TARGET_WANTS += \
        systemd-vconsole-setup.service
 endif
diff --git a/src/vconsole/90-vconsole.rules b/src/vconsole/90-vconsole.rules
new file mode 100644 (file)
index 0000000..bf6a9ef
--- /dev/null
@@ -0,0 +1,11 @@
+#  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.
+
+# Kernel resets vconsole state when changing console drivers so run
+# systemd-vconsole-setup when fbcon loads
+
+ACTION=="add", SUBSYSTEM=="graphics", KERNEL=="fbcon", RUN+="/usr/lib/systemd/systemd-vconsole-setup"