Click here to Skip to main content
13,000,636 members (40,293 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


Posted 25 Jul 2014

Manjaro Linux on a Western Digital USB Harddrive with Sleep Disorder ;)

, 25 Jul 2014
Rate this:
Please Sign up or sign in to vote.
Manjaro Linux on a Western digital USB harddrive with sleep disorder

This is a problem that had me baffled for a long time. I had, a very long back, during the very initial days of Manjaro Linux, installed it on my Western Digital(WD) My Passport HD. WD My Passport is a 160GB yellow colored cute little thing. Everything worked great. Manjaro is undoubtedly one of the best distros out there. After a few minutes of inactivity, the hard drive would go to sleep and the XFCE desktop environment would stop obeying my commands as if it had suddenly been gripped by dementia. Icons would vanish. The few that would remain would throw weird error messages. Rebooting was the only option. But I had no trust in such a system. I tried Fedora, openSUSE and some other distros too. Heck, I even tried FreeBSD. The results were no different.

I searched all the forums I could but did not receive an answer that could satisfy me. I downloaded the gnome-disk-utility and looked at the drive settings. I tried playing with all settings without any success.

Then, I experienced an epiphany. I thought why would a drive go to sleep if there is constant activity? So an infinite loop with a periodic disk write activity would suffice to keep the drive awake for as long as I please!

Here is the script:

while true
echo -e "\e[31m---prevent hdd from sleeping script running...\e[0m"
echo "do not let him sleep" >> /home/msiyer/Documents/KeepTheBloodyHDDAwake.log
echo -e "---wrote into the \e[31m/home/msiyer/Documents/KeepTheBloodyHDDAwake.log\e[0m file"
echo "---now sleeping for 30 seconds..."
sleep 30


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer HCL Technologies
India India
My name is M Sreekant. We South Indians have long names. My name, when completely expanded, is Mohan Sreekant Iyer. I like to be called "msiyer" due to economical considerations. You know what I mean Wink | ;)

I am a robot, a DNA replicator, made of chemical compounds. I try very hard to override nature's programming. A robot that knows, is a robot that seeks to know more.

I believe, any system or structure can be dissected by he who is curious enough. One day mankind will find loopholes in the laws of Physics that govern the cosmos, probably with my help. That will be the greatest day in my life or afterlife.

You may also be interested in...

Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170624.1 | Last Updated 25 Jul 2014
Article Copyright 2014 by msiyer
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid