running hddtemp causes unnecessary disk activity

Bug #160621 reported by ubuntu_demon on 2007-11-06
60
This bug affects 7 people
Affects Status Importance Assigned to Milestone
hddtemp (Ubuntu)
Undecided
Unassigned
sensors-applet (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: hddtemp

running httdtemp normally or as a daemon causes unnecessary disk activity. It is important for laptop users to reduce unnecessary disk-activity because the harddrive head might be parked or the drive might be spun down.

IMHO hddtemp should not need to access the harddisk after starting up unless configured for logging.

I'm seeing things like this when using btrace :

  8,0 0 17274 253.028000000 6613 G R 0 + 0 [hddtemp]
  8,0 0 17275 253.028000000 6613 P R [hddtemp]
  8,0 0 17276 253.028000000 6613 I R 0 (85 06 20 00 d8 00 00 00 00 00 4f 00 c2 00 b0 00 ..) [hddtemp]
  8,0 0 17277 253.028000000 6613 D R 0 (85 06 20 00 d8 00 00 00 00 00 4f 00 c2 00 b0 00 ..) [hddtemp]
  8,0 0 17278 253.136000000 5915 C R (85 06 20 00 d8 00 00 00 00 00 4f 00 c2 00 b0 00 ..) [2]
  8,0 0 17279 253.136000000 6613 G R 0 + 0 [hddtemp]
  8,0 0 17280 253.136000000 6613 P R [hddtemp]
  8,0 0 17281 253.136000000 6613 I R 512 (85 08 2e 00 d0 00 01 00 00 00 4f 00 c2 00 b0 00 ..) [hddtemp]
  8,0 0 17282 253.136000000 6613 D R 512 (85 08 2e 00 d0 00 01 00 00 00 4f 00 c2 00 b0 00 ..) [hddtemp]
  8,0 0 17283 253.144000000 0 C R (85 08 2e 00 d0 00 01 00 00 00 4f 00 c2 00 b0 00 ..) [2]

Steps to reproduce :
btrace howto:
http://ubuntuforums.org/showpost.php?p=3722850&postcount=374

This might be one of the contributors to the famous Load_Cycle_Count bug :
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/17216
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/59695

Architecture: amd64
DistroRelease: Ubuntu 10.10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
NonfreeKernelModules: fglrx
Package: hddtemp 0.3-beta15-46
PackageArchitecture: amd64
ProcEnviron:
 PATH=(custom, user)
 LANG=sv_SE.utf8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.35-28.49-generic 2.6.35.11
Tags: maverick
Uname: Linux 2.6.35-28-generic x86_64
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

ubuntu_demon (ubuntu-demon) wrote :
Download full text (5.5 KiB)

a bigger btrace :

]
  8,0 0 76 165.664000000 0 C R 404767094 + 256 [0]
  8,0 0 77 184.528000000 5660 G R 0 + 0 [hddtemp]
  8,0 0 78 184.528000000 5660 P R [hddtemp]
  8,0 0 79 184.528000000 5660 I R 0 (85 06 20 00 d8 00 00 00 00 00 4f 00 c2 00 b0 00 ..) [hddtemp]
  8,0 0 80 184.528000000 5660 D R 0 (85 06 20 00 d8 00 00 00 00 00 4f 00 c2 00 b0 00 ..) [hddtemp]
  8,0 0 81 184.648000000 0 C R (85 06 20 00 d8 00 00 00 00 00 4f 00 c2 00 b0 00 ..) [2]
  8,0 0 82 184.648000000 5660 G R 0 + 0 [hddtemp]
  8,0 0 83 184.648000000 5660 P R [hddtemp]
  8,0 0 84 184.648000000 5660 I R 512 (85 08 2e 00 d0 00 01 00 00 00 4f 00 c2 00 b0 00 ..) [hddtemp]
  8,0 0 85 184.648000000 5660 D R 512 (85 08 2e 00 d0 00 01 00 00 00 4f 00 c2 00 b0 00 ..) [hddtemp]
  8,0 0 86 184.656000000 0 C R (85 08 2e 00 d0 00 01 00 00 00 4f 00 c2 00 b0 00 ..) [2]
  8,0 0 87 246.028000000 5660 G R 0 + 0 [hddtemp]
  8,0 0 88 246.028000000 5660 P R [hddtemp]
  8,0 0 89 246.028000000 5660 I R 0 (85 06 20 00 d8 00 00 00 00 00 4f 00 c2 00 b0 00 ..) [hddtemp]
  8,0 0 90 246.028000000 5660 D R 0 (85 06 20 00 d8 00 00 00 00 00 4f 00 c2 00 b0 00 ..) [hddtemp]
  8,0 0 91 246.132000000 0 C R (85 06 20 00 d8 00 00 00 00 00 4f 00 c2 00 b0 00 ..) [2]
  8,0 0 92 246.132000000 5660 G R 0 + 0 [hddtemp]
  8,0 0 93 246.132000000 5660 P R [hddtemp]
  8,0 0 94 246.132000000 5660 I R 512 (85 08 2e 00 d0 00 01 00 00 00 4f 00 c2 00 b0 00 ..) [hddtemp]
  8,0 0 95 246.132000000 5660 D R 512 (85 08 2e 00 d0 00 01 00 00 00 4f 00 c2 00 b0 00 ..) [hddtemp]
  8,0 0 96 246.136000000 0 C R (85 08 2e 00 d0 00 01 00 00 00 4f 00 c2 00 b0 00 ..) [2]
  8,0 0 97 307.528000000 5660 G R 0 + 0 [hddtemp]
  8,0 0 98 307.528000000 5660 P R [hddtemp]
  8,0 0 99 307.528000000 5660 I R 0 (85 06 20 00 d8 00 00 00 00 00 4f 00 c2 00 b0 00 ..) [hddtemp]
  8,0 0 100 307.528000000 5660 D R 0 (85 06 20 00 d8 00 00 00 00 00 4f 00 c2 00 b0 00 ..) [hddtemp]
  8,0 0 101 307.636000000 0 C R (85 06 20 00 d8 00 00 00 00 00 4f 00 c2 00 b0 00 ..) [2]
  8,0 0 102 307.636000000 5660 G R 0 + 0 [hddtemp]
  8,0 0 103 307.636000000 5660 P R [hddtemp]
  8,0 0 104 307.636000000 5660 I R 512 (85 08 2e 00 d0 00 01 00 00 00 4f 00 c2 00 b0 00 ..) [hddtemp]
  8,0 0 105 307.636000000 5660 D R 512 (85 08 2e 00 d0 00 01 00 00 00 4f 00 c2 00 b0 00 ..) [hddtemp]
  8,0 0 106 307.640000000 0 C R (85 08 2e 00 d0 00 01 00 00 00 4f 00 c2 00 b0 00 ..) [2]
  8,0 0 107 369.032000000 5660 G R 0 + 0 [hddtemp]
  8,0 0 108 369.032000000 5660 P R [hddtemp]
  8,0 0 109 369.032000000 5660 I R 0 (85 06 20 00 d8 00 00 00 00 00 4f 00 c2 00 b0 00 ..) [hddtemp]
  8,0 0 110 369.032000000 5660 D R 0 (85 06 20 00 d8 00 00 00 00 00 4f 00 c2 00 b0 00 ..) [hddtemp...

Read more...

description: updated
description: updated
description: updated

I can confirm this. I nearly went out of my mind trying to figure out why my unmounted ide disk kept waking up after hdparm -y (Bug #180986) until i finally found this. It appears to poll anywhere between 2 seconds and one minute.

Greg Michalec (greg-primate) wrote :

confirmng

Changed in hddtemp:
status: New → Confirmed
Luca Giovenzana (lucagiove) wrote :

I confirm this bug for SATA2 disk!
My hddtemp version is 0.3-beta15.
I've tried with two pcs, one with Debian Etch and a IDE disk, when a drive is sleeping if I try to get the temperature hddtemp returns correctly: "/dev/hda: ST3500630A: drive is sleeping".
The other pc has Ubuntu Hardy and a SATAII disk, I've killed the hddtemp daemon and when the drive is sleeping if I try to get the temperature the disk poweron..
here the log:
root@sed:/etc/init.d# hdparm -C /dev/sdb
/dev/sdb: drive state is: standby
root@sed:/etc/init.d# hddtemp /dev/sdb
/dev/sdb: ST3250620NS: 45°C
root@sed:/etc/init.d# hdparm -C /dev/sdb
/dev/sdb: drive state is: active/idle

description: updated
Tim Besard (maleadt) wrote :

Confirmed for a SATA disk... And as posted before, polling the temperature using hdparm does not wake up the disk.

Ahmet (portakalio) wrote :

I'm running hddtemp version 0.3-beta15-44 on a Debian 4.0r3
I have a Samsung 1TB SATA2 32mb cache harddrive. The problem i'm stumbling upon is that even if the drive is active or sleeping, i always get this ;

$ hddtemp /dev/sda
/dev/sda: SAMSUNG HD103UJ: drive is sleeping

Maybe it's related to this bug ?

aldebx (aldebx) wrote :

0.3-beta15-43
Superseded in intrepid-release on 2008-05-11

hddtemp (0.3-beta15-43) unstable; urgency=low

  * Don't wake up SATA drives if not asked (closes: #479840).

 -- Ubuntu Archive Auto-Sync <email address hidden> Sun, 11 May 2008 15:33:02 +0100

aldebx (aldebx) wrote :

fix released upstream (see previous post)

Changed in hddtemp:
status: Confirmed → Fix Released
m4cph1sto (dlreid) wrote :

This bug has reappeared, when GNOME Sensors Applet (sensors-applet) is monitoring hddtemp, which I think is the default when sensors-applet is added to a GNOME panel. This is on a laptop with laptop-mode enabled, and occurs when on battery. It prevents the disk from spinning down, or causes it to spin back up immediately afterward.

To reproduce, in Intrepid:

-Add GNOME Sensors Applet to the gnome panel.
-While on battery power, run blktrace and see hddtemp causing disk activity several times per minute.

To fix:
-Under "Sensors Applet Preferences", disable hddtemp monitoring.

fabtagon (fabtagon) wrote :

This bug reappears in Ubuntu 9.10.

I have a IDE disk used solely for backups. After umounting and hdparm -y it spins up again within a minute if hddtemp deamon is running.

Changed in hddtemp (Ubuntu):
status: Fix Released → New
Robert North (russetrob) wrote :

Also seeing through sensors-applet in Ubuntu 10.04.
With no disks in sensors-applet monitoring, works.
When disks present, spins up within minutes.

Andrzej Kłapeć (solidslash) wrote :

Same thing on Ubuntu 10.10 alpha 2. I can clearly see how sensors-applet with hddtemp enabled makes load_cycle_count go up pretty quick. It's quite dangerous.

fabtagon/Robert North/SolidSlash:

What version of sensors-applet are you using?

Changed in sensors-applet (Ubuntu):
status: New → Incomplete
fabtagon (fabtagon) wrote :

*When*I*posted* the report (6 month ago), I used Ubuntu 9.10 (packages always updated to current versions). In the meantime I've upgraded to Ubuntu 10.04. So the statements regarding 9.10 might be wrong (even though I don't think so).

== Common behaviour with both Ubuntu 9.10 and 10.04 ==
I do manually send my big storage disk to standby when I don't need it. I use "hdparm -y /dev/...", which causes the disk to spin down.

# hddtemp /dev/... => gives temperature when disk is *active*.
Starting hddtemp daemon spins up any standby disk (disk is than active) around once a minute.
The sensors applet simply does not show any entries for the disks if the daemon is not running (and thus standby disks keep standing by).

== Situation with Ubuntu 9.10 ==

# hddtemp /dev/... => spins up standby disk and gives temperature

== Situation with Ubuntu 10.04 ==

# hddtemp /dev/... => says 'disk is sleeping' when standby, but NO temperature.

Version information for 10.04:
Linux Kernel 2.6.32-24-generic #42-Ubuntu SMP
Gnome Sensors Applet 2.2.3
hddtemp 0.3-beta15-45
(all up-to-date)

== Summary ==
The situation with hddtemp improved regarding with manual usage on sleeping disks. Still, it is not possible to read temperature data when the disk is in standby (which should be possible in this state, as I understand it). In daemon mode, standby disks get constantly called into active state.

Please note, that I don't send the disks into sleep state.

Changed in sensors-applet (Ubuntu):
status: Incomplete → New

fabtagon, thank you for your quick response and contribution, helping to make Ubuntu better. The next step in this is to look in upstream bug trackers for similar issues at gnome-sensors http://sourceforge.net/tracker/?func=browse&group_id=128538&atid=711980 and Debian http://wiki.debian.org/Bugzilla and report back the findings of this search.

fabtagon (fabtagon) wrote :

The problem is *not* related with gnome-sensors.

(it's only related with hddtemp; afaik the assignment of gnome-sensors-applet to this bug is wrong)

== observed behaviour ==

* hddtemp not running, sensors running: hd keeps standby, no temperature shown in applet

* hddtemp running, sensors not running: hd gets constantly spun up
* hddtemp running, sensors running: hd gets constantly spun up, temperature shown in applet

By sensors i mean gnome-sensors-applet (which has the hddtemp sensors enabled). By hddtemp I mean the same-named daemon.

== remote bug tracking ==

Neither debian [0] nor hddtemp [1] have any open or resolved bugs matching this issue.

[0] http://bugs.debian.org/cgi-bin/pkgreport.cgi?package=hddtemp
[1] http://savannah.nongnu.org/bugs/?group=hddtemp&func=browse&set=open

Alex Murray (alexmurray) on 2010-09-18
Changed in sensors-applet (Ubuntu):
status: New → Invalid
fabtagon (fabtagon) wrote :

The issue persists with Ubuntu 10.10.

clubsoda (clubsoda) wrote :

Confirmed on Maverick with 2.6.35-25-generic.

Using xfce4-sensors-plugin the update interval can be specified manually, right down to one second. The HDD LED flashes as you'd expect but the drive heads can also be heard jumping around. Why? Something seems wrong about that.

Same result with "hddtemp /dev/sda" on the command line.

Tested with Seagate IDE drive ST3120026A.

ubuntu_demon, thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command, as it will automatically gather debugging information, in a terminal:
apport-collect 160621
When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

Changed in hddtemp (Ubuntu):
status: New → Incomplete

Architecture: amd64
DistroRelease: Ubuntu 10.10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
NonfreeKernelModules: fglrx
Package: hddtemp 0.3-beta15-46
PackageArchitecture: amd64
ProcEnviron:
 PATH=(custom, user)
 LANG=sv_SE.utf8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.35-28.49-generic 2.6.35.11
Tags: maverick
Uname: Linux 2.6.35-28-generic x86_64
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

tags: added: apport-collected

apport information

description: updated
Changed in hddtemp (Ubuntu):
status: Incomplete → New

Can you try to reproduce this under Ubuntu 12.04 LTS? Thank you!

Changed in hddtemp (Ubuntu):
status: New → Incomplete
fabtagon (fabtagon) wrote :

== stand-by disk ==
Manual querying either by command line or connecting to daemon: reported as sleeping, no temperature given, disk still stand-by

== sleeping disk ==
Manual querying either by command line or connecting to daemon: disk is woken and spun up, but still reported as sleeping in first response. After a short time, a temperature is given. Disks are also spun and woken up when querying e.g. their energy state by hdparm.

Note: after the disk has slept, I can not send it into stand-by or sleep anymore (until reboot). The issue is unrelated to hddtemp.

== conclusion ==

My personal problem is solved (I can spin down the disks by using stand-by to get zero noise and still use hddtemp as a daemon). There *might* be problems with (a) getting temperature in stand-by and (b) sleep mode in general, but I can't say whether thats maybe simply a result of technical standards in place rather than a software issue.

Thanks for having taken and taking care for the issue!

Version info: current, patched Ubuntu 12.04.1 LTS, AMD64.

Changed in hddtemp (Ubuntu):
status: Incomplete → Confirmed
Phillip Susi (psusi) wrote :

The debian maintainer said he fixed this a few years ago but it doesn't seem to be working, and the package doesn't use a proper patch system so I can't review the fix. Upstream project appears to be long dead. I'm wondering if this package should be removed now.

Heineken (lars-heineken) wrote :

hddtemp is unmaintained at source since several years, it seems. But the colleagues at RedHat have provided a fixed version in 2008: https://bugzilla.redhat.com/show_bug.cgi?id=464912
Unfortunately I could not locate the source code. Any ideas how to get it?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.