My broken ThinkPad plays music upon booting
A puzzle with dodgy video recordings, funky spectrograms and deprecated APK's
Last week, I woke up to my broken laptop making music upon booting:
Not the kind of music that makes you happy after getting out of bed. After a quick Google search, I learned that this is called a “Musical Tone Error”. It’s my laptop singing a song to tell me what is wrong. That’s not too bad!
Even better, Lenovo made an app that translates the music into a readable error.
But it doesn’t run on recent android devices…
By this time, my friend Carlos saw my rant on Slack and joined me on my debugging adventure. He found this video online, that shows a demo of the working app:
The video clearly shows the app decoding the audio, and coming up with a final 0282 as error code. We found the corresponding error codes in the ThinkPad manual:
So the reference video has error code 0282: RAM issues. This meant that if we could crack the code of translating the audio melody to error codes, we could fix my laptop.
FFT to the rescue
Decoding audio messages is often about understanding the frequencies. With the Swiss knife of media processing, I was able to pull a spectrogram from my video:
ffmpeg -i laptop.mp3 -lavfi showspectrumpic=s=800x400 spectrogram.png
You can see a lot of repetition in the vertical direction, but these are probably redundant harmonics. They don’t add any more information, so we should only look at the fundamental frequencies. Capping the frequency at a maximum of 2 kHz, gives a much clearer image:
There are three repetitions of the same message, containing 8 frequencies of ± 0.2 seconds each. How could we translate that to a 4 digit error code?
We needed some mapping from frequency ↔ error digit. My first thought was to look in the source code of the deprecated Lenovo android app. I decompiled the APK, but couldn’t find a mapping table.
Let’s look at the spectrogram of the reference video to look for clues instead:
It also has 8 frequencies, good. And it starts with the same 3 frequencies. We started annotating some numbers to the frequencies. The first frequency seemed like a start marker, and we decided to assign 0 and 1 to the next two frequencies:
The number 0282 is in there! That is the error code that we know this reference video should have. And if you look at the reference video closely, you see that it shows a longer sequence briefly, before it shows 0282:
The 13 (D) is probably the checksum, because it matches 1 + 2 + 8 + 2. This means we should only look at frequencies 4, 5, 6 and 7. We applied the same logic to my laptop’s spectrogram:
The error code is 0001! And the checksum matches, because 1 + 1 = 2. Looking it up in the manual gave us a diagnosis:
That’s not the most helpful error message… But I didn’t know that my laptop had an “emergency-reset hole”. So I tried inserting a paper clip into the back of my laptop.
It worked!
If your broken ThinkPad plays music upon booting, it could be due to a few reasons. First, check the startup programs in the Task Manager to see if any music apps are set to open at startup. If this doesn't resolve the issue, try booting in Safe Mode to diagnose and disable any problematic software. If the problem persists, consider restoring your system to a previous state using System Restore.
This is amazing article you have shared. i also use Lenove laptop. this article will be help me to any error.