]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
login: XGI Z7/Z9 (XG20 core) graphic chip requires master-of-seat to be set
authorFranck Bui <fbui@suse.com>
Thu, 1 Jul 2021 10:30:29 +0000 (12:30 +0200)
committerFranck Bui <fbui@suse.com>
Mon, 5 Jul 2021 09:56:06 +0000 (11:56 +0200)
This graphic chip doesn't have a DRM driver and fall back to vesa-framebuffer
driver.

Without this patch, users of such chip suddenly see their GUI broken without
any indication or reason of what happened (no error message). Hence this
regression is near to impossible to troubleshoot for end users. Such case was
reported https://bugzilla.opensuse.org/show_bug.cgi?id=1187154.

Rather than adding another exception in the udev rules to deal with such
HWs, they instead get their own hwdb file '60-seat.hwdb'.

hwdb.d/60-seat.hwdb [new file with mode: 0644]
hwdb.d/meson.build
hwdb.d/parse_hwdb.py
src/login/71-seat.rules.in

diff --git a/hwdb.d/60-seat.hwdb b/hwdb.d/60-seat.hwdb
new file mode 100644 (file)
index 0000000..d280040
--- /dev/null
@@ -0,0 +1,20 @@
+# This file is part of systemd.
+#
+# This file lists graphic devices that don't have a DRM driver and fall back to
+# a frame-buffer one instead. Since commit 6260d28b8a, frame-buffer devices are
+# no more considered as graphical capable.
+#
+# The matches have the 'fb' prefix to make sure that only the framebuffer
+# device, and not the (parent) PCI device, is tagged with 'master-of-seat'.
+#
+# Allowed properties are:
+#    ID_TAG_MASTER_OF_SEAT=1
+
+#########################################
+# eXtreme Graphic Innovation (XGI)
+#########################################
+
+# Z7/Z9 (XG20 core), a rather ancient graphic chip, doesn't have a DRM driver
+# and falls back to vesafb.
+fb:pci:v000018CAd00000020*
+ ID_TAG_MASTER_OF_SEAT=1
index fd8c15a521da012a081b0e11edcd646c4faf9651..0a96b5553a540c4b10df8b9f088759fd01164428 100644 (file)
@@ -25,6 +25,7 @@ hwdb_files_test = files('''
         60-evdev.hwdb
         60-input-id.hwdb
         60-keyboard.hwdb
+        60-seat.hwdb
         60-sensor.hwdb
         70-joystick.hwdb
         70-mouse.hwdb
index 6d88766f0b2b8bfeb862e49a948ede26678a7560..3cd4b486a6b0981941f76fe54b2ebab08ff56079 100755 (executable)
@@ -67,6 +67,7 @@ UDEV_TAG = Word(string.ascii_uppercase, alphanums + '_')
 # Those patterns are used in type-specific matches
 TYPES = {'mouse':    ('usb', 'bluetooth', 'ps2', '*'),
          'evdev':    ('name', 'atkbd', 'input'),
+         'fb':       ('pci'),
          'id-input': ('modalias'),
          'touchpad': ('i8042', 'rmi', 'bluetooth', 'usb'),
          'joystick': ('i8042', 'rmi', 'bluetooth', 'usb'),
@@ -163,6 +164,7 @@ def property_grammar():
              ('IEEE1394_UNIT_FUNCTION_VIDEO', Or((Literal('0'), Literal('1')))),
              ('ID_VENDOR_FROM_DATABASE', name_literal),
              ('ID_MODEL_FROM_DATABASE', name_literal),
+             ('ID_TAG_MASTER_OF_SEAT', Literal('1')),
             )
     fixed_props = [Literal(name)('NAME') - Suppress('=') - val('VALUE')
                    for name, val in props]
index 809467c6c859d6636b4c2b4464d9d6f63999cdc3..0ebbb8efe2ee2de18ac87a7d4444606a67373949 100644 (file)
@@ -29,6 +29,11 @@ SUBSYSTEM=="graphics", KERNEL=="fb[0-9]", IMPORT{cmdline}="nomodeset", TAG+="mas
 SUBSYSTEM=="pci", ENV{ID_PCI_CLASS_FROM_DATABASE}=="Display controller", \
                   ENV{DRIVER}=="", IMPORT{cmdline}="nomodeset", TAG+="seat", TAG+="master-of-seat"
 
+# Synthesize a seat for graphic devices without DRM and that fall back to fb
+# device instead. Such HWs are listed in hwdb.
+SUBSYSTEM=="graphics", KERNEL=="fb[0-9]*", ATTRS{modalias}=="?*", IMPORT{builtin}="hwdb fb:$attr{modalias}"
+ENV{ID_TAG_MASTER_OF_SEAT}=="1", TAG+="master-of-seat"
+
 SUBSYSTEM=="drm", KERNEL=="card[0-9]*", TAG+="seat", TAG+="master-of-seat"
 
 # Allow individual USB ports to be assigned to a seat