[opensuse] howto make usb drive stop
I have an USB drive (hard drive), but it is always spinning. Is it possible to make it stop when unused? thanks jdd -- http://www.dodin.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Saturday 2008-01-05 at 22:24 +0100, jdd wrote:
I have an USB drive (hard drive), but it is always spinning. Is it possible to make it stop when unused?
Ouch! That would be nice to have, but... we can't. The culprit this time is hardware: the usb boxes have a limited chipset that do not include the necessary functions for this to work. Ie, you can not order the hard-drive to spin down. See: nimrodel:~ # hdparm /dev/sda /dev/sda: HDIO_GET_32BIT failed: Invalid argument HDIO_GET_UNMASKINTR failed: Invalid argument HDIO_GET_DMA failed: Invalid argument HDIO_GET_KEEPSETTINGS failed: Invalid argument readonly = 0 (off) readahead = 256 (on) geometry = 7297/255/63, sectors = 117231408, start = 0 nimrodel:~ # hdparm -i /dev/sda /dev/sda: HDIO_GET_IDENTITY failed: Invalid argument nimrodel:~ # hdparm -y /dev/sda /dev/sda: issuing standby command HDIO_DRIVE_CMD(standby) failed: Invalid argument nimrodel:~ # hdparm -S 100 /dev/sda /dev/sda: setting standby to 100 (8 minutes + 20 seconds) HDIO_DRIVE_CMD(setidle1) failed: Invalid argument nimrodel:~ # smartctl -a /dev/sda smartctl version 5.37 [i686-suse-linux-gnu] Copyright (C) 2002-6 Bruce Allen Home page is http://smartmontools.sourceforge.net/ Device: ST360020 A Version: 0000 Serial number: E30XN9M7 Device type: disk Local Time is: Sat Jan 5 23:42:20 2008 CET Device does not support SMART Error Counter logging not supported Device does not support Self Test logging (That drive was previously an internal drive, and all those commands worked). The only idea I have is to connect it "inside", program the settings, and tell it to remember the settings (hdparm -K), but I don't know if they survive power-off, or only a reset. The real solution is somebody finding an usb box having a chipset wit complete feature set. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHgAjEtTMYHG2NR9URAoDLAJ9/l/BUqa2B7rrUxNvb4PN5RTNtkQCffpp2 vATkIPaIWJzfUTvCQesGDMA= =eQQy -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Carlos E. R. a écrit :
The real solution is somebody finding an usb box having a chipset wit complete feature set.
too bad :-( jdd -- http://www.dodin.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Content-ID: <alpine.LSU.1.00.0801061101441.18690@nimrodel.valinor> The Sunday 2008-01-06 at 08:20 +0100, jdd wrote:
Carlos E. R. a écrit :
The real solution is somebody finding an usb box having a chipset wit complete feature set.
too bad :-(
It is indeed. Another feature I sorely miss is that you can't run smart tests on them; we could use usb/esata combo boxes, and plug them into a machine with esata for testing. If you do have eSATA that's certainly much better than usb for this purpose of external drives. By the way, there is a box by seagate, I forgot the model (one of those multimedia boxes, I think), that does go to sleep after some time, and it also resets or un-power or whatever the usb connector. So far, so good. The snag is that when it awakes, if the host is linux, the bus awakes as version 1, ie, at 12 mbps. Windows is capable of awakening it to version 2, 480mbps. A link to this was posted a month ago, but I can't find the source. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHgKvRtTMYHG2NR9URAtCDAJ9Ce/c3VlANtH/f3xt3VXJqnG3tGgCfecw8 Eptkq0L+0/jXTm48n+ZwQP4= =7a6G -----END PGP SIGNATURE-----
jdd 05.01.2008 22:24:
I have an USB drive (hard drive), but it is always spinning. Is it possible to make it stop when unused?
thanks jdd
You can try sg_start -stop /dev/sdx This works at least for one of my usb-drives (teac i think) ....Volker -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Volker a écrit :
jdd 05.01.2008 22:24:
I have an USB drive (hard drive), but it is always spinning. Is it possible to make it stop when unused?
thanks jdd
You can try sg_start -stop /dev/sdx
This works at least for one of my usb-drives (teac i think)
....Volker
not for this one, alas sg_start -s -v /dev/sdb Start stop unit command: 1b 00 00 00 01 00 and nothing happen anyway it could be of good practice to send this command to any usb drive at shutdown. My problem is the following: Drives use hudge current intensity and are better connected on an powered USB hub. But when I shut down the computer the drive is still powered by the usb unit and spin all the night, and if I shutdown the power plug, I often forget to power it on when using my laptop and after 2 hours it stops working :-)). If I'm not there it shut down again that's a lap top problem, of course :-) jdd -- http://www.dodin.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2008-01-07 at 09:51 +0100, jdd wrote:
My problem is the following: Drives use hudge current intensity and are better connected on an powered USB hub.
But when I shut down the computer the drive is still powered by the usb unit and spin all the night, and if I shutdown the power plug, I often forget to power it on when using my laptop and after 2 hours it stops working :-)). If I'm not there it shut down again
that's a lap top problem, of course :-)
Rather a problem of badly designed usb hub. The hub should detect the pc bus is down (no power) and power down itself, too, or go to standby, remove the voltage from the usb line. The hack for you would be to use a main switch for all appliances, and switch it off, instead of swathing off the bus, the printer, the scanner, etc, etc. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHggZhtTMYHG2NR9URAsIuAKCV24Z2G3RPd+qmlNn1fv2wXCYl8wCfSg5M 16dtic8dQedu0FAmXdyxK2M= =4jLd -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Carlos E. R. a écrit :
Rather a problem of badly designed usb hub. The hub should detect the pc bus is down (no power) and power down itself, too, or go to standby, remove the voltage from the usb line.
there is absolutely no intelligence in an usb ub :-), and the power is so low (I think 1A / 5V) than even a mechanical switch is not possible
The hack for you would be to use a main switch for all appliances, and switch it off, instead of swathing off the bus, the printer, the scanner, etc, etc.
it's what I do, but even if I don't switch the appliance on the laptop runs and the ub also, but only for a short time :-) for the desktop computer I use a monitored appliance, but I don't know if this will work for a laptop (power used is much smaller) jdd -- http://www.dodin.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2008-01-07 at 12:52 +0100, jdd wrote:
Carlos E. R. a écrit :
Rather a problem of badly designed usb hub. The hub should detect the pc bus is down (no power) and power down itself, too, or go to standby, remove the voltage from the usb line.
there is absolutely no intelligence in an usb ub :-), and the power is so low (I think 1A / 5V) than even a mechanical switch is not possible
That's no excuse :-p , a transistor or two would do the trick.
The hack for you would be to use a main switch for all appliances, and switch it off, instead of swathing off the bus, the printer, the scanner, etc, etc.
it's what I do, but even if I don't switch the appliance on the laptop runs and the ub also, but only for a short time :-)
for the desktop computer I use a monitored appliance, but I don't know if this will work for a laptop (power used is much smaller)
It would be possible to design one. The device only needs to monitor the presence of power in the usb power line coming from the laptop, and 1mA would be enough to trigger the base of a transistor that would in turn power up the device. It could even be designed around an optocoupler/triac to power up the AC side of the device. You just pay an engineer, and he'll do appropriate wonders :-) - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHgkgAtTMYHG2NR9URAjMdAJ9ojLNGABbHpZ97MRBEMr3sJYqaMwCfQ9B4 JrmRlkNIurLDRB/BohvOpvk= =ZyJv -----END PGP SIGNATURE-----
On Mon, 07 Jan, 2008 at 16:40:48 +0100, Carlos E. R. wrote:
It would be possible to design one. The device only needs to monitor the presence of power in the usb power line coming from the laptop, and 1mA would be enough to trigger the base of a transistor that would in turn power up the device. It could even be designed around an optocoupler/triac to power up the AC side of the device.
You just pay an engineer, and he'll do appropriate wonders :-)
Too late, it's been done; http://www.elsparefonden.org/public-and-commerce/products/energy-saving-equi... Dunno if they exist outside of Denmark, but they should. I've had one for a couple of years now, works great :) /jon -- YMMV -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Jon Clausen a écrit :
Too late, it's been done;
http://www.elsparefonden.org/public-and-commerce/products/energy-saving-equi...
This can be found anywhere. I have one for my desktop, I just didn't have time to test it with the laptop, given I don't know if is works with such system ((I don't know how the charging device of the laptop works) jdd -- http://www.dodin.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2008-01-08 at 06:47 +0100, Jon Clausen wrote:
On Mon, 07 Jan, 2008 at 16:40:48 +0100, Carlos E. R. wrote:
It would be possible to design one. The device only needs to monitor the presence of power in the usb power line coming from the laptop, and 1mA would be enough to trigger the base of a transistor that would in turn power up the device. It could even be designed around an optocoupler/triac to power up the AC side of the device.
You just pay an engineer, and he'll do appropriate wonders :-)
Too late, it's been done;
http://www.elsparefonden.org/public-and-commerce/products/energy-saving-equi...
Better: <http://www.elsparefonden.org/public-and-commerce/products/energy-saving-equipment/Elspareskinne/facts-and-figures/how-the-elspareskinne-works> But that doesn't say how this particular piece works. Typically it would use a relays to switch off the rest of the equipment, but a relays draws significant power from the usb bus of a portable running on battery. What I described were methods to do the same as already known to exist, but designed for laptops. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHg2DftTMYHG2NR9URAiPyAJ9vtoznjMkOmuVb1QOvQk2nMT5g8gCbB+Sh kXrIw5W1E/kCbjNzVHp2FpQ= =8AfJ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, 08 Jan, 2008 at 12:39:09 +0100, Carlos E. R. wrote:
The Tuesday 2008-01-08 at 06:47 +0100, Jon Clausen wrote:
On Mon, 07 Jan, 2008 at 16:40:48 +0100, Carlos E. R. wrote:
It would be possible to design one. The device only needs to monitor the presence of power in the usb power line coming from the laptop, and 1mA would be enough to trigger the base of a transistor that would in turn power up the device. It could even be designed around an optocoupler/triac to power up the AC side of the device.
You just pay an engineer, and he'll do appropriate wonders :-)
Too late, it's been done;
http://www.elsparefonden.org/public-and-commerce/products/energy-saving-equi...
Better:
But that doesn't say how this particular piece works. Typically it would use a relays to switch off the rest of the equipment, but a relays draws significant power from the usb bus of a portable running on battery. What I described were methods to do the same as already known to exist, but designed for laptops.
riiiight... I didn't realize what you meant. Elsparefonden is not a vendor of anything, it's a trust that does research on, and gives advice about reducing powerconsumption in general. Hence the above doesn't pertain to any *particular* device. I guess that most of those thingies basically just use the power from the USB to hold open (or closed) a relay, which turns on the mains. And that power would come from the battery of a laptop. http://www.elsparefonden.org/public-and-commerce/products/energy-saving-equi... suggests that the whole concept may become obsolete, if Wake-On-USB ends up being the norm... But I agree that a version designed for laptops would be good. /jon -- YMMV -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2008-01-08 at 17:57 +0100, Jon Clausen wrote:
But that doesn't say how this particular piece works. Typically it would use a relays to switch off the rest of the equipment, but a relays draws significant power from the usb bus of a portable running on battery. What I described were methods to do the same as already known to exist, but designed for laptops.
riiiight... I didn't realize what you meant.
Elsparefonden is not a vendor of anything, it's a trust that does research on, and gives advice about reducing powerconsumption in general. Hence the above doesn't pertain to any *particular* device.
Ah... I see. That wasn't clear to me, but I guessed so. Nice.
I guess that most of those thingies basically just use the power from the USB to hold open (or closed) a relay, which turns on the mains. And that power would come from the battery of a laptop.
Exactly.
http://www.elsparefonden.org/public-and-commerce/products/energy-saving-equi...
suggests that the whole concept may become obsolete, if Wake-On-USB ends up being the norm...
I didn't know that. I'll have that in mind next time I shop around for a board. Actually, if I needed such a thing for my desktop, I would simply get a line from the 12 volts supply inside the box, and use it for a relays. And an intelligent vendor would simply reinstate the output AC plug that the original PC had, which was used to connect the monitor to, contrary to the direct connection to the wall used nowdays. That plug could be used to power everything the PC needs, instead of having to reinvent the wheel to circumvent a lack of thought (or too much appetite for saving money) from the manufacturer.
But I agree that a version designed for laptops would be good.
The snag is that they would need some power from the ac line instead, full time, and some electronics. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHg9HbtTMYHG2NR9URAokeAKCJ4qwODep43MwRbei8FHmLXwF44gCghury PuZ6B1va1+zI066ZOa57Sxg= =GF9k -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (4)
-
Carlos E. R.
-
jdd
-
Jon Clausen
-
Volker