-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spindown not working since update to Ubuntu 20.10 #28
Comments
Temperature query should not generate a block read. Are you sure nothing else is active on the drive? If you stop hddfancontrol and run for example: |
here some logging from my system. I am not entirely sure if maybe this is correct behaviour. I did not test this before updating ubuntu (and kernel). If I change the intervall of hddfancontrol to without hddfancontrol running:
with hddfancontrol running:
|
Another note:
|
What about: |
If you did not have hddfancontrol running while executing That something can either be:
|
In the comment above I entered the commands around every 5 seconds. That's why it looks like periodic. I can provide such a spike with every hddtemp or smartctl request. So my guess is not that something changed in smartctl or hddtemp, but in the way /sys/block/*/stat works. I will try to investigate this further. |
I am currently using https://github.com/docker-hotio/docker-hd-idle for spindown instead of hddfancontrol and it is working fine.
There were some changes in the block layer between kernel 5.4 to 5.8. but I currently cannot say if this could be a cause.
|
I have the same issue after upgrading my Arch some days ago. I am using LTS kernel and it got upgraded to |
Can confirm that calling |
Indeed my main NAS is also on Arch, and the 5.10 LTS kernel update broke the auto spin down. If anyone has an idea on how to probe for disk activity by evading the |
Well actually I have an idea that might work with little changes. |
@fightforlife @mindrunner EDIT: The command should be run when nothing is generating activity on the drive. |
|
I am currently testing a fix on the master branch, but it now seems to properly detect inactivity. |
Fix released in version 1.4.0. Inactive drives should be properly detected, unless smartctl is used for temperature probing (not the default) and SCT temp query is not supported. |
Does anyone know if this issue is handled upstream somewhere? I did not test the workaround, yet. Unfortunately, I monitor the system temps with smartctl which also prevents the drive spindown with more recent kernels. Downgraded to 5.4 for now :( |
@mindrunner
In those cases, probing generates a fixed and predictable (in my experience with an admittedly limited amount of drive models) number of read operations, so |
Thanks for the detailed information. On top of Before the kernel update, this was working fine in combination with |
Most likely, yes. |
:( I know, this is sort of off topic for |
It should be related to the block layer. You can try to contact the maintainers of that part of the kernel, and/or try to track the commit that caused this change. I personally don't have enough time to do this, but I'd be curious to learn the rationale for the change. |
I was browsing the kernel bugzilla yesterday, but could not find anything helpful. I guess I would need to bisect the kernel sources to figure out. |
Stat counters are per block device in the kernel, not per partition, and probing the partition device will probe the same device in effect, so I don't think that could allow you to work around this issue. |
That would be the way to go, if you can automate the test to check if a commit is affected or not. You are also more likely to get attention from a kernel developer if you have precise information about the commit that caused the regression. |
Looking at https://github.com/adelolmo, I cannot confirm your statement. The most recent version is able to detect my drives being idle on most recent kernel versions despite |
You are right and I was wrong, there are indeed per partition counters, and temperature probing affects only the device counters. However passing partitions can be confusing because it can lead to spinning down a drive that is currently active on another partition. |
@mindrunner Please test 9f4a051 |
I have never run this from sources and I do not see a |
The safest way to test without affecting the rest of your system would be:
Once you are done, you can remove |
Awesome, will give it a go. Probably worth adding that to the readme ;) |
confirming that:
indeed spins down the drives after 20 minutes, whereas
does not. So it definitely makes a difference and would solve the issue Also, seeing those warnings:
|
I could add that to the REAME... just as I could explain how to install Python, partition a hard drive or buy a computer. These instructions are nothing specific to this project. Anyway thanks for confirming the fix, I will make a new release soon. |
In many years I spend a lot of time in figuring out how to build and run projects I am supposed to work on w/o having the proper documentation. IMHO, documentation is same important as clean and readable code and having a how-to section for a newbie developer on how to get started is a very very nice thing to have, even if it is as straight forward as it is in this case. Just my 2 cents. Thanks for fixing. |
@mindrunner I agree with you doc is important that is why there is a section in the README on how to install from source. The snippet I gave you is how to install hddfancontrol as non root, alongside an existing installation. There is no way I can document every single possible installation use case, especially if this is nothing specific to this project, which by the way targets technical users. Technology works by stacking solutions and hiding complexity behind abstractions. This project relies on Python, Linux, x86, and probably thousands of stuff I don't even know of. It is not feasible to document everything. |
ha, I was pretty sure I checked and didn't see any instructions. Thus, my question about how to install from source... My bad! Sorry for the misunderstanding :) |
Hi desbma,
since I updated my host OS to Ubuntu 20.10 hddfancontrol is no longer spinning down my harddisks.
(Dockerfile: https://github.com/fightforlife/docker_hddfancontrol/blob/313b51ce636978750240eb0e002f43edf50d2c4b/Dockerfile)
The log does not show any errors.
Manual spindown with hdparm -y works just fine. And the drives stay spun down. (in host OS and inside docker)
Is there some way to get more output?
parameters
-d /dev/sdc /dev/sdd -p /sys/class/hwmon/hwmon2/pwm1 /sys/class/hwmon/hwmon2/pwm2 --pwm-start-value 70 80 --pwm-stop-value 20 30 --min-fan-speed-prct 0 -i 60 --spin-down-time 180 --smartctl -v debug
Debug Log:
The text was updated successfully, but these errors were encountered: