Bonum Certa Men Certa

More Work on Debian 12, UEFI is Trash Part 3: Fixing a Lenovo Restart “Bug”

Reprinted with permission from Ryan Farmer.

More Work on Debian. Purging More Internationalization and Properly Setting Up Software Repositories.



Yesterday, and this morning, I did some more work de-bloating Debian.



In my last post on the subject, I mentioned the input method editors, why they’re useless to me (as a US English user who never enters non-Latin alphabet characters), and how much RAM some of them took (over 100 MB).



Well, it turned out there was more where that came from.



Debian installs every Firefox and LibreOffice language pack as well as LibreOffice Help Packs in every language, and a fourth input method editor that I missed the last time called fcitx. Two versions of it, apparently.



Proposing to Apt that it purge *fcitx* removed the fcitx and fcitx5 packages, a bunch of non-Latin Alphabet font packages that nothing seemed to depend on except for fcitx itself. So I did that and then an apt autoremove to be sure. Making sure along the way that it wasn’t proposing anything stupid, like removing KDE or X11, and it didn’t.



That done, I went into Synaptic Package Manager where I realized there was all this Firefox and LibreOffice internationalization junk.



So I ended up clearing out (purge) over 2 GB of useless (to me) help and language packs for that.



Then I went through all of the installed packages and purged out the task-(non English Language) stuff and the various oddities that I missed the last time around.



Roy Schestowitz says Internationalization is a “feature”. I suppose it is. Debian can’t tell who will use it, but most distributions at least have an installer that removes it from the computer after it copies over the OS image and knows where the user is and how they will use the computer. (Language, locale, etc.)



Is 2 GB a lot of data (on top of what I purged out the other day when I was trying to get input method editors to quit taking 100+ MB of system RAM)?



No, it’s not. Especially on compressed BtrFS. But it just “feels” bloated. I try to leave as much room as possible for MY stuff on my SSD, and this is just another “This feels rather clumsy and ham-fisted.” thing I’ve run into with Debian.



Naturally, I know what I’m doing with Synaptic Package Manager and Apt autoremove and am not going to do something that proposes ruining the system.



If you don’t want to tear things apart, then leave it alone or possibly look into setting up a base system and then layering it with KDE meta-packages.



Then I noticed that the installer didn’t do the best job of setting up my Apt repos.



It only set up “main”. Debian also has “contrib”, “non-free”, and “non-free-firmware”.



So I opened /etc/apt/sources.list in nano, as an administrator, and edited each line to add contrib non-free non-free-firmware after main on each line.



It ended up looking like this:



Debian sources



Technically, I could strip out the commented-out top line and the blank line underneath it and the commented paragraph at the bottom, if I wanted to, but they aren’t doing anything so meh.



Then I ran apt update and it told me there were updated CPU firmware files for AMD and Intel processors.



The Intel one turned out to be a patch for the Downfall vulnerability, and the Debian live installer left things configured so that my firmware packages would never get updates!



After the repositories were set up correctly, and the firmware was no longer being showed as “manually installed” because of lack of a repository, I proceeded to minimize the mess of packages that the Debian installer left marked as “manually installed”.



This was easy.



sudo apt-mark minimize-manual



This proposed a long list of packages that actually got automatically installed with something else. Fixed a few dozen “manual” marks. Didn’t get everything but cleaned up the list a lot.



Finally, I noticed a quirk in my system on reboots.



Sometimes it takes a very long time to reboot, seemingly for no reason. The system will hang for half a minute and the only message it spits out is that the watchdog failed to respond, which turns out to be a red herring.



It turned out that rebooting a PC is a complicated process and there’s several ways to do it, most of which are commented as specific problems with various models. So reboot.c in the Linux source has grown very, very long.



The Linux documentation suggested that there’s, errrm, multiple ways to handle this manually if you have to.



“21.1.5. Rebooting
reboot=b[ios] | t[riple] | k[bd] | a[cpi] | e[fi] [, [w]arm | [c]old]
bios
Use the CPU reboot vector for warm reset
warm
Don’t set the cold reboot flag
cold
Set the cold reboot flag
triple
Force a triple fault (init)
kbd
Use the keyboard controller. cold reset (default)
acpi
Use the ACPI RESET_REG in the FADT. If ACPI is not configured or the ACPI reset does not work, the reboot path attempts the reset using the keyboard controller.
efi
Use efi reset_system runtime service. If EFI is not configured or the EFI reset does not work, the reboot path attempts the reset using the keyboard controller.”

-Kernel documentation


My guess is it defaulted to UEFI (system firmware) interfaces and that didn’t respond, so after half a minute it gave up and started banging on the keyboard controller, which is how you rebooted a PC in the 1980s.



