Ask Klaus
Ask Klaus
Klaus Knopper answers your Linux questions.
Notebook Lockup
Dear Professor Knopper,
I have had a problem while trying to use Knoppix as a Live USB on an HP computer Envy 4 (64 bits) running under Windows 7.
First, the BIOS order was modified to allow the USB port to be checked first. Linux Mint 15 (32 bits) from a USB stick was not able to start the HP computer. Then, starting Knoppix 7.0.4 from an SDHC card (16GB; connected through an adapter to the USB port) was easy, and all the software was there.
The Live USB test seemed OK, and I could stop and restart the Knoppix distribution. However, after leaving the HP computer for some time (several tens of minutes) without working on the machine, I could not stop it anymore, and trying to run a shut down on the terminal seemed ineffective. There was a message saying "not enough memory." The computer was then halted by turning off the power supply.
After that, it was again possible to start the Knoppix version 7.0.4 from the USB port. Another test with Linux Mint 15 (32 bits) was then effective in triggering the computer. Later, another test with Knoppix version 7.0.3 gave the same story as seen with 7.0.4 (i.e., impossible to stop Knoppix normally; the only way to stop it was to power off.
Trying again to reinstall the BIOS order as before, it became apparent that the choices (lines) for UEFI and Legacy had disappeared from the BIOS! Therefore, restarting the computer from Windows 7 appeared impossible. The only active port seemed the USB. The computer refused to restart from the Windows 7 installed on the hard drive.
Finally, I decided to go and ask help from a technical service. This was a shop where a technician built home-made computers, selling brands like HP and, among others, HP Envy 4 (note that the warranty for my HP computer was expired). The technician could not start the HP computer; he seemed to think the hard disk had been somewhat modified, at least on the first tracks (something written on the disk), and he had to replace the hard disk and reinstall a Windows 7 version (not looking exactly the same as the initial Microsoft OS). He also fixed the BIOS. Now the options concerning UEFI and Legacy reappeared; however, there was an additional chip, an SSD 32GB, which was not recognized, and he could not reinstall it on the computer.
The computer is working under Windows 7 installed on a new hard disk; the SSD 32GB chip is useless, not connected. Some software is not available anymore (Word, Excel, etc.; that's not a problem because I installed LibreOffice). The HP software has disappeared. To avoid any further problem, I did not try to restart from a USB Live Linux, at least before receiving some good advice.
Maybe it would have been better to contact the HP technical service; however, I was on the move and found [it] impossible to have the computer taken away for several weeks; in addition, the one-year warranty was over.
Following exploration on the web, I discovered that some computers – mainly HPs – are "marked" (we would say "tattooed"), and therefore the user seems not to be allowed some manipulation on his own computer! The HP Envy 4 was indeed listed in that "marked computer" category.
I would appreciate very much some advice from you about this technical problem. Was the Knoppix distribution in some way a trigger for this bad experience, and/or was the HP additional software the cause, using the SSD as cache? I would appreciate knowing more about [this] and receiving some good advice: Should I again try a Live USB Linux distribution? Is there a solution to make use of that SSD 32GB?
Awaiting news from you. Yours very sincerely, Jean-Marie
It seems that the HP Envy 4 is just another "problem computer" like many that have a tight binding to the pre-installed Windows. Some BIOS options seem to be accessible only by a booted Windows installation; some others could just be hidden somewhere. Also, when you do a BIOS firmware upgrade, this can change the accessible options dramatically when the stored configuration does not match the BIOS version anymore. In that case, loading defaults, saving BIOS options, and restarting may be helpful.
BTW, the BIOS menu should appear when pressing Esc right after turning on the computer, which is also a little unusual (most notebooks use F2).
Also, if the pre-installed Windows is hibernating, you might not be able to get into the BIOS at all, unless you do an "improper" shutdown by pressing the power key for at least eight seconds.
There are few success stories with this notebook, but I found a report that may contain some helpful information [1]. The baseline seems to be turning off "UEFI" mode and using "legacy boot" instead. It may well be that the pre-installed Windows does not boot anymore after this change, so you can either change back the BIOS settings (or "load defaults") each time you want to reboot into Windows, or you can wipe and reinstall Windows when the UEFI option is turned OFF in the BIOS.
Knoppix definitely does not change anything on your hard disk or in the UEFI settings, but Ubuntu or Mint may write something to the UEFI variable space in order to change settings or leave log messages for debugging. Not all UEFI firmware implementations handle this well – the HP Envy series especially seems to be fragile concerning changes of certain settings [2].
My recommendation would be not using this type of notebook for Linux, or if you do, use it exclusively for Linux with no dual-boot into another system that tries to change UEFI settings. Also make sure the BIOS settings are set to "Legacy" (non-UEFI) boot. Before trying anything, check for a newer BIOS firmware; you may have had bad luck with an older/defective BIOS that easily breaks and could be replaced by a better working version.
The "out of memory" error is unlikely being caused by a real lack of memory. It could rather be a problem with the shared memory settings for the graphics chipset or a misleading kernel module message. Failure to power off automatically after shutdown may be caused by lack of support for ACPI power management. You could try boot option acpi_osi=Linux
.
About the 32GB SSD: Newer Linux kernels (3.10 and above) have support for hybrid SSD + magnetic disks using the bcache feature [3]. Other possibilities are FlashCache [4] or dm-cache [5]. It depends on which Linux distro you are running as to which feature is supported best and is easiest to configure.
Slow Load
Hi: I'm running LMDE 201304 on my Toshiba laptop (about two years old). I was running Ubuntu 10.04 and have upgraded now to LMDE. I noticed load time from boot to simple opening of Firefox was slow. I used hdparm
to look into the possibility of HDD issues.
I checked all settings, and all look good; however, my R/W speeds are the same direct and buffered (Listing 1). I have two drives I'm testing, and both are running about the same.
Listing 1
hdparm Output
Maybe you could point me in the right direction to resolve this issue.
Mark
It looks like the settings that Linux uses for the hard disk drive are already the best you can get. Unfortunately, it's not a very fast hard disk.
An explanation could have been too much power-saving (like the disk spinning down and needing time to spin up again), but the shown hdparm setting -B 254
already disables spindown. Don't worry about the commands
hdparm -t /dev/sda hdparm --direct -t /dev/sda
not showing any noticeable difference; this is normal! Both read from disk into RAM. The "buffered" reading (first command) would just improve performance when many concurrent drive accesses occur, which gives the kernel's page cache, preloading, and caching sectors something to do.
The hdparm info shows that transfer speed and multicount settings are already set to maximum, so no tuning is needed there.
Please check "laptop-mode" to see if it is active, which would delay writes to disk until a read operation occurs – which saves energy but delays disk accesses. The less-performant powersave options are usually turned on by udev/upower automatically once you run on battery. You can disable this by deinstalling the laptop-mode package or changing options in /etc/laptop-mode/laptop-mode.conf
.
With all possible software tuning, however, I think the real performance problem is the hard disk just being slow rather than inefficient software settings. A newer hard disk has at least twice the throughput as shown in your hdparm -t
output, so you may be better off by replacing the disk (also increasing disk space and possibly getting longer battery run time at the same time by using a more power efficient disk).
The hdparm built-in test is a very weak indicator for interactive performance issues. If you want to run a better performance test, bonnie++ (Listing 2) is a good tool that also checks concurrent disk access by multiple processes to find latencies introduced by physical disk magnetic head movements.
Listing 2
bonnie++ Output with Hard Disk Benchmark
Klaus Knopper
Klaus Knopper is the creator of Knoppix and co-founder of LinuxTag expo. He currently is a Professor, Dipl. Ing., at the University of Applied Sciences Kaiserslautern. If you have a configuration problem, or if you just want to learn more about how Linux works, send your questions to: mailto:klaus@linux-magazine.com
Infos
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.
-
SUSE Renames Several Products for Better Name Recognition
SUSE has been a very powerful player in the European market, but it knows it must branch out to gain serious traction. Will a name change do the trick?
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.