Linux Mint 22 is out....why not try it out and ending up hacking the laptop bios?

Prolog

Using Linux isn't something new to me. 

I made my first ssh login on a linux root server (hosted at Hetzner) 18 years ago. Ever since then I've had at least one root server running linux in Hetzners Falkenstein data center.

Also at home, if I nmap my local network I see 11 devices running linux.

However, Linux never made it to be my default desktop operating system. Not that I didn't try it. 

I did so many times over the years. Started with Suse (which in and after 2005 became openSuse) over several debian, ubuntu and fedore versions.

But none of them stayed for longer. Always something just didn't fit. 

And while my gameing PC will remain a Windows machine (at least until I make the games [FalconBMS, DCS] running good and my DIY controls functional) it would be a good time to switch my laptop from Windows 11 to a modern Linux distribution.

Mint.... why not?

During the last weeks I've read a lot about Mint. Most people who switched to it from Windows seemed to be quite happy with it and it's modern desktop environment.

My OH is also using the laptop and only used Windows before so the switch shouldn't be too hard.

Finally I downloaded the 22 version, etched it onto an USB Stick and booted my laptop from it.

That's a Medion Erazer Crawler E25 laptop with Ryzen CPU which has an integrated graphic unit but also has an addition Nvidia RTX3050.

Medion doesn't produced that device on it's own but bought the Clevo NH55EJQ barebone and put some own stuff on it.

One of the own stuff, the BIOS/UEFI will become a topic later on....

I started the installation just to be reminded that the hard drive encryption is enabled. So I switched back to Windows and decrypted the whole thing. Bye bye Bitlocker

Another boot from USB later I finally was able to start the installation. Which was surprisingly fast.

Now that Mint is installed

It was a really how hanging fruit to use the GUI to install the most recent NVidia driver and setup everything.

Then I closed the laptop lid and it went into standby.

When I opened the lid a hour later the power button lightened up and I expected the screen to also switch on. But that just didn't happen.

And now?

That's where the real fun started. I followed the linux kerner documentation and used pm_trace which sets a debug value as time of the laptop clock, since that's the only available storage location during the resume process.

And as expected some errors popped up in my dmesg afterwards.

[ 3.259902] PM: Magic number: 4:190:178 
[ 3.259955] acpi PNP0C02:0b: hash matches
[ 3.259971] acpi device:0e: hash matches
[ 3.259994] platform: hash matches

OK, at least a hint. But the fact that Google turned up less than a dozen results for the search term "acpi PNP0C02:0b: hash matches" made me less happy.

Since at least 2 of the result pointed towards the BIOS settings for sleep mode it was time to check the bios again.

So I rebooted the laptop, pressed F2 durnig the boot and in the next user interface I selected the Setup section to enter the settings.

Unfortunately only a hand full of options were available. And none of them was related to the sleep mode.

Keep digging

At this point I knew I need an unlocked bios with all options available. The "default" bios from the barebone manufacturer should be unlocked. So let's try that.

Yeah....not so much luck. It seems all their downloads are gone and an email to the contact address Clevo mentions on the download pages returns a happy

554 5.7.1 : Recipient address rejected: Access denied

That's not promising. Time to search the internet for information about how to unlock a locked BIOS/UEFI. Can't be rocket science, can it?

Actually no, it's not rocket science. Other have done that before. Let's search github for Clevo

A starting point

And GitHub, as disappointing as it may be in some respects (2024 and still no IPv6 support...), has something to offer.

https://github.com/eebssk1/clevo-insyde-uefi-settings-show-all

So it's rather easy. Just boot into an efi-console (you never heard of before), and set some values in the bios which, if done incorrectly could turn the laptop into a nice operation for the local fire brigade.

Let's give it a try...

Hot phases are fun phases, aren't they?

Why again am I doing that? To run linux on a machine which is running Windows 11 rather well and without any problems.

Sounds totally sane too me. But let's move forwards... I....

  • Booted Windows
  • Downloaded the most recent Bios I found in the Medion forum (yes, not even Medion offers then on their service page anymore)
  • Unpacked the 00_Bios_Crawler_E25_Defender_E15.zip
  • Installed the BIOS
  • Checked that the BIOS is still locked as hell, yeah at least no disappointment here
  • Booted Windows again and got in hold of 
  • Opened the BIOS efi file with UEFITool
  • Exracted the SetupUtility structure
  • Opened the extract with Universal IFR Extractor and created an txt export
  • Searched the txt export for the relavant part (Setup Menu Insyde Full Show)
  • and found the correct offset: Variable: 0x212
0xE3CD2 Setting: Setup Menu Insyde Full Show, Variable: 0x212.....
0xE3CE3 Option: Hide, Value: 0x0 ....
0xE3CEA Option: Show, Value: 0x1 ....

That means that if the variable with the offset 0x212 is 0x1 all options should be shown. So time to either destroy my laptop or unlock the bios.

So I proceeded by

  • Copied the modGRUBShell.efi into the root directory of my Windows drive (C, and also all other drives since I didn't knew which will be available in the efi-console
  • Rebooted the laptop and entered the main setup by pressing F2
  • Selected "boot from file"
  • Chose the modGRUBShell.efi which opened the efi-console

First I checked what the offset 0x212 actually contains.

setup_var 0x212

The output has shown me that its a "setup" related offset, which points to a variable holding the value 0.

Time to change it

setup_var 0x212 0x01

and check whether the change was accepted or not with 

setup_var 0x212

The output was 0x1 which looked promising. So I left the console with exit which brought me back to the main menue. 

From here I selected Setup and entered a completely unlocked BIOS. OMG are that many options. 

In the AMD settings I found what I was looking for:

The Sleep mode setting. 

It's set to "Modern sleep" which is quite focused on Windows and not really supported by all Linux hardware constellations. 

I chose "S3" which is the "good old" sleep mode, saved and exited the settings and booted up Mint.

I opened the browser, just to have some window opened and closed the laptop lid.

After waiting a few seconds I opened the lid and the following seconds weren't the most relaxed ones ever.

Counting 1....2....3....4....fi-display switched on....

Heureka

It seems I made it. That damn machine is now resume from standby. And all it took was to hack the damn Bios to enable a sleep mode which is fully supported by both, Linux and Windows.

And that just because Medion thought it would be a good idea to hide that damn setting.