https://nerology.substack.com/p/my-broken-thinkpad-plays-music-upon [https] Nerology Subscribe Sign in Share this post [https] My broken ThinkPad plays music upon booting nerology.substack.com Copy link Facebook Email Notes Other My broken ThinkPad plays music upon booting A puzzle with dodgy video recordings, funky spectrograms and deprecated APK's [https] Nero Vanbiervliet Jul 17, 2023 Share this post [https] My broken ThinkPad plays music upon booting nerology.substack.com Copy link Facebook Email Notes Other Share Last week, I woke up to my broken laptop making music upon booting: Loading video 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. [https] The decoding app doesn't run on recent Android devices 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: Loading video 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: [https] Error codes from 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 [https] Using FFmpeg to get a spectrogram from the video You can see a lot of repetition in the vertical direction, but these are probably redundant resonances. They don't add any more information, so we should only look at the base frequencies. Capping the frequency at a maximum of 2 kHz, gives a much clearer image: [https] Spectrogram of my laptop's error, capped at 2 kHz 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: [https] Spectrogram of the reference video 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: [https] Annotating numbers to frequencies reveals 0282 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: [https] The reference video shows the same full sequence 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: [https] Decoding the spectrogram of my laptop The error code is 0001! And the checksum matches, because 1 + 1 = 2. Looking it up in the manual gave us a diagnosis: [https] I didn't know my laptop had an emergency-reset hole 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. [https] Yes I know you can see my naked reflection It worked! Share this post [https] My broken ThinkPad plays music upon booting nerology.substack.com Copy link Facebook Email Notes Other Share Comments [https] [ ] Ready for more? [ ]Subscribe (c) 2023 Nero Vanbiervliet Privacy [?] Terms [?] Collection notice Start WritingGet the app Substack is the home for great writing This site requires JavaScript to run correctly. Please turn on JavaScript or unblock scripts