Amusingly, although the UEFI interface appears to be quite, quite broken on the Lenovo ThinkBook 15 ITL Gen2, the ACPI interface DOES work.



The Linux documentation for reboot=acpi and reboot=bios or reboot=uefi says that the fallback is always give up and bang on the keyboard controller.



This resets the CPU and does a cold reboot, and apparently this compatibility interface holdover from Legacy BIOS is the most “guaranteed-to-work” thing that UEFI firmware has 14 years after it became common.



Adding reboot=acpi to the kernel start line consistently seems to resolve the problem and make the machine reboot right away.



According to Debian’s Wiki, the done way to make this persistent after you know it fixes the problem is to add it to the /etc/grub/default file with a text editor (like nano) and then running the update-grub command as the administrative user (with sudo or as root).



In my case, the line GRUB_CMDLINE_LINUX_DEFAULT=”quiet” in /etc/default/grub ends up looking like this:



GRUB_CMDLINE_LINUX_DEFAULT=”reboot=acpi quiet”



Apparently, it’s just yet another “broken UEFI issue”.



Thanks Lenovo. It’s always so nice when these happen.



Another reason to buy a System76 laptop with Coreboot next time.



UEFI can’t even reliably reboot a computer 14 years later.



Yet another reason why UEFI is trash.



It’s not like I never installed any UEFI updates from Lenovo.



The first 13 updates got rolled into the UEFI flash I did before ditching Windows 10 because Linux was “ready” for this hardware.



It’s just more of this “Insyde BIOS” horseshit. Always such a pleasure.



Windows always seems to know exactly how to handle it because, basically, Microsoft and the BIOS vendors get together and “decide what the bugs will be” so Windows always knows what to do.



Is this illegal? Certainly. But good luck ever “proving” the collusion is going on, when it obviously is. They can make sure to shake hands in seedy backroom deals so that anything else you boot on the PC runs into some trouble.



Like that time I found the ACPI “bug” in a Foxconn G33 motherboard, but Windows had the “fix” in XP SP2, which shipped over 3 years prior to the first affected board.

Recent Techrights' Posts

[Meme] It Takes Only Words to Destroy Malicious People and Pathological Liars
Trying to silence us is foolish. Boasting about this in public is worse than foolish; it's a legal liability.
WordPress is Unfit for Purpose in 2024
The Web itself changed a lot and the majority of Web traffic is pure junk
Nobody Knows What's in Our Fridge! Wow, Spooky!
Freedom means you can also purchase things anonymously
 
