A Python script turns a kernel panic QR code photo back into a readable crash log
Decode kernel panic from QR Code photo
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.
Scan a Linux panic QR code with ZXingReader and decompress its crash log.
- jolmg
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:
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
I think that's a really good idea! Would love to see this upstream