Ask Klaus
Suspended State
Hi Klaus: I switched to Debian last year, coming from Windows XP. What a great experience! Nevertheless, I'm still learning a lot, and sometimes I get surprised.
I have a laptop and a desktop, both quad-cores with 8GB memory, with Debian Wheezy 64-bit running fine. When I prepare a presentation, I like to set up everything, start required applications, open documents, and put my laptop to Hibernate using the user menu. (I don't use Suspend because of my dying battery.) But the behavior is strange: The laptop saves its context, shuts down, restarts, and restores the context. I cannot get it to hibernate. The same thing happens on the desktop! Did I miss a parameter in Wheezy? Thanks for your help. Best regards, Fred
Answer: For "suspend to disk" (which is what is commonly meant by "hibernate"), you need a kernel option in the APPEND
command line of your bootloader that tells the system on which partition the data should be saved to and restored from later. It is usually the swap partition, and it should be somewhat larger than the physical RAM present.
Example: Your RAM size is 8GB, the swap partition shown with
cat /proc/swaps
in the shell is /dev/sda2
, and it's at least 8GB in size. In this case, the correct boot command line for working hibernation would be:
resume=/dev/sda2
You can set it in your GRUB configuration – in either the /etc/grub.d/*
or /etc/default/grub
file – then call grub-mkconfig
as root. For GRUB1, you simply change /boot/grub/menu.lst
. You can cause a suspend to disk manually with:
sync echo -n disk | sudo tee /sys/power/state
Unfortunately, not all notebooks can be convinced to suspend to disk and wake up again without more tuning. If the kernel still does not manage to freeze all processes and I/O resources, it will cancel the suspend procedure and immediately go back to the desktop, which is what you already have observed. You could also try the "suspend to memory" option, if you replace your notebook's battery with a good one, which may be an alternative if suspend to disk does not work. Try
sync echo -n disk | sudo tee /sys/power/state
for a quick test.
Booting via PXE
Dear Klaus, Trying to PXE-boot Knoppix 7.2 is virtually driving me crazy. Basically it works, but it works fine only if the booting client has an Intel E1000 network adapter. On others, the system seems to miss a matching network driver and the boot process breaks. As you might see from my article in a recent Linux Magazine [9], I do not seem to be a total dummy. I have a couple of other systems PXE booting fine already, including the most harmful Window$ PE. I think it worked even with previous Knoppix releases.
Any hints/ideas?
Kind regards, Fritz
Answer: I assume you were using the Knoppix terminal server to create the initial ramdisk needed for booting via PXE (Figure 1). Although kernel and ramdisk are transferred from the TFTP server by the bootloader without needing drivers, after the Linux kernel starts, you need indeed a matching kernel module for the specific network card in your computer (Figure 2), so that the Knoppix filesystem can be mounted via NFS.
To include everything necessary, Knoppix will build a set of network drivers and their dependencies based on a list of common PXE-capable network cards and a manual selection.
If, in spite of selecting the correct network card(s), the necessary modules are still not included in the ramdisk, it's a bug, and I would be glad if you email me the network card name and the module in question.
Infos
- NVidia code names: http://nouveau.freedesktop.org/wiki/CodeNames/
- Installing Ubuntu on a MacBook: https://help.ubuntu.com/community/MacBook
- Installing Ubuntu on a MacBook Pro: https://help.ubuntu.com/community/MacBookPro
- Linux on a Macintosh: http://www.tuxation.com/linux-on-mac.html
- "Ask Klaus!" by Klaus Knopper, Linux Magazine, issue 150, pg. 52: http://www.linuxpromagazine.com/Issues/2013/150/Ask-Klaus
- "Ask Klaus!" by Klaus Knopper, Linux Magazine, issue 157, pg. 56: http://www.linuxpromagazine.com/Issues/2013/157/Ask-Klaus
- CR2032 battery: http://en.wikipedia.org/wiki/CR2032_battery
- Midori: http://midori-browser.org
- "DHCP and DNS on Rasp Pi" by Friedrich Hotz, Linux Magazine, Issue 159, February 2014, pg. 30
« Previous 1 2
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.
![Learn More](https://www.linux-magazine.com/var/linux_magazin/storage/images/media/linux-magazine-eng-us/images/misc/learn-more/834592-1-eng-US/Learn-More_medium.png)
News
-
NVIDIA Released Driver for Upcoming NVIDIA 560 GPU for Linux
Not only has NVIDIA released the driver for its upcoming CPU series, it's the first release that defaults to using open-source GPU kernel modules.
-
OpenMandriva Lx 24.07 Released
If you’re into rolling release Linux distributions, OpenMandriva ROME has a new snapshot with a new kernel.
-
Kernel 6.10 Available for General Usage
Linus Torvalds has released the 6.10 kernel and it includes significant performance increases for Intel Core hybrid systems and more.
-
TUXEDO Computers Releases InfinityBook Pro 14 Gen9 Laptop
Sporting either AMD or Intel CPUs, the TUXEDO InfinityBook Pro 14 is an extremely compact, lightweight, sturdy powerhouse.
-
Google Extends Support for Linux Kernels Used for Android
Because the LTS Linux kernel releases are so important to Android, Google has decided to extend the support period beyond that offered by the kernel development team.
-
Linux Mint 22 Stable Delayed
If you're anxious about getting your hands on the stable release of Linux Mint 22, it looks as if you're going to have to wait a bit longer.
-
Nitrux 3.5.1 Available for Install
The latest version of the immutable, systemd-free distribution includes an updated kernel and NVIDIA driver.
-
Debian 12.6 Released with Plenty of Bug Fixes and Updates
The sixth update to Debian "Bookworm" is all about security mitigations and making adjustments for some "serious problems."
-
Canonical Offers 12-Year LTS for Open Source Docker Images
Canonical is expanding its LTS offering to reach beyond the DEB packages with a new distro-less Docker image.
-
Plasma Desktop 6.1 Released with Several Enhancements
If you're a fan of Plasma Desktop, you should be excited about this new point release.