[Video] Daniel Pocock Warning About Someone Like Elon Musk Buying and Misusing Twitter Almost 7 Years Ago
Daniel Pocock spoke about Facebook and Twitter while attending the UN Forum on Business and Human Rights in Geneva, Switzerland
Dead Blog ('Hoisted By His Own Petard')
The saying "people who live in glass houses shouldn't throw stones" is also applicable here
Debian Voters Clearly Supportive of Richard Stallman (Founder of GNU/Linux), But Debian Leaders Keep Giving Voting Rights to Microsoft Staff
It can be seen that the pro-Stallman positions are dominant
[Meme] Remember That Microsoft and Trump Already Have a "Targets List"
Microsoft loves Trump bailouts
Service Notice: IRC Downtimes RESOLVED
We believe we've solved this entirely (or hope so), but it may take another week to know for sure
Linux 'Not Inclusive' 6.12 (Trumpism Inside Linux Foundation Affirmed)
They can make a codename for this release: Linux 'Not Inclusive' 6.12
The Open Source Initiative (OSI) is Dead. Cause of Death: Microsoft Bribes.
At the core, Linux Foundation and OSI adopted lies as a business model
Joan Meyer correctly linked Gideon Cody raid on Marion County Record to Kristallnacht
Reprinted with permission from Daniel Pocock
Trans People Misused to Attack a Project or Developer Who Has Nothing to Do With Them
And why that truly hurts all trans people
Our 18+ Years of Freedom-Fighting
We always fight back
Gemini Links 11/11/2024: Men Losing Grip and "You're Relaxing Wrong"
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Sunday, November 10, 2024
IRC logs for Sunday, November 10, 2024
Freedom Must Always Be Fought For (All the Time)
Ridicule of "freedom fighters" in the digital realm is typically orchestrated by dictators or wannabes.
Gemini Links 10/11/2024: Taking Jokes and Writing Dense Assembly
Links for the day
Links 10/11/2024: Meaning of Life and iPhone ‘Inactivity Reboot’
Links for the day
Links 10/11/2024: Microsoft Adds Surveillance to Notepad and Paint, TikTok Shutdown Order
Links for the day
Gemini Links 10/11/2024: Scrawlspace and California
Links for the day
Links 10/11/2024: Politics, Economics, and Ticketmaster Issues
Links for the day
Linux Foundation: We've Shut Down the Mailing Lists and Fired Everyone at Linux.com So We Can Spend Money Buying Puff Pieces and Paying Clickfraud/Spammers
deeply rogue
The 'Other' Bruce... on Openwashing at OSI (and Not Bruce Perens, the OSI's Co-founder)
Openwashing people (connected to Microsoft) already do "open weights"
Gemini Links 10/11/2024: A Writer's Block, VIM Tips and Tricks
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Saturday, November 09, 2024
IRC logs for Saturday, November 09, 2024
[Meme] Linux Foundation Cuts
money is spent by the million on highly dubious things
Politics Becoming Way Too 'Toxic'
'Toxic' political discourse ought to be covered, but reducing the toxicity of coverage itself (e.g. inaccurately covering things to incite "the left" and "the right") is still challenging
"Paperless Office" (Incompatible With the Law) as a Threat to Workers' Health at the EPO, Europe's Second-Largest Institution and Largest Patent Office
"Software Ergonomics need to be brought back to the agenda at a high level!"
Linux Foundation is Rebuilding the Berlin Wall (to Keep Russians Out of Linux)
So the Linux Foundation is basically acting a bit like oppressive Soviets
Linux Foundation is a Scam Like 'Crypto' (So is the Company of Jim Zemlin's Wife, Bakkt)
To us, the Linux Foundation is just a massive scam
Remembering and Respecting Fallen Ones by Avoiding or Stopping Wars (and Boycotting Companies That Want Wars)
The people who die tend to be the least privileged and connected
EPO is Blasting Its Own Foot (There Will be No EPO Left)
If the EPO carries on shooting its own foot, there will be nothing left of it
There's Always a Way to Improve
Self-improvement is a perpetual task
Joel Espy Klecker, unpaid, terminally ill youth labor & Debian knew it
Reprinted with permission from Daniel Pocock
List of Debian lies and deception
Reprinted with permission from Daniel Pocock
Links 09/11/2024: More Mass Layoffs and Concerns About Musk Working Like Trump Aide
Links for the day
Gemini Links 09/11/2024: Operating the Temple System and SeaweedFS
Links for the day
[Teaser] [Meme] Central Occupational Health, Safety and Ergonomics Committee (COHSEC) at European Patent Office (EPO)
These are not teenage gamers
Links 09/11/2024: Further Restrictions on Social Control Media, CASIO Cracked Again
Links for the day
Why Brown CIT Oughtn't Be Named After Thomas J. Watson (Like Many Faculties Ought Not be Named After Bill Gates)
In their own words
Reminder That Mass Layoffs Are Going on All Month This Month at IBM
The "silent" layoffs continue until the end of this month if not longer
[Meme] Just Blame Whoever Takes Advantage of Your Back Doors
The media will even sympathise with malicious and/or incompetent companies if they blame "Russia"
This Remembrance Sunday We Must Also Remember That Some 'Security Companies' Want More Cyberwar
Some companies profit from the cyberwar; hence, their objective is not to end the war
Non-Tech Enshittification: Post Office Perils and the Czech is in the Mail
We still hope that the parcel will be recovered (maybe at customs) or will be sent back some day
[Meme] Don't Try This at Home (But a Datacentre Might be OK)
Quit outsourcing to Social Control Media
There's No Free Lunch in Video Hosting
they say there's no free lunch; if you aren't paying for hosting and serving of "your" videos, you're not the customer and those videos, once uploaded, aren't quite yours anymore
Parroting Microsoft Talking Points About Computer Security
This past summer Richard M. Stallman (RMS) openly complained in a public event that the term "security" had come to mean all sorts of ridiculous things, including the very oppose of real security
Visits to OpenAI's Site Plunged by More Than 67% in the Past Half a Year Alone
'autocorrect on steroids' is mostly worthless
Pocock Running for Office Again
Pocock dealt with all sorts of 'politics' in Free software and, unlike many politicians, he has a background in science and technology
[Meme] Turning the EPO Into a Speculation Bank, Monetising It by Breaking the Law, Playing Real Estate (and Mortgage) Financial Games
travesty
Real Estate and Workplace Problems at the European Patent Office, Which Grants Fake Patents Under the Guise of "Law"
Report on the 54th meeting of the Munich LOHSEC of 20 June 2024
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Friday, November 08, 2024
IRC logs for Friday, November 08, 2024
Links 09/11/2024: Politics, Climate, and Why Physical Cash is Crucial
Links for the day
Gemini Links 09/11/2024: Minerals, Rants, and Maintaining Planetary Balance
Links for the day