# A Python script turns a kernel panic QR code photo back into a readable crash log

Original title: Decode kernel panic from QR Code photo

> Hacker News story 50302686 · language: en · submitted 2026-10-30
> Web version: https://zeli.app/story/50302686
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 43 · by [modinfo](<https://news.ycombinator.com/user?id=modinfo>) · 💬 21
[original](<https://gist.github.com/skorotkiewicz/c59e591c26661cb52b06afc42d8ac546>) · [HN discussion](<https://news.ycombinator.com/item?id=50302686>)

## Summary

When Linux panics, it can display a QR code containing the compressed crash log. This Python script uses ZXingReader to scan that QR code from a screenshot or photo, then decodes the decimal-digit payload and zlib-decompresses it into the original log. It runs entirely locally, requires only Python 3 and ZXingReader, and can write the output to a file or stdout.

## Key quote

> Scan a Linux panic QR code with ZXingReader and decompress its crash log.

## HN discussion (21 comments)

### [jolmg](<https://news.ycombinator.com/item?id=50322608>)

> For context, kernel panics seem to sometimes be encoded as a URL in the QR code by distros. The panic text is encoded as a numeric parameter. For example:
>
> https://jexposit.fedorapeople.org/drm-panic/#?a=x86_64&v=6.17.0-rc2+&z=64016708045408584681305161836175901065787789727173061004041671633088591186286363786562987653814347942450168430510852681524688435157911241621365859153819732690406649525043247774110913752991389170560320455163781439079986337356710273501164645667555084821480237326301207073831710176482850121513079951455217310046422632328303510474264780788030301611164774573122018172510304672562667379831349924441560360997679573341401750485619388375493[... many more digits]
>
> That's from the QR code image at:
>
> https://discussion.fedoraproject.org/t/f45-change-proposal-d...
>
> This script is to decode such kernel panics without needing to provide it to an external service.
>
> In the particular URL example, the panic is not necessarily sent to a server, because it's in a URL fragment (`#`), but still.

### [natas](<https://news.ycombinator.com/item?id=50322158>)

> I think that's a really good idea! Would love to see this upstream

---

## Cite

- Page: https://zeli.app/story/50302686
- Date: 2026-10-30
- Source: gist.github.com (https://gist.github.com/skorotkiewicz/c59e591c26661cb52b06afc42d8ac546)
- Hacker News: https://news.ycombinator.com/item?id=50302686

## Other languages

- zh: https://zeli.app/zh/story/50302686 · markdown: https://zeli.app/zh/story/50302686.md
- ja: https://zeli.app/ja/story/50302686 · markdown: https://zeli.app/ja/story/50302686.md
- ko: https://zeli.app/ko/story/50302686 · markdown: https://zeli.app/ko/story/50302686.md
- de: https://zeli.app/de/story/50302686 · markdown: https://zeli.app/de/story/50302686.md
- es: https://zeli.app/es/story/50302686 · markdown: https://zeli.app/es/story/50302686.md
- ru: https://zeli.app/ru/story/50302686 · markdown: https://zeli.app/ru/story/50302686.md
