You are not logged in.

#1 2025-07-26 20:58:18

Sidekick
Member
Registered: 2024-06-23
Posts: 51

How to disable "QR" code on kernel panic

Putting the QR in quotes because of the 5 different QR code readers I tried not a single one was able to read this nonsense. Luckily reversing the last pacman -Suy fixed the issue. Still frustrated.

Why is this "QR code" behaviour no where documented? It's not even mentioned on the wiki page that is specifically made for kernel panics here -> https://wiki.archlinux.org/title/Kernel#Kernel_panics

Even worse: After now having a bootable system again I checked every logfile and journalctl and there is no mention of a kernel panic anywhere. How is that possible? Shouldn't the very first thing on a kernel panic be to log the damn thing?

Offline

#2 2025-07-26 21:18:23

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,778

Re: How to disable "QR" code on kernel panic

An actual kernel panic means the kernel ran into a situation it couldn't recover from, it might well not be able to write to disk anymore, which is why it grabs the last scraps of memory and punches them into a piece of information it can display -- i.e. the QR code (otherwise you might be limited by scrollback and not being able to see all of it in the first place anyway) which is why this is "better" than just dumping the  stack to screen.

Anyway as for the question, from what I'm seeing you'd need to compile your own kernel with the following block of config changed: https://gitlab.archlinux.org/archlinux/ … L7006-7009

diff --git a/config b/config
index 428a4dc03b4efa9adc6efd4cb3dd56b3864d2169..0c891ab201dd55bcdb892cb1a2002b8fc9b658e9 100644
--- a/config
+++ b/config
@@ -7003,10 +7003,10 @@ CONFIG_DRM_PANIC=y
 CONFIG_DRM_PANIC_FOREGROUND_COLOR=0xffffff
 CONFIG_DRM_PANIC_BACKGROUND_COLOR=0x0000aa
 # CONFIG_DRM_PANIC_DEBUG is not set
-CONFIG_DRM_PANIC_SCREEN="qr_code"
-CONFIG_DRM_PANIC_SCREEN_QR_CODE=y
-CONFIG_DRM_PANIC_SCREEN_QR_CODE_URL="https://panic.archlinux.org/panic_report#"
-CONFIG_DRM_PANIC_SCREEN_QR_VERSION=40
+CONFIG_DRM_PANIC_SCREEN="kmsg"
+CONFIG_DRM_PANIC_SCREEN_QR_CODE=n
+#CONFIG_DRM_PANIC_SCREEN_QR_CODE_URL="https://panic.archlinux.org/panic_report#"
+#CONFIG_DRM_PANIC_SCREEN_QR_VERSION=40
 CONFIG_DRM_CLIENT=y
 CONFIG_DRM_CLIENT_LIB=y
 CONFIG_DRM_CLIENT_SELECTION=y

Offline

#3 2025-07-26 21:37:59

Sidekick
Member
Registered: 2024-06-23
Posts: 51

Re: How to disable "QR" code on kernel panic

Ah thanks. That is a bit disappointing. Sure before you couldn't scroll up but at least you could read the error. Now  you are left with a "QR" code that can't be read at all and absolutely no further information and no documentation anywhere.

Offline

#4 2025-07-26 22:05:34

just4arch
Member
Registered: 2023-01-07
Posts: 110

Re: How to disable "QR" code on kernel panic

To get the old behavior back, you can set it as a kernel parameter

drm.panic_screen=kmsg

See

# modinfo drm | grep panic_screen
parm:           panic_screen:Choose what will be displayed by drm_panic, 'user' or 'kmsg' [default=qr_code] (string)

Offline

#5 2025-07-26 22:41:32

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,778

Re: How to disable "QR" code on kernel panic

aah I was sure there most be some runtime switch to this, but didn't quite dig deep enough.

Offline

#6 2025-07-26 23:09:13

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,820

Re: How to disable "QR" code on kernel panic

of the 5 different QR code readers I tried not a single one was able to read this nonsense

Fwwi, this is frequently down to image quality.
The (any) QR code is not "nonsense" - it is a bitmask encoding text in a standardized way; and zbar and my phone(s) can perfectly decode this and every other proper QR code.

But you'll indeed quite often see pictures of monitors taken in a way which then results in an undecodable source (sometimes some image processing to straighten and un-sheer the footage can help, sometimes not) which is why you might want to try to decode the QR code immediately w/ your phone (because you can angle and focus that around until the image gets good enough™)

Offline

#7 2025-07-28 10:13:55

Sidekick
Member
Registered: 2024-06-23
Posts: 51

Re: How to disable "QR" code on kernel panic

seth wrote:

of the 5 different QR code readers I tried not a single one was able to read this nonsense

Fwwi, this is frequently down to image quality.
The (any) QR code is not "nonsense" - it is a bitmask encoding text in a standardized way; and zbar and my phone(s) can perfectly decode this and every other proper QR code.

But you'll indeed quite often see pictures of monitors taken in a way which then results in an undecodable source (sometimes some image processing to straighten and un-sheer the footage can help, sometimes not) which is why you might want to try to decode the QR code immediately w/ your phone (because you can angle and focus that around until the image gets good enough™)

That is precisely what I did. I used QR code scanners that 'live scan' the camera feed. None of them were able to decode it. A friend recommended me "Binary Eye" but that was after I had already fixed the issue by downgrading the kernel. Updating it again did not bring the issue back so my guess is something went wrong during the update process that wasn't logged in the pacman.log file.

@just4arch thank you, that's perfect!

