Bug 2537416 - kmscon spams journal on multi gpu system if a gpu has not displays connected
Summary: kmscon spams journal on multi gpu system if a gpu has not displays connected
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kmscon
Version: 45
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jocelyn Falempe
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-09-21 14:12 UTC by anotheruser
Modified: 2026-10-01 08:28 UTC (History)
1 user (show)

Fixed In Version: kmscon-10.0.4-1.fc46
Clone Of:
Environment:
Last Closed: 2026-10-01 08:28:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description anotheruser 2026-09-21 14:12:45 UTC
upgraded to F45-beta  and  just found these messages in journal.  2 VTs  were active.



Sep 21 14:53:30.007893 kmscon[6824]: [175672.957640] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 21 14:53:30.011404 kmscon[1489968]: [0227.104248] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 21 14:53:30.027950 kmscon[6824]: [175672.977642] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 21 14:53:30.031577 kmscon[1489968]: [0227.124391] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 21 14:53:30.047864 kmscon[6824]: [175672.997629] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 21 14:53:30.051402 kmscon[1489968]: [0227.144245] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)


this system has two GPUs  but only one has display(s) connected, 

Reproducible: Always

Steps to Reproduce:
1.use a multi-gpu system where one GPU has no displays connected
2.switch to a console VT i.e.  Ctrl-Alt-F4 
3.run  journalctl -b -f  
Actual Results:
journal gets spammed with kmscon warnings multiple times per second for each active VT

Expected Results:
don't  emmit warnings if a gpu has no displays connected



Additional Information:
I silenced this warnings by setting  'gpus=primary'  in the kmscon.conf file


