Sometime it also depends on the app you're using. The first app I used on my Android phone was only able to scan the first screenshot (with ascii Tux), bigger QR-code never worked. I'm now using the app from gamma play, and it scan all three.
Might be worth investigating what's different between these, maybe there's some sort of subtle bug in the QR code that makes it not work on all apps, or maybe some of these apps have some sort of bug with large codes.
@kdj0c what are you using to generate the QR codes above?
I've got panic screen working. And I've compiled the kernel with DRM_PANIC_SCREEN_QR_CODE=y and booted it, but I still get the panic screen w/o QR codes. Is resolution a factor? IIAC the QR codes require a rather high resolution display to fit?
This is not supported on i915 yet but do we really need a fully loaded driver to display a panic message? What happens when the cause of the panic is the display driver itself?
The panic code is a best effort, that means it's impossible to guarantee that you will see the panic screen.
When a panic occurs, the easiest way to display something is to re-use the current framebuffer. Otherwise you will need to allocate another framebuffer and configure all the display pipeline, which is hard to do in a safe way in a panic handler.
If the panic is caused by the graphic driver itself, there is a chance that the display pipeline is broken and that you won't see the message, but it might still work too.
I think there are better ways to do this like handing off to simpledrm from GPU specific kmodule? Since technically, we don't need any fancy thing while showing a panic message. Just a static screen.
I think on most modern systems, efifb can be reinitialized after device specific kmodule has taken over. Windows probably follows this (although I can be wrong here).
Also, simpledrm (or efifb) does not require full GPU reinitialization and relies on the firmware’s framebuffer, which is generally simpler and less state-dependent than GPU-specific pipelines.
I have seen your patch on Intel i915. Thinking of trying it out with your permission.
@qnixsynapse, it is not that simple. For example, the efifb can be in a low resolution like 1024x768, but then you've switched to 4K. If you want to re-use the efifb framebuffer, then you also need to change the resolution of the screen, which can be quite complex with DP or HDMI.
switching back to simpledrm, means loading a kernel module during a panic, which is quite risky.
Also I've already made drm_panic works on a i.MX6 ARM board, which don't have an EFI or equivalent framebuffer.
lastly, yes you can try my patch for i915, that's free software, you don't have to ask to test it. It doesn't work for Alderlake or later, but I'm working on it.
means loading a kernel module during a panic, which is quite risky
Hmm.. This is correct. I was thinking of alternative ways which would be simple enough and independent of GPU specific kmodules, since the current implementation requires of these modules to have support in order to display it.
since a lot of apps have trouble with big QR codes and stuff, i wanted to create an app to view offline both raw and encoded (old and new format) kernel panic QR codes, porting this javascript code and i think i got something usable https://github.com/adryzz/drm_panic-viewer
Activity
kdj0c commentedon Jul 2, 2024
A new test sample with V40 QR code