To be a bit more productive here, maybe someone could add more information about this to the Arch wiki? Also maybe some information, if that is possible, on how to test if it actually works? Especially given that, apparently, depending on monitor and QR code scanner and phone camera the code might not be readable.

Last edited by Sidekick (2025-07-28 10:14:55)

Offline

#8 2025-07-28 12:49:37

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,820

Re: How to disable "QR" code on kernel panic

https://www.heise.de/imgs/18/4/6/6/0/6/ … 79a01e.png is a valid qr code, you could just open that in your browser and try to scan it.

Offline

#9 2025-07-28 14:04:44

just4arch
Member
Registered: 2023-01-07
Posts: 110

Re: How to disable "QR" code on kernel panic

Also maybe some information, if that is possible, on how to test if it actually works?

# echo c > /proc/sysrq-trigger

(yes, this WILL CRASH your system)

Especially given that, apparently, depending on monitor and QR code scanner and phone camera the code might not be readable.

https://github.com/kdj0c/panic_report/issues/1
You could try lower versions of the QRcode, they seem to be more compatible.

$ modinfo drm | grep panic
description:    DRM panic handler
parm:           panic_screen:Choose what will be displayed by drm_panic, 'user' or 'kmsg' [default=qr_code] (string)
parm:           panic_qr_version:maximum version (size) of the QR code (uint)

Offline

#10 2025-07-28 23:25:34

Sidekick
Member
Registered: 2024-06-23
Posts: 51

Re: How to disable "QR" code on kernel panic

seth wrote:

https://www.heise.de/imgs/18/4/6/6/0/6/ … 79a01e.png is a valid qr code, you could just open that in your browser and try to scan it.

Thanks for that, but that scans just fine and also the little rectangles with a dot inside are squares while the rectangles in the code I had on my screen were not square and more long than high.

Offline

#11 2025-07-29 06:51:56

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,820

Re: How to disable "QR" code on kernel panic

were not square and more long than high

You're probably running a non-native resolution and the output stretches those instead of letterboxing them?
Otherwise no issues decoding any of https://github.com/kdj0c/panic_report/issues/1 either

In that case taking a photo through a image processor to fix the aspect is probably your only option - the QR code allows to put much more data (and machine readable text) on the screen, but ultimately enforces non-human OCR sad

maybe someone could add more information about this to the Arch wiki?

Maybe someone… like you? wink

Offline

#12 2025-07-29 10:09:41

Sidekick
Member
Registered: 2024-06-23
Posts: 51

Re: How to disable "QR" code on kernel panic

seth wrote:

were not square and more long than high

You're probably running a non-native resolution and the output stretches those instead of letterboxing them?
Otherwise no issues decoding any of https://github.com/kdj0c/panic_report/issues/1 either

In that case taking a photo through a image processor to fix the aspect is probably your only option - the QR code allows to put much more data (and machine readable text) on the screen, but ultimately enforces non-human OCR sad

maybe someone could add more information about this to the Arch wiki?

Maybe someone… like you? wink


For the first part: Not sure what you mean by non-native resolution? My screen is 2560x1440, so 16:9 and I've not edited anything that'd force it into a different resolution.

As for the wiki: Well, if it'd accept my login I could do that but it doesn't. On top of that I do not have nearly enough information or knowledge about this topic. For example, I guess it now turns out there is additional configuration necessary if you have a 16:9 screen? Or is it the 1440p resolution?

Offline

#13 2025-07-29 14:03:16

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,820

Re: How to disable "QR" code on kernel panic

ctrl+alt+f3 and then check

sudo fbset -i

The question is whether it reports the resolution that your monitor advertises.

Offline

#14 2025-07-30 09:01:15

Sidekick
Member
Registered: 2024-06-23
Posts: 51

Re: How to disable "QR" code on kernel panic

Had to install it, output is:

mode "2560x1440"
    geometry 2560 1440 2560 1440 32
    timings 0 0 0 0 0 0 0
    rgba 8/16,8/8,8/0,0/0
endmode

Frame buffer device information:
    Name        : amdgpudrmfb
    Address     : (nil)
    Size        : 14745600
    Type        : PACKED PIXELS
    Visual      : TRUECOLOR
    XPanStep    : 1
    YPanStep    : 1
    YWrapStep   : 0
    LineLength  : 10240
    Accelerator : No

which looks correct to me.

Offline

#15 2025-07-30 13:50:24

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,820

Re: How to disable "QR" code on kernel panic

Yup - if you're willing you could synthetically crash your system as @just4arch suggested and see whether this results in either
a) a change of the output resolution
b) a readable QR code

Offline

#16 2025-07-30 17:32:23

Sidekick
Member
Registered: 2024-06-23
Posts: 51

Re: How to disable "QR" code on kernel panic

just4arch wrote:

Also maybe some information, if that is possible, on how to test if it actually works?

# echo c > /proc/sysrq-trigger

(yes, this WILL CRASH your system)

Was confused for a second as my system just froze for a couple seconds and then the PC just rebooted. Then I remembered that I have kdump installed on my system. Looking at the logfolder /var/crash/kdumpst/logs
I can see the crash I triggered just now, but there are no other files there, indicating that the kernel panic I saw happened before kdump was set up by the system.

*edit

managed to trigger it right after the boot loader was done by pressing sysrq+c. The QR code now was readable but it looked different, most obvious difference was that the background colour wasn't purple but blue. Still didn't look right to me proportion wise, but apparently two QR code readers were able to read it just fine. Apparently it's not the syslog but a link to a subdomain of this website: panic.archlinux.org. Never seen that before either or heard of it.

Last edited by Sidekick (2025-07-30 17:43:14)

Offline

Board footer

Powered by FluxBB