Skip to contentSkip to conversation

kmscon: upgrade 10.0.1 -> 10.0.4

PATCH Markus Volk 1 participant 1 message Oct 7 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

v2: update 0001-uterm-treat-platform-display-controllers-as-primary-GPUs.patch to the one that was merged upstream and make its Upstream-Status Backport

Quoted 381 lines · Markus Volk via lists.openembedded.org

Drop the pty patch, the problem is fixed upstream since 10.0.2. Refresh the platform GPU patch to the version merged upstream, which also excludes USB displays from the primary GPUs. Backport the libseat build fix, 10.0.4 does not build with libseat otherwise. Tested on a Raspberry Pi 4 with gpus=primary.

License-Update: COPYING now states that the Unifont font is licensed under OFL-1.1 instead of GPL, drops the third-party notices for the dbus-loop, wcwidth and vt.c code and updates the path of the htable code to src/shl/htable.

AI-Generated: Uses Claude Code (Claude Opus 5.5)

Signed-off-by Markus Volk <[email protected] <mailto:[email protected]>>
---
 ...-pty-only-once-a-display-is-attached.patch | 64 --------------
 ...-display-controllers-as-primary-GPUs.patch | 53 ++++++++++++
 ...-display-controllers-as-primary-GPUs.patch | 84 
-------------------
 ...x-build-error-due-to-logging-changes.patch | 32 +++++++
 .../{kmscon_10.0.1.bb => kmscon_10.0.4.bb}    |  8 +-
 5 files changed, 89 insertions(+), 152 deletions(-)
 delete mode 100644 
meta-oe/recipes-graphics/kmscon/kmscon/0001-terminal-open-the-pty-only-once-a-display-is-attached.patch
 create mode 100644 
meta-oe/recipes-graphics/kmscon/kmscon/0001-uterm-treat-platform-display-controllers-as-primary-GPUs.patch
 delete mode 100644 
meta-oe/recipes-graphics/kmscon/kmscon/0002-uterm_monitor-treat-platform-display-controllers-as-primary-GPUs.patch
 create mode 100644 
meta-oe/recipes-graphics/kmscon/kmscon/0002-vt_libseat-Fix-build-error-due-to-logging-changes.patch
 rename meta-oe/recipes-graphics/kmscon/{kmscon_10.0.1.bb => 

kmscon_10.0.4.bb} (89%)

meta-oe/recipes-graphics/kmscon/kmscon/0001-terminal-open-the-pty-only-once-a-display-is-attached.patch deleted +0 -1
deleted file mode 100644
index 68f2ccc157..0000000000
--- 

a/meta-oe/recipes-graphics/kmscon/kmscon/0001-terminal-open-the-pty-only-once-a-display-is-attached.patch +++ /dev/null

meta-oe/recipes-graphics/kmscon/kmscon/0001-terminal-open-the-pty-only-once-a-display-is-attached.patch deleted +0 -1
@@ -1,64 +0,0 @@
-From c63a880187db708b50d25c37b6fc1e24ed68492a Mon Sep 17 00:00:00 

2001

meta-oe/recipes-graphics/kmscon/kmscon/0001-terminal-open-the-pty-only-once-a-display-is-attached.patch deleted +0 -3
-From: Markus Volk <[email protected] <mailto:[email protected]>>
-Date: Fri, 18 Sep 2026 21:52:35 +0200
-Subject: [PATCH] terminal: open the pty only once a display is 

attached

meta-oe/recipes-graphics/kmscon/kmscon/0001-terminal-open-the-pty-only-once-a-display-is-attached.patch deleted +0 -12
-
-The session type handed to the child (TERM_SESSION_TYPE=kms or fb) is
-decided in terminal_open() from the displays attached at that moment.
-On a real VT the first session is activated as soon as the seat wakes
-up, which happens before the DRM display has finished probing, so the
-login is spawned with TERM_SESSION_TYPE=fb even though the terminal
-ends up on a KMS display a few hundred milliseconds later.
-
-Session managers such as uwsm rely on that variable to decide whether
-they have to ask kmscon to release the display before starting a
-compositor. With the wrong type the request is never sent, kmscon
-keeps DRM master, and the compositor fails to open the device until 