kdj0c commentedon Jul 3, 2024
Test sample with uncompressed kmsg.
qwertychouskie commentedon Jul 4, 2024
This one I can't scan with my phone.
kdj0c commentedon Jul 4, 2024
Sometime it also depends on the app you're using. The first app I used on my Android phone was only able to scan the first screenshot (with ascii Tux), bigger QR-code never worked. I'm now using the app from gamma play, and it scan all three.
qwertychouskie commentedon Jul 4, 2024
Some quick testing with the 2 troublesome QR codes:
Might be worth investigating what's different between these, maybe there's some sort of subtle bug in the QR code that makes it not work on all apps, or maybe some of these apps have some sort of bug with large codes.
OptikITLik commentedon Jul 4, 2024
How do you upload data if there is no internet connection?
tq-steina commentedon Jul 4, 2024
I can't scan the last one (
Test sample with uncompressed kmsg) with my Android phoneNikitaBeloglazov commentedon Jul 4, 2024
Test sample with uncompressed kmsgscans normally with Samsung Cameralucmann commentedon Jul 4, 2024
I can also scan that normally with my Android phone (Redmi Note 11T Pro), using WeChat app.
microhobby commentedon Jul 19, 2024
This remember me of this: https://www.youtube.com/watch?v=KriAX7FxhZw
Andy3153 commentedon Jul 26, 2024
It scans normally for me. I'm on LineageOS and I'm using the default camera app.
g0t4 commentedon Sep 3, 2024
@kdj0c what are you using to generate the QR codes above?
I've got panic screen working. And I've compiled the kernel with
DRM_PANIC_SCREEN_QR_CODE=yand booted it, but I still get the panic screen w/o QR codes. Is resolution a factor? IIAC the QR codes require a rather high resolution display to fit?kdj0c commentedon Sep 3, 2024
@g0t4 You also need to set DRM_PANIC_SCREEN=qr_code (or at runtime, as root:)
echo -n "qr_code" > /sys/module/drm/parameters/panic_screeng0t4 commentedon Sep 4, 2024
@kdj0c you just made my day (actually my weekend)! THANK YOU
g0t4 commentedon Sep 4, 2024
here's a blue version, triggered via DRM_PANIC_DEBUG
qnixsynapse commentedon Oct 5, 2024
This is not supported on i915 yet but do we really need a fully loaded driver to display a panic message? What happens when the cause of the panic is the display driver itself?
kdj0c commentedon Oct 6, 2024
The panic code is a best effort, that means it's impossible to guarantee that you will see the panic screen.
When a panic occurs, the easiest way to display something is to re-use the current framebuffer. Otherwise you will need to allocate another framebuffer and configure all the display pipeline, which is hard to do in a safe way in a panic handler.
If the panic is caused by the graphic driver itself, there is a chance that the display pipeline is broken and that you won't see the message, but it might still work too.
qnixsynapse commentedon Dec 4, 2024
I think there are better ways to do this like handing off to simpledrm from GPU specific kmodule? Since technically, we don't need any fancy thing while showing a panic message. Just a static screen.
I think on most modern systems, efifb can be reinitialized after device specific kmodule has taken over. Windows probably follows this (although I can be wrong here).
Also, simpledrm (or efifb) does not require full GPU reinitialization and relies on the firmware’s framebuffer, which is generally simpler and less state-dependent than GPU-specific pipelines.
I have seen your patch on Intel i915. Thinking of trying it out with your permission.
kdj0c commentedon Dec 4, 2024
@qnixsynapse, it is not that simple. For example, the efifb can be in a low resolution like 1024x768, but then you've switched to 4K. If you want to re-use the efifb framebuffer, then you also need to change the resolution of the screen, which can be quite complex with DP or HDMI.
switching back to simpledrm, means loading a kernel module during a panic, which is quite risky.
Also I've already made drm_panic works on a i.MX6 ARM board, which don't have an EFI or equivalent framebuffer.
lastly, yes you can try my patch for i915, that's free software, you don't have to ask to test it. It doesn't work for Alderlake or later, but I'm working on it.
qnixsynapse commentedon Dec 4, 2024
@kdj0c Thank you for your work!
Hmm.. This is correct. I was thinking of alternative ways which would be simple enough and independent of GPU specific kmodules, since the current implementation requires of these modules to have support in order to display it.
christian-heusel commentedon Feb 28, 2025
Is there a nice tool on linux to retrieve the qr-code contents from a picture of a screen? 🤔 So far I tried
zbarimgbut couldn't get it to work 😅lilydjwg commentedon Feb 28, 2025
My phones can only read the first QR code. The other three fails to scan. App is com.atharok.barcodescanner.
Using screenshot and
zbarimg -q --raw PNG_FILEI can "scan" all of them.christian-heusel commentedon Feb 28, 2025
Yeah maybe the picture I took from my laptop screen isn't good enough for
zbarimgthen 😰 The ones from this issue worked fine 😊adryzz commentedon Apr 9, 2025
since a lot of apps have trouble with big QR codes and stuff, i wanted to create an app to view offline both raw and encoded (old and new format) kernel panic QR codes, porting this javascript code and i think i got something usable https://github.com/adryzz/drm_panic-viewer
Screencast_20250408_171817.webm
kdj0c commentedon Apr 9, 2025
That's awesome, thanks a lot for sharing it.
So with this app it's possible to use the compressed format without internet access, that's nice.