sata_mars : Investigation to get hd-idle to work in all hard disks
4 participantes
Página 1 de 2.
Página 1 de 2. • 1, 2
Re: sata_mars : Investigation to get hd-idle to work in all hard disks
Great. So we have already all the needed info to prepare a general purpose service script for hd-idle. I'll make a proposal tomorrow (unless you're faster, as usual ;)Keltek escribió:I connect the 500GB disc to front USB and the timeout parameter is atIt can be found using this pattern:
- Código:
/sys/devices/platform/ehci_hcd/usb1/1-2/1-2:1.0/host2/target2:0:0/2:0:0:0/timeout
So if I get this entry, it means this is the block device attached to USB (it can be flash disk or physical HDD) and on the same path (dirname <file>) is the timeout. And so this should set the timeouts for all USB connected to system
- Código:
/sys/devices/platform/ehci_hcd/usb?/*/*/host?/*/*/block
- Código:
USBBLOCKS=`ls /sys/devices/platform/ehci_hcd/usb?/*/*/host?/*/*/block`
for file in $USBBLOCKS; do
USBTIMEOUT=`/usr/bin/dirname $file`/timeout
echo 20 > "$USBTIMEOUT"
done
Best,
evr- Mensajes : 279
Fecha de inscripción : 12/10/2010
Re: sata_mars : Investigation to get hd-idle to work in all hard disks
I started to read the source code of sata_mars, looking for some timeout definitions. This is how I found some hooks under /sys/devices/SATA_DEV/. Then I was curiuous and continued searching under SATA_DEV/ and finally hit host?/target*/*/timeout ;)Keltek escribió:I don't know the SATA driver coding for Linux (I don't know any coding of drivers for Linux), but this is definitely in sata_mars, which use libata and scsi backend. But this seems all what I can say ;)Hey all, are there someone who is Linux kernel guru? Please?
But I found no code in sata_mars.[ch] related with the timeout hook or any other hooks which are under host?/target*/*/ ...
Nevertheless, I think the problem is solved, so this is just trying to understad the details...
Best,
evr- Mensajes : 279
Fecha de inscripción : 12/10/2010
Re: sata_mars : Investigation to get hd-idle to work in all hard disks
It can (and should) be using the libata interface in kernel. The driver itself is really simple (just access the hardware registers and all the work do libata, which is I think the main purpose for libata) and the rest of background is in the other resources. That's why I ask for Linux kernel guru
Re: sata_mars : Investigation to get hd-idle to work in all hard disks
I think a more direct, simple and safe way is:Keltek escribió:I connect the 500GB disc to front USB and the timeout parameter is at[...] And so this should set the timeouts for all USB connected to system
- Código:
/sys/devices/platform/ehci_hcd/usb1/1-2/1-2:1.0/host2/target2:0:0/2:0:0:0/timeout
- Código:
USBBLOCKS=`ls /sys/devices/platform/ehci_hcd/usb?/*/*/host?/*/*/block`
for file in $USBBLOCKS; do
USBTIMEOUT=`/usr/bin/dirname $file`/timeout
echo 20 > "$USBTIMEOUT"
done
- Código:
D=/sys/devices/platform/ehci_hcd
USBTIMEOUTS=`ls $D/usb?/?-?/?-?:*/host?/target?:*/?:*/timeout 2>/dev/null`
for T in $USBTIMEOUTS ; do echo 20 > $T ; done
One problem (both with this and with the way you had proposed), however, is that this does not work if the USB disk is plugged after the hd-idle service script has been executed. So, ideally, I think the USB timeout setting should be set by means of hotpulg...
More ideas?
Best,
evr- Mensajes : 279
Fecha de inscripción : 12/10/2010
Re: sata_mars : Investigation to get hd-idle to work in all hard disks
I already had a look at libata.[ch], but I did not find anything clearly related with the hooks under: /sys/devices/SATA_DEV/host0/target0:0:0/0:0:0:0/ ...Keltek escribió:It can (and should) be using the libata interface in kernel. The driver itself is really simple (just access the hardware registers and all the work do libata, which is I think the main purpose for libata) and the rest of background is in the other resources. That's why I ask for Linux kernel guru :)
Best,
evr- Mensajes : 279
Fecha de inscripción : 12/10/2010
Re: sata_mars : Investigation to get hd-idle to work in all hard disks
Keltek escribió:It works now
I have to set the timeout to 20. I listen spinup the HDD and yes, it takes veeeeeeery long time. (with timeout 10 it not works )
Hello Keltek
What kind of hard disk you have... does it have a handle to manually start just kidding.
Guys, you really doing a great job.
So far so good, I mean I have hd-idle activated from always , and it is fine;
I just had a couple of OFF blocking when swithching off, but that is a pending issue, which might be or not be related...
So we are in good directions. thanks for your great work.
vic1972- Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga
Re: sata_mars : Investigation to get hd-idle to work in all hard disks
I have installed this IBM unit
Only the label is wrong - it should be 1.5TB
Ok, it is WESTERN DIGITAL Caviar AV Green Power 1500GB 32MB cache (WD15EVDS)
The best way to found a parameter in kernel, which is like a "default value" for all drives which appears in system in future. And activate it on boot, not in hdidle script.
Only the label is wrong - it should be 1.5TB
Ok, it is WESTERN DIGITAL Caviar AV Green Power 1500GB 32MB cache (WD15EVDS)
The best way to found a parameter in kernel, which is like a "default value" for all drives which appears in system in future. And activate it on boot, not in hdidle script.
Re: sata_mars : Investigation to get hd-idle to work in all hard disks
Yea! Nice sample of early Winchester technology!!! I had never seen one with so much capacity; ... it must be very recent ;)) the bigest one I've ever seen did have 256MB!!Keltek escribió:I have installed this IBM unit[...]Only the label is wrong - it should be 1.5TB ;)
I'm thinking in buying one of these Greens (threre are up to 3GB, 167 Euros, but I'll be content with just 1GB, 50 Euros).Ok, it is WESTERN DIGITAL Caviar AV Green Power 1500GB 32MB cache (WD15EVDS) :)
Yes, that would be ideal, but soo far I have not found how to do it ...The best way to found a parameter in kernel, which is like a "default value" for all drives which appears in system in future. And activate it on boot, not in hdidle script.
Best,
evr- Mensajes : 279
Fecha de inscripción : 12/10/2010
Re: sata_mars : Investigation to get hd-idle to work in all hard disks
Even simpler:evr escribió:I think a more direct, simple and safe way is: [...] This also takes into account the case that no timeout hooks ar found.
- Código:
USBTIMEOUTS=`ls /sys/block/sd?/device/timeout`
for T in $USBTIMEOUTS ; do echo 30 > $T ; done
[...] this does not work if the USB disk is plugged after the hd-idle service script has been executed. So, ideally, I think the USB timeout setting should be set by means of hotpulg...
The best way to found a parameter in kernel, which is like a "default value" for all drives which appears in system in future. And activate it on boot, not in hdidle script.
If we do not find a solution for this, another option is to include in into the hd-idle code: As soon as it detects a new disc to monitor, check its timer and ajust it if needed. I think I can do it easyly.Yes, that would be ideal, but soo far I have not found how to do it ...
Best,
evr- Mensajes : 279
Fecha de inscripción : 12/10/2010
Re: sata_mars : Investigation to get hd-idle to work in all hard disks
Do this code for both SATA and USB discs?evr escribió:Even simpler:
- Código:
USBTIMEOUTS=`ls /sys/block/sd?/device/timeout`
for T in $USBTIMEOUTS ; do echo 30 > $T ; done
Ok, I vote for 30.evr escribió:BTW, I've just seen in a few linux systems and all have these timeouts set to 30 or larger!
Agree, it is a clean solution and the number of seconds can be passed to hdidle and the hdidle can set it automatically for all (existing and for future connected) discs.evr escribió:If we do not find a solution for this, another option is to include in into the hd-idle code: As soon as it detects a new disc to monitor, check its timer and ajust it if needed. I think I can do it easyly.
Re: sata_mars : Investigation to get hd-idle to work in all hard disks
evr escribió:Even simpler:
- Código:
USBTIMEOUTS=`ls /sys/block/sd?/device/timeout`
for T in $USBTIMEOUTS ; do echo 30 > $T ; done
Yes. I forgot to mention...Keltek escribió:Do this code for both SATA and USB discs?
evr escribió:BTW, I've just seen in a few linux systems and all have these timeouts set to 30 or larger!
O.K.Keltek escribió:Ok, I vote for 30.
evr escribió:If we do not find a solution for this, another option is to include in into the hd-idle code: As soon as it detects a new disc to monitor, check its timer and ajust it if needed. I think I can do it easyly.
O.K. I'll see it along this week. Meanwhile, I think we can already post in SF a patch to enable hd-idle (fixed disks) as a normal service.Keltek escribió:Agree, it is a clean solution and the number of seconds can be passed to hdidle and the hdidle can set it automatically for all (existing and for future connected) discs.
Best,
evr- Mensajes : 279
Fecha de inscripción : 12/10/2010
Re: sata_mars : Investigation to get hd-idle to work in all hard disks
Acknowledge
Victor, did you plan to make some changes in PM?
I should release a fix for LGMenu (as I mentioned some time before about wrong recording directories for external storage), new PM (only binary of course) and this fix for hdidle with timeout set to 30, fully controlled service enabled at startup.
Victor, did you plan to make some changes in PM?
I should release a fix for LGMenu (as I mentioned some time before about wrong recording directories for external storage), new PM (only binary of course) and this fix for hdidle with timeout set to 30, fully controlled service enabled at startup.
Re: sata_mars : Investigation to get hd-idle to work in all hard disks
evr escribió:[...]another option is to include in into the hd-idle code: As soon as it detects a new disc to monitor, check its timer and ajust it if needed. I think I can do it easyly.
Keltek escribió:Agree, it is a clean solution and the number of seconds can be passed to hdidle and the hdidle can set it automatically for all (existing and for future connected) discs.
Done! Please find it at SF:evr escribió:O.K. I'll see it along this week. [...]
http://sourceforge.net/projects/lgmenu/files/Services/hd-idle-1.03a.tgz/download
Best,
evr- Mensajes : 279
Fecha de inscripción : 12/10/2010
Re: sata_mars : Investigation to get hd-idle to work in all hard disks
Well, not anly for fixed disks, but all disks (internal, cradle and USB) -- looks like it works well in all the cases (so far ;).evr escribió:[...] Meanwhile, I think we can already post in SF a patch to enable hd-idle (fixed disks) as a normal service.
Best,
evr- Mensajes : 279
Fecha de inscripción : 12/10/2010
Re: sata_mars : Investigation to get hd-idle to work in all hard disks
Keltek escribió:Acknowledge
Victor, did you plan to make some changes in PM?
I should release a fix for LGMenu (as I mentioned some time before about wrong recording directories for external storage), new PM (only binary of course) and this fix for hdidle with timeout set to 30, fully controlled service enabled at startup.
No, no modification to PM.
I am fine with actual release. thanks.
vic1972- Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga
Re: sata_mars : Investigation to get hd-idle to work in all hard disks
Some positive reaction today I have sleeping HDD for about 21h and after that the wakeup was without any problems.
Just one notice - I check here in my work some Linux boxes with RHEL 5.4 installed and all devices have 60s timout so I change my mind and set default timeout to 60.
Just one notice - I check here in my work some Linux boxes with RHEL 5.4 installed and all devices have 60s timout so I change my mind and set default timeout to 60.
Re: sata_mars : Investigation to get hd-idle to work in all hard disks
Glad to hear about it ;) Did you notice a difference in the temperature of the LG (before awakening the disk) with respect to previous extended use periods with the disk running?Keltek escribió:Some positive reaction today :) I have sleeping HDD for about 21h and after that the wakeup was without any problems.
I think it is exagerated, bu anyway I don't think it may harm, so let's set it to 60 (in any cae, it is easy to change).Just one notice - I check here in my work some Linux boxes with RHEL 5.4 installed and all devices have 60s timout so I change my mind and set default timeout to 60.
Best,
evr- Mensajes : 279
Fecha de inscripción : 12/10/2010
Re: sata_mars : Investigation to get hd-idle to work in all hard disks
I forgot to test one very important function - start recording while disk is sleeping. So stay tuned to this test...
Re: sata_mars : Investigation to get hd-idle to work in all hard disks
Working fine!
I am happy with this service.
thanks.
I am happy with this service.
thanks.
vic1972- Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga
Re: sata_mars : Investigation to get hd-idle to work in all hard disks
Hope the test has gone well (it should ;)Keltek escribió:I forgot to test one very important function - start recording while disk is sleeping. So stay tuned to this test...
Glad to hear.vic1972 escribió:Working fine! I am happy with this service.
Have any of you already tried the new hd-idle binary which sets by itslef the timeout of every new disk detected (i.e., this one)?
Best,
evr- Mensajes : 279
Fecha de inscripción : 12/10/2010
LG450H consumtion with disks spun-up and -down
Hi,
I have been measuring the power consumption of my MS450H under various working conditions, including disks spun-up and -down. See:
https://ms450.forosactivos.net/t705-ms450h-power-consumtion#6376
Taking into account only the standard 250GB internal disk, the consumption goes from 16-18 watts with the disk spun-up to 13-15 with the disk spun-down.
Best,
I have been measuring the power consumption of my MS450H under various working conditions, including disks spun-up and -down. See:
https://ms450.forosactivos.net/t705-ms450h-power-consumtion#6376
Taking into account only the standard 250GB internal disk, the consumption goes from 16-18 watts with the disk spun-up to 13-15 with the disk spun-down.
Best,
Última edición por evr el Lun Abr 11, 2011 12:55 am, editado 2 veces (Razón : typo)
evr- Mensajes : 279
Fecha de inscripción : 12/10/2010
Re: sata_mars : Investigation to get hd-idle to work in all hard disks
Hello,
I would like to retake this nice thread.
To check if we can make hd-idle work for all or most of the hd devices.
I have check that some of the paths explained at the begining of this thread,
containing filename : timeout,
now they are not there.
I think i will have to re-read the thread.
regards
I would like to retake this nice thread.
To check if we can make hd-idle work for all or most of the hd devices.
I have check that some of the paths explained at the begining of this thread,
containing filename : timeout,
now they are not there.
I think i will have to re-read the thread.
regards
vic1972- Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga
Re: sata_mars : Investigation to get hd-idle to work in all hard disks
Hi Vic,vic1972 escribió:Hello,
I would like to retake this nice thread. To check if we can make hd-idle work for all or most of the hd devices.
I have check that some of the paths explained at the begining of this thread, containing filename : timeout, now they are not there. I think i will have to re-read the thread.
I do not really understand what do you mean. What are no longer there? messages of this thread? or files under /sys ?
Best,
evr- Mensajes : 279
Fecha de inscripción : 12/10/2010
Re: sata_mars : Investigation to get hd-idle to work in all hard disks
I meant files . I willl. Check later again
vic1972- Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga
Página 1 de 2. • 1, 2
Página 1 de 2.
Permisos de este foro:
No puedes responder a temas en este foro.