Outils pour utilisateurs

Outils du site


issue179:tutoriel

Ceci est une ancienne révision du document !


You might have a lot of files open and not want to close these before you need to travel. For PDFs, a shutdown and restart would not be much of a problem if you were using qpdfview because that uses a tab for each document, and all tabs are reopened when the program restarts. However, LibreOffice doesn't employ tabs and so documents would have to be individually reopened using the Recent Documents menu. An alternative to a shutdown would be to just close the lid and have the machine go into a standby state. But this might not always be the best option. A laptop still uses power while in that state and, when put inside a backpack or bag, may overheat. There have been recent warnings to users about this. Also leaving a laptop in standby would not be a good idea if your battery is low and likely to run out. So what might be a good alternative?

There is a nice little command line tool called pm-hibernate. Actually there are three of these: pm-suspend, pm-hibernate, and pm-hybrid. The first does a suspend for a quick restart and doesn't power down. The second, pm-hibernate, saves the state of the machine and does power it down. Finally, you've probably guessed what pm-hybrid does, which is indeed to do everything needed to hibernate, but suspends instead of powering down. You can find out more about these by entering man pm-hibernate at the command-line (bottom left).

pm-hibernate works as advertised. It is invoked from the command-line (Figure 2), and takes about fifty seconds or so to save the state to swap, and power down. Make sure that you don't run out of swap though. Having said that, I'm a common garden variety Linux user and didn't do anything special to set swap. I run Debian 11 (upgraded from a Debian 10 install) on a seven or eight year old 11.6 inch Acer E11 laptop, with a 500 MB hard drive and with the RAM upgraded to 8 GB. Swap space was automatically set by the Debian 10 install to 7.9 GB. With all sorts of documents and calculation engines open on my machine, there is still quite a comfortable free space margin (bottom right). Swappiness is 60 on a scale of 0 to 100, the default setting (bottom right).

So am I happy with this? Well you probably guessed I would be - my most important goal is to not lose track of the documents I have open and am reading when I shut down at night or travel. I could probably benefit from having a faster processor to speed up coming out of hibernation, but that's just one of the small wrinkles in my universe. pm-hibernate hasn't failed and hasn't crashed the laptop. It’s just one of those nice little tools that fits the bill when you really need it.

issue179/tutoriel.1648385830.txt.gz · Dernière modification : 2022/03/27 14:57 de auntiee