Posted inInformation Technology

Ubuntu 22.04 USB Drives Don’t Sleep

Ubuntu 22.04 really screwed the pooch when it comes to external drives. USB drives don’t sleep anymore. Install the Linux Mint version based on this same LTS and it doesn’t have the problem. I mean this pooch is hosed so bad you can’t even see SMART settings in Gnome Disks.

Work Around

Use Synaptic Package Manager and install hd-idle. If you don’t have Synaptic Package Manager use that icky Ubuntu Software thing to install Synaptic Package Manager so you never again have to use that icky Ubuntu Software thing.

Technically you should find out the UUID using blkid, but I didn’t. My external drive is always connected.

sudo nano /etc/default/hd-idle

By default the line in white has “-h” so this doesn’t run. My external drive is sdc. If you think you want all of your external drives to sleep after 10 minutes simply use “-i 600.”

sudo systemctl enable hd-idle
sudo systemctl start hd-idle

Wait however many minutes you set it for and the external drive should go to sleep. Without this USB drives don’t sleep.

This Hack Doesn’t Work

sudo hdparm -S 10 /dev/sdc

/dev/sdc:
 setting standby to 10 (50 seconds)
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

It should, but it don’t.

Those of us who live in rural America where Internet services max out at 25Mbs down and 3Mbs up never backup to the cloud.

Professionals with real IT degrees from real schools know that only the heir to the throne in the kingdom of idiots would consider “backing up to the cloud” putting all of their data in the hands of North Korean/Russian/insert-nationality-here hackers.

Roland Hughes started his IT career in the early 1980s. He quickly became a consultant and president of Logikal Solutions, a software consulting firm specializing in OpenVMS application and C++/Qt touchscreen/embedded Linux development. Early in his career he became involved in what is now called cross platform development. Given the dearth of useful books on the subject he ventured into the world of professional author in 1995 writing the first of the "Zinc It!" book series for John Gordon Burke Publisher, Inc.

A decade later he released a massive (nearly 800 pages) tome "The Minimum You Need to Know to Be an OpenVMS Application Developer" which tried to encapsulate the essential skills gained over what was nearly a 20 year career at that point. From there "The Minimum You Need to Know" book series was born.

Three years later he wrote his first novel "Infinite Exposure" which got much notice from people involved in the banking and financial security worlds. Some of the attacks predicted in that book have since come to pass. While it was not originally intended to be a trilogy, it became the first book of "The Earth That Was" trilogy:
Infinite Exposure
Lesedi - The Greatest Lie Ever Told
John Smith - Last Known Survivor of the Microsoft Wars

When he is not consulting Roland Hughes posts about technology and sometimes politics on his blog. He also has regularly scheduled Sunday posts appearing on the Interesting Authors blog.