Secondary hdd with swap partition: spindown?

Tags:

Answer: 1

23 hours ago

I'm running Ubuntu 16.04 on a laptop. I have a small, 120GB SSD drive, and a secondary 1TB HDD.

Today I made Linux use a swap partition that is located on that second drive. After testing things out (opening LOTS of chrome tabs) and checking if the swap partition is used (it is), I noticed, that the drive in question doesn't spindown after some amount of time like it used to.

Battery life on my laptop is a huge deal to me, because I often have to work while traveling, with no way to recharge. Is there a way to force Linux out of using swap partition, and turn the second hdd off? Is there a way to do it automatically?

Added by: Dr. Reed Kirlin

Answer: 2

33 hours ago

To force Linux not use the swap, run sudo swapoff -a

As for turning off the disk, you can do that through the included "Disks" application. See screenshot. (The option is grayed out for me as it is my system drive)

enter image description here

Added by: Samanta Monahan

Answer: 3

19 hours ago

You could look into the tlp package (sudo apt install tlp will install it). Once installed, it sets up various power-saving optimizations for laptops automatically. It's quite "set-it-and-forget-it"; once it's installed, you don't need to manually do anything to make it work.

Spinning down hard drives when they are idle is a feature supported by tlp; however, it is not enabled by default. It can be enabled by editing the DISK_SPINDOWN_TIMEOUT_ON_AC and DISK_SPINDOWN_TIMEOUT_ON_BAT values in the /etc/default/tlp configuration file (the values indicate the number of seconds before the drive spins-down to save power; by default they are 0, indicating no spin-down).

More information about manually configuring tlp: http://linrunner.de/en/tlp/docs/tlp-configuration.html

More general information about tlp: http://linrunner.de/en/tlp/tlp.html

Added by: Noel Balistreri

Popular Search

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9