PDA

View Full Version : Prevent USB drives from sleeping (until other storage issues are improved)



flamepanther
06-23-2014, 05:18 AM
Anyone who has a lot of games on USB storage probably knows OUYA isn't very good yet at dealing with disconnecting and reconnecting storage devices. It can take several minutes for the system to re-scan the drive for games, and even once it's done, the games don't necessarily show back up in Discover. And if they do show up in Discover, they still may not launch until the console is restarted. I suspect that this is due to issues inherent in Android and will take a lot of time and custom code to fix. As far as I'm concerned, that's fine.

However, there is a separate issue that exacerbates this, and which I only encountered after migrating from external flash storage to an external hard drive. If the console goes to sleep long enough, so does the disk. One the disk goes to sleep, my games don't work until I restart the console and wait about 10 minutes for it to scan for all the games. Not fun when I get the itch to play some games, only to discover that this has happened.

So... until the larger issue of quickly (and successfully!) reloading the games is resolved, I suggest the OS be updated to keep external storage awake (perhaps optionally), even when the console is in sleep mode.

Schizophretard
06-23-2014, 10:15 AM
I wish it only took me 10 minutes. It is about a half hour for me. Anyway, I like the optional idea.

LightyKD
06-23-2014, 05:17 PM
Additionally, everyone should make sure to have their hard drives plugged into a POWERED USB hub that's plugged into the OUYA. Trust me, it makes things a bit easier.

Aurélien Dispenza
08-02-2014, 01:34 PM
On my Hdd My book, I can settings the time before sleep with the WD app on Windows, after that, the hdd save the settings...

Sorry for my bad english

Envoyé de mon ZP990 en utilisant Tapatalk

flamepanther
08-02-2014, 09:16 PM
On my Hdd My book, I can settings the time before sleep with the WD app on Windows, after that, the hdd save the settings...

Sorry for my bad english

Envoyé de mon ZP990 en utilisant TapatalkThanks. Yes, this is a good tip for people who have Windows and a drive that supports this feature. I still believe OUYA should include an option on their side for everyone else. :)

After some time, I've noticed that I only run into this issue when I place my OUYA in sleep mode for an extended time. If I leave my OUYA awake, my drive doesn't disconnect, even after days at a time.

Eldon.McGuinness
08-02-2014, 10:31 PM
An alternative solution to this could be achieved by installing Crond on the OUYA and setting it to run a script, like below, to keep the drive spun up.


#!/bin/sh
# spinup.sh script

if [ -d "/mnt/usbdrive/" ]; then
touch /mnt/usbdrive/.spinup
fi


Then just call the script every 10 minutes in crond

*/10 * * * * /mnt/sdcard/spinup.sh


Note: depending on the tuning of your HDD you might need to call the script more than once every 10 minutes or might be able to push it out past 10 minutes. I would suggest you experiment by starting at once a minute and then increasing it by a minute each time to see how far you can push it.


*/1 * * * * /mnt/sdcard/spinup.sh
*/2 * * * * /mnt/sdcard/spinup.sh
*/3 * * * * /mnt/sdcard/spinup.sh
*/n * * * * /mnt/sdcard/spinup.sh (Where n is the number of minutes between calls)