it

meta-oe/recipes-graphics/kmscon/kmscon/0001-terminal-open-the-pty-only-once-a-display-is-attached.patch deleted +0 -4
-gives up.
-
-Defer opening the pty until the first display has been added to the
-terminal, and open it from terminal_add_display() when the terminal 

is

meta-oe/recipes-graphics/kmscon/kmscon/0001-terminal-open-the-pty-only-once-a-display-is-attached.patch deleted +0 -6
-already awake at that point.
-
-Upstream-Status: Pending
-
-AI-Generated: Uses Claude Code (Claude Opus 5)
-Signed-off-by: Markus Volk <[email protected] 

<mailto:[email protected]>>
----
- src/kmscon_terminal.c | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)

meta-oe/recipes-graphics/kmscon/kmscon/0001-terminal-open-the-pty-only-once-a-display-is-attached.patch deleted +0 -12
-
-diff --git a/src/kmscon_terminal.c b/src/kmscon_terminal.c
-index 15b00b4..42b6cd9 100644
---- a/src/kmscon_terminal.c
-+++ b/src/kmscon_terminal.c
-@@ -107,6 +107,7 @@ struct kmscon_terminal {
- #define BLINK_TIMER_NS (500 * 1000 * 1000)
-
- static int font_set(struct kmscon_terminal *term);
-+static int terminal_open(struct kmscon_terminal *term);
-
- static void coord_to_cell(struct kmscon_terminal *term, int32_t x, 

int32_t y, unsigned int *posx,

meta-oe/recipes-graphics/kmscon/kmscon/0001-terminal-open-the-pty-only-once-a-display-is-attached.patch deleted +0 -2
- 			  unsigned int *posy)
-@@ -726,6 +727,9 @@ int terminal_add_display(struct kmscon_terminal 

*term, struct display *disp)

meta-oe/recipes-graphics/kmscon/kmscon/0001-terminal-open-the-pty-only-once-a-display-is-attached.patch deleted +0 -10
- 	update_pointer_max_all(term);
- 	display_ref(scr->disp);
- 	do_redraw_screen(scr);
-+
-+	if (term->awake && !term->opened)
-+		terminal_open(term);
- 	return 0;
-
- err_text:
-@@ -1124,7 +1128,7 @@ void terminal_activate(struct kmscon_terminal 

*term)
- {

meta-oe/recipes-graphics/kmscon/kmscon/0001-terminal-open-the-pty-only-once-a-display-is-attached.patch deleted +0 -10
- 	term->awake = true;
- 	ev_timer_enable(term->blink_timer);
--	if (!term->opened)
-+	if (!term->opened && !shl_dlist_empty(&term->screens))
- 		terminal_open(term);
- 	if (term->pointer.visible)
- 		hw_cursor_show(term, term->pointer.x, term->pointer.y);
---
-2.55.0
-
(quoted diff) +0 -0
new file mode 100644
index 0000000000..af0f829ebb

b/meta-oe/recipes-graphics/kmscon/kmscon/0001-uterm-treat-platform-display-controllers-as-primary-GPUs.patch

(quoted diff) +1 -0
@@ -0,0 +1,53 @@
+From 92b87c18f67ba9c01b23b50d014c5c5cfa72717e Mon Sep 17 00:00:00 

2001

(quoted diff) +3 -0
+From: Markus Volk <[email protected] <mailto:[email protected]>>
+Date: Wed, 7 Oct 2026 13:09:58 +0200
+Subject: [PATCH] uterm: treat platform display controllers as 

primary GPUs

(quoted diff) +8 -0
+
+A GPU only counted as primary when its PCI parent had boot_vga set.
+SoC display controllers such as vc4 on the Raspberry Pi are platform
+devices without a PCI parent, so with gpus=primary kmscon ignored the
+only display in the system and never showed a terminal.
+
+Treat DRM devices on the platform bus as primary. USB displays are
+excluded: on these systems the USB controller is a platform device 

too,

(quoted diff) +8 -0
+so they would otherwise be taken as primary.
+
+Tested on a Raspberry Pi 4 with --gpus=primary: before, card0 (vc4)
+was ignored as "no primary GPU"; now the terminal comes up on HDMI-A
+with the drm2d backend. The USB exclusion is not tested on hardware.
+
+Assisted-By: Claude Opus 5.5
+Signed-off-by: Markus Volk <[email protected] 

<mailto:[email protected]>>

(quoted diff) +2 -0
+
+Upstream-Status: Backport 

[<https://github.com/kmscon/kmscon/pull/551/changes/e8d5af950b1046f060604932440306dd16c9039e>]

+---
+ src/uterm/monitor.c | 14 +++++++++++++-

+ 1 file changed, 13 insertions(+), 1 deletion(-)

(quoted diff) +6 -0
+
+diff --git a/src/uterm/monitor.c b/src/uterm/monitor.c
+index f2141969..ccb5e422 100644
+--- a/src/uterm/monitor.c
++++ b/src/uterm/monitor.c
+@@ -244,9 +244,21 @@ static bool is_drm_primary(struct uterm_monitor 

*mon, struct udev_device *dev, c

(quoted diff) +10 -0
+ 			log_debug("DRM device %s is primary PCI GPU", node);
+ 			return true;
+ 		}
++		return false;
+ 	}
+
+-	return false;
++	/*
++	 * SoC display controllers are platform devices without a boot_vga
++	 * attribute. Treat them as primary. USB displays sit below a 

platform
++ * USB controller on such systems, but are never primary.
++ */
++ if (udev_device_get_parent_with_subsystem_devtype(dev, "usb",
NULL))
++ return false;
++ if (!udev_device_get_parent_with_subsystem_devtype(dev,
"platform", NULL))
++ return false;
++
++ log_debug("DRM device %s is primary platform GPU", node);
++ return true;
+ }

(quoted diff) +2 -0
+
+ /*
\ No newline at end of file
meta-oe/recipes-graphics/kmscon/kmscon/0002-uterm_monitor-treat-platform-display-controllers-as-primary-GPUs.patch deleted +0 -1
deleted file mode 100644
index c85607783c..0000000000
--- 

a/meta-oe/recipes-graphics/kmscon/kmscon/0002-uterm_monitor-treat-platform-display-controllers-as-primary-GPUs.patch +++ /dev/null

meta-oe/recipes-graphics/kmscon/kmscon/0002-uterm_monitor-treat-platform-display-controllers-as-primary-GPUs.patch deleted +0 -1
@@ -1,84 +0,0 @@
-From d321a1572a12d760ddade294f4e7eabe57d555d1 Mon Sep 17 00:00:00 

2001

meta-oe/recipes-graphics/kmscon/kmscon/0002-uterm_monitor-treat-platform-display-controllers-as-primary-GPUs.patch deleted +0 -3
-From: Markus Volk <[email protected] <mailto:[email protected]>>
-Date: Sat, 26 Sep 2026 10:00:57 +0200
-Subject: [PATCH] uterm_monitor: treat platform display controllers 

as primary
- GPUs

meta-oe/recipes-graphics/kmscon/kmscon/0002-uterm_monitor-treat-platform-display-controllers-as-primary-GPUs.patch deleted +0 -26
-
-A GPU only counted as primary when its PCI parent had boot_vga set.
-SoC display controllers such as vc4 on the Raspberry Pi are platform
-devices without a PCI parent, so with gpus=primary kmscon ignored the
-only display in the system and never showed a terminal.
-
-Treat DRM devices on the platform bus as primary, except for the
-simpledrm, efidrm, vesadrm and ofdrm firmware framebuffers that only
-stand in until the native driver has loaded.
-
-Upstream-Status: Pending
-
-AI-Generated: Uses Claude Code (Claude Opus 5.5)
----
- src/uterm_monitor.c | 29 ++++++++++++++++++++++++++---
- 1 file changed, 26 insertions(+), 3 deletions(-)
-
-diff --git a/src/uterm_monitor.c b/src/uterm_monitor.c
-index d89bfa1..25ec91f 100644
---- a/src/uterm_monitor.c
-+++ b/src/uterm_monitor.c
-@@ -234,10 +234,15 @@ out_close:
- 	return flags;
- }
-
--static bool is_drm_primary(struct uterm_monitor *mon, struct 

udev_device *dev, const char *node)
-+static char *get_drm_name(int fd);
-+
-+static bool is_drm_primary(struct uterm_monitor *mon, struct udev_device *dev, const char *node,
-+ int fd)
- {

meta-oe/recipes-graphics/kmscon/kmscon/0002-uterm_monitor-treat-platform-display-controllers-as-primary-GPUs.patch deleted +0 -6
- 	struct udev_device *pci;
- 	const char *id;
-+	char *name;
-+	bool res;
-
- 	pci = udev_device_get_parent_with_subsystem_devtype(dev, "pci", 

NULL);

meta-oe/recipes-graphics/kmscon/kmscon/0002-uterm_monitor-treat-platform-display-controllers-as-primary-GPUs.patch deleted +0 -2
- 	if (pci) {
-@@ -246,9 +251,27 @@ static bool is_drm_primary(struct uterm_monitor 

*mon, struct udev_device *dev, c

meta-oe/recipes-graphics/kmscon/kmscon/0002-uterm_monitor-treat-platform-display-controllers-as-primary-GPUs.patch deleted +0 -10
- 			log_debug("DRM device %s is primary PCI GPU", node);
- 			return true;
- 		}
-+		return false;
- 	}
-
--	return false;
-+	/*
-+	 * SoC display controllers are platform devices without a boot_vga
-+	 * attribute. Treat them as primary, except for the generic 

firmware
-+ * framebuffer drivers that only stand in until the real driver
loads.
-+ */
-+ if (!udev_device_get_parent_with_subsystem_devtype(dev,
"platform", NULL))
-+ return false;
-+
-+ name = get_drm_name(fd);
-+ if (!name)
-+ return false;
-+
-+ res = strcmp(name, "simpledrm") && strcmp(name, "efidrm") &&
strcmp(name, "vesadrm") &&
-+ strcmp(name, "ofdrm");
-+ if (res)
-+ log_debug("DRM device %s is primary platform GPU (%s)", node,
name);
-+ free(name);
-+ return res;
- }
-
- /*
-@@ -334,7 +357,7 @@ static unsigned int get_drm_flags(struct uterm_monitor *mon, struct udev_device

meta-oe/recipes-graphics/kmscon/kmscon/0002-uterm_monitor-treat-platform-display-controllers-as-primary-GPUs.patch deleted +0 -11
- 		return flags;
- 	}
-
--	if (is_drm_primary(mon, dev, node))
-+	if (is_drm_primary(mon, dev, node, fd))
- 		flags |= UTERM_MONITOR_PRIMARY;
- 	if (is_drm_usb(mon, node, fd))
- 		flags |= UTERM_MONITOR_AUX;
---
-2.55.0
-
(quoted diff) +0 -0
new file mode 100644
index 0000000000..63db2e5297

b/meta-oe/recipes-graphics/kmscon/kmscon/0002-vt_libseat-Fix-build-error-due-to-logging-changes.patch

(quoted diff) +1 -0
@@ -0,0 +1,32 @@
+From 153db63d679df719a99dd36505f9c2f55d9c59f6 Mon Sep 17 00:00:00 

2001
+From: Jocelyn Falempe <[email protected]
<mailto:[email protected]>>

(quoted diff) +4 -0
+Date: Mon, 28 Sep 2026 11:46:21 +0200
+Subject: [PATCH] vt_libseat: Fix build error due to logging changes
+
+Commit "efda2b5 log: Simplify logging, remove timestamp, and level 

for notice and info."

(quoted diff) +4 -0
+changed the log_submit() arguments, and this was not updated in
+vt_libseat.c
+
+Upstream-Status: Backport 

[<https://github.com/kmscon/kmscon/commit/153db63d679df719a99dd36505f9c2f55d9c59f6>]

(quoted diff) +2 -0
+
+Signed-off-by: Jocelyn Falempe <[email protected] 

<mailto:[email protected]>>

+---
+ src/uterm/vt_libseat.c | 2 +-

+ 1 file changed, 1 insertion(+), 1 deletion(-)

(quoted diff) +6 -0
+
+diff --git a/src/uterm/vt_libseat.c b/src/uterm/vt_libseat.c
+index 4f65c84..2097628 100644
+--- a/src/uterm/vt_libseat.c
++++ b/src/uterm/vt_libseat.c
+@@ -260,7 +260,7 @@ static enum log_severity log_level(enum 

libseat_log_level level)
+
+ static void log_libseat(enum libseat_log_level level, const char *fmt, va_list args)
+ {
+- log_submit(LOG_DEFAULT, log_level(level), fmt, args);
++ log_submit(log_level(level), "libseat", fmt, args);
+ }
+
+ static void vt_libseat_input(struct input *input, struct input_key_event *ev, void *data)
+--
+2.55.0

(quoted diff) +1 -0
+
meta-oe/recipes-graphics/kmscon/kmscon_10.0.4.bb renamed from meta-oe/recipes-graphics/kmscon/kmscon_10.0.1.bb +0 -1
similarity index 89%
rename from meta-oe/recipes-graphics/kmscon/kmscon_10.0.1.bb
rename to meta-oe/recipes-graphics/kmscon/kmscon_10.0.4.bb
index 0336649551..400d9b5f59 100644
@@ -11,7 +11,7 @@ CVE_PRODUCT = "kmscon"
 SECTION = "graphics"
 
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = 

"file://COPYING;md5=6d4602d249f8a3401040238e98367d9e" <file://copying;md5=6d4602d249f8a3401040238e98367d9e/> +LIC_FILES_CHKSUM =
"file://COPYING;md5=e88b340bd6389ec41d4cf634a770a771" <file://copying;md5=e88b340bd6389ec41d4cf634a770a771/>

 DEPENDS = "\
     libtsm \
meta-oe/recipes-graphics/kmscon/kmscon_10.0.4.bb renamed from meta-oe/recipes-graphics/kmscon/kmscon_10.0.1.bb +0 -0
@@ -21,11 +21,11 @@ DEPENDS = "\
 "
 
 SRC_URI = 

"git://github.com/kmscon/kmscon;protocol=https;branch=main;tag=v${PV}"

meta-oe/recipes-graphics/kmscon/kmscon_10.0.4.bb renamed from meta-oe/recipes-graphics/kmscon/kmscon_10.0.1.bb +1 -2
-SRCREV = "c9d0e23336c6bb7645a1f5f48a4a82f1d5a589d9"
+SRCREV = "68fc8e1b2601e816e3a4ef95e3d8e700677509b9"
 
 SRC_URI += " \
-    

file://0001-terminal-open-the-pty-only-once-a-display-is-attached.patch <file://0001-terminal-open-the-pty-only-once-a-display-is-attached.patch/> \
-
file://0002-uterm_monitor-treat-platform-display-controllers-as-primary-GPUs.patch <file://0002-uterm_monitor-treat-platform-display-controllers-as-primary-gpus.patch/> \
+
file://0001-uterm-treat-platform-display-controllers-as-primary-GPUs.patch <file://0001-uterm-treat-platform-display-controllers-as-primary-gpus.patch/> \
+
file://0002-vt_libseat-Fix-build-error-due-to-logging-changes.patch <file://0002-vt_libseat-fix-build-error-due-to-logging-changes.patch/> \
"

inherit meson pkgconfig systemd
--
2.55.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#130661): <https://lists.openembedded.org/g/openembedded-devel/message/130661>
Mute This Topic: <https://lists.openembedded.org/mt/121635504/3618223>
Group Owner: [email protected] <mailto:[email protected]>
Unsubscribe: <https://lists.openembedded.org/g/openembedded-devel/unsub> [[email protected] <mailto:[email protected]>]
-=-=-=-=-=-=-=-=-=-=-=-