ll /dev/dri/*
crw-rw----+ 1 root video  226,   1 Sep 21 15:52 /dev/dri/card1
crw-rw----+ 1 root video  226,   2 Sep 21 15:52 /dev/dri/card2
crw-rw-rw-. 1 root render 226, 128 Sep 19 14:03 /dev/dri/renderD128
crw-rw-rw-. 1 root render 226, 129 Sep 19 14:03 /dev/dri/renderD129

/dev/dri/by-path:
total 0
lrwxrwxrwx. 1 root root  8 Sep 19 14:03 pci-0000:00:02.0-card -> ../card1
lrwxrwxrwx. 1 root root 13 Sep 19 14:03 pci-0000:00:02.0-render -> ../renderD128
lrwxrwxrwx. 1 root root  8 Sep 19 14:03 pci-0000:01:00.0-card -> ../card2
lrwxrwxrwx. 1 root root  8 Sep 19 14:03 pci-0000:01:00.0-platform-simple-framebuffer.0-card -> ../card0
lrwxrwxrwx. 1 root root 13 Sep 19 14:03 pci-0000:01:00.0-render -> ../renderD129

monitor is connected to card2 

Graphics:
  Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics] driver: i915 v: kernel
    arch: Xe ports: active: none empty: DP-1, DP-2, DP-3, DP-4 bus-ID: 00:02.0
    chip-ID: 8086:9a49
  Device-2: NVIDIA TU106M [GeForce RTX 2060 Mobile] vendor: Intel
    driver: nvidia v: 615.71.09 arch: Turing pcie: speed: 2.5 GT/s lanes: 4
    ports: active: DP-5 empty: HDMI-A-1 bus-ID: 01:00.0 chip-ID: 10de:1f15

Comment 1 Jocelyn Falempe 2026-09-23 22:48:28 UTC
I also have 2 GPUs, and one of them has no display attached, but I can't reproduce it.
But from your logs, it looks like two kmscon instances are trying to get drm master on card1, which is surprising, as normally only one kmscon instance can be active at the same time.

If you can reproduce it, can you get the command line of each kmscon with:

ps aux | grep kmscon

In your logs, one has PID 6324, and the other has PID 1489968, which looks big for a PID.

Also looking in kmscon code, it shouldn't retry to get drm master, so I'm not sure why it loops in your case.

Comment 2 anotheruser 2026-09-23 23:27:17 UTC
I get one process per  VT  e.g  F4  starts first process, and switching to F5 starts a second process,  etc.
I am running F45 Workstatios   F1=GDM, F2=first gnome session 

just started a VT on F4 and did not login: 
journal shows 
Sep 24 01:14:52 kmscon[1583651]: [0115.014972] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 24 01:14:52 kmscon[1583651]: [0115.034992] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 24 01:14:52 kmscon[1583651]: [0115.055011] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)

       0 1583651  0.4  0.0  49716 14052 ?        Ss   01:12   0:01 kmscon --vt=tty4 --no-switchvt
    1000 1587390  0.0  0.0 231764  2844 pts/20   S+   01:18   0:00 grep --color=auto kmscon

and a second one on F5
Sep 24 01:17:52 kmscon[1583651]: [0295.135132] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 24 01:17:52 kmscon[1586332]: [0045.836777] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 24 01:17:52 kmscon[1583651]: [0295.155082] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 24 01:17:52 kmscon[1586332]: [0045.856790] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 24 01:17:52 kmscon[1583651]: [0295.174994] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 24 01:17:52 kmscon[1586332]: [0045.876763] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)

ps aunx | grep kmscon
       0 1583651  0.4  0.0  49716 14052 ?        Ss   01:12   0:01 kmscon --vt=tty4 --no-switchvt
       0 1586332  0.8  0.0  49724 13908 ?        Ss   01:17   0:00 kmscon --vt=tty5 --no-switchvt
    1000 1587390  0.0  0.0 231764  2844 pts/20   S+   01:18   0:00 grep --color=auto kmscon


$ cat /proc/sys/kernel/pid_max
4194304   = 2^22

Comment 3 anotheruser 2026-09-23 23:37:26 UTC
# systemctl status kmscon.service
○ kmscon.service - KMS System Console
     Loaded: loaded (/usr/lib/systemd/system/kmscon.service; disabled; preset: disabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: inactive (dead)
       Docs: man:kmscon(1)

# systemctl status kmsconvt
○ kmsconvt - KMS System Console on tty1
     Loaded: loaded (/usr/lib/systemd/system/kmsconvt@.service; enabled; preset: enabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: inactive (dead)
       Docs: man:kmscon(1)

# systemctl status kmsconvt
● kmsconvt - KMS System Console on tty4
     Loaded: loaded (/usr/lib/systemd/system/kmsconvt@.service; disabled; preset: enabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: active (running) since Thu 2026-09-24 01:12:57 CEST; 21min ago
 Invocation: 81595dd78b7249c68c48a69481978b37
       Docs: man:kmscon(1)
   Main PID: 1583651 (kmscon)
      Tasks: 1 (limit: 38010)
     Memory: 5.8M (peak: 22.2M)
        CPU: 4.372s
     CGroup: /system.slice/system-kmsconvt.slice/kmsconvt
             └─1583651 kmscon --vt=tty4 --no-switchvt

Sep 24 01:34:00 phantom kmscon[1583651]: [1263.414996] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 24 01:34:00 phantom kmscon[1583651]: [1263.434994] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 24 01:34:00 phantom kmscon[1583651]: [1263.455004] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 24 01:34:00 phantom kmscon[1583651]: [1263.474977] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 24 01:34:00 phantom kmscon[1583651]: [1263.494990] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 24 01:34:00 phantom kmscon[1583651]: [1263.514991] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 24 01:34:00 phantom kmscon[1583651]: [1263.534995] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 24 01:34:00 phantom kmscon[1583651]: [1263.554977] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 24 01:34:00 phantom kmscon[1583651]: [1263.574963] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 24 01:34:00 phantom kmscon[1583651]: [1263.594962] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)

# systemctl status kmsconvt
● kmsconvt - KMS System Console on tty5
     Loaded: loaded (/usr/lib/systemd/system/kmsconvt@.service; disabled; preset: enabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: active (running) since Thu 2026-09-24 01:17:06 CEST; 17min ago
 Invocation: b240d1dc10474f50bcabce2b4572f119
       Docs: man:kmscon(1)
   Main PID: 1586332 (kmscon)
      Tasks: 1 (limit: 38010)
     Memory: 5.5M (peak: 21.9M)
        CPU: 3.864s
     CGroup: /system.slice/system-kmsconvt.slice/kmsconvt
             └─1586332 kmscon --vt=tty5 --no-switchvt

Sep 24 01:34:15 phantom kmscon[1586332]: [1028.656787] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 24 01:34:15 phantom kmscon[1586332]: [1028.676763] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 24 01:34:15 phantom kmscon[1586332]: [1028.696774] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 24 01:34:15 phantom kmscon[1586332]: [1028.716777] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 24 01:34:15 phantom kmscon[1586332]: [1028.736788] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 24 01:34:15 phantom kmscon[1586332]: [1028.756767] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 24 01:34:15 phantom kmscon[1586332]: [1028.776759] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 24 01:34:15 phantom kmscon[1586332]: [1028.796855] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 24 01:34:15 phantom kmscon[1586332]: [1028.816757] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)
Sep 24 01:34:15 phantom kmscon[1586332]: [1028.836752] ERROR: drm_shared: Cannot set drm master for /dev/dri/card1 (set_drm_master() in ../src/video/drm_shared.c:1238)

Comment 4 Jocelyn Falempe 2026-09-28 09:06:37 UTC
I've submitted this PR upstream, to limit the number of retries:
https://github.com/kmscon/kmscon/pull/535

It's not perfect, but at least it won't flood the logs forever.
It is part of the 10.0.4 release, that should be available soon on Fedora.

Comment 5 Fedora Update System 2026-09-28 09:42:00 UTC
FEDORA-2026-72d141adde (kmscon-10.0.4-1.fc46 and libtsm-4.8.0-1.fc46) has been submitted as an update to Fedora 46.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-72d141adde

Comment 6 Fedora Update System 2026-10-01 08:28:41 UTC
FEDORA-2026-72d141adde (kmscon-10.0.4-1.fc46 and libtsm-4.8.0-1.fc46) has been pushed to the Fedora 46 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.