<Solved> Mint 21: Package 'hddtemp' has no installation candidate

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Pheeble
Level 3
Level 3
Posts: 116
Joined: Sun Jun 21, 2015 11:27 pm
Location: Brisbane, Australia

<Solved> Mint 21: Package 'hddtemp' has no installation candidate

Post by Pheeble »

It seems that Ubuntu 22.04 has dropped the 'hddtemp' package, which means that it will not be available in Mint 21.

This is in Mint 21 XFCE:

Code: Select all

sudo apt install hddtemp
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package hddtemp is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'hddtemp' has no installation candidate
Now I'll have to hunt around and see if I can find an alternative... :(
Last edited by LockBot on Wed Jan 18, 2023 11:00 pm, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
xenopeek
Level 25
Level 25
Posts: 29615
Joined: Wed Jul 06, 2011 3:58 am

Re: Mint 21: Package 'hddtemp' has no installation candidate

Post by xenopeek »

hddtemp was removed from the Debian for this reason: https://sources.debian.org/src/hddtemp/ ... bian/NEWS/. Because it is no longer in Debian, it's no longer in Ubuntu 22.04 and thus not in Linux Mint 21.

The alternative is easy. Run this command to load the kernel driver that can read drive temperatures:
sudo modprobe drivetemp

Then run the command:
sensors

And it will print the drive temperatures, and information from other sensors. If you haven't done so previously, run the command sudo sensors-detect to detect the available sensors on your hardware. This doesn't load the drivetemp kernel module thus you have to do that manually as above.

If this works you can automatically load the drivetemp kernel module every boot by running this command to create the necessary configuration file for that:
echo drivetemp | sudo tee /etc/modules-load.d/drivetemp.conf
Image
Pheeble
Level 3
Level 3
Posts: 116
Joined: Sun Jun 21, 2015 11:27 pm
Location: Brisbane, Australia

Re: Mint 21: Package 'hddtemp' has no installation candidate

Post by Pheeble »

Thanks!

I didn't know about 'drivetemp' in the kernel. It works perfectly, and it doesn't require sudo.

In hunting around, I also found that smartctl from smartmontools can get the drive temperature:

Code: Select all

sudo smartctl -A /dev/sda | grep 'Temperature_Celsius'
194 Temperature_Celsius     0x0022   117   106   000    Old_age   Always       -       26
smartctl requires sudo, so I'll be using drivetemp.
ajgreeny
Level 7
Level 7
Posts: 1662
Joined: Mon Nov 19, 2007 3:27 pm

Re: <Solved> Mint 21: Package 'hddtemp' has no installation candidate

Post by ajgreeny »

Glad you got that solved but just for your information it is still possible to run the same package of hddtemp that came from Ubuntu 20.04 with no problems.

How long that will stay possible is, of course, something I can't tell you.
billyswong
Level 8
Level 8
Posts: 2235
Joined: Wed Aug 14, 2019 1:02 am

Re: <Solved> Mint 21: Package 'hddtemp' has no installation candidate

Post by billyswong »

I just adopted the mate-sensors-applet to use the new drivetemp.

In comparison to hddtemp, which I carefully kept during the Mint 21 upgrade process, the new drivetemp lacks descriptive device names. All drives call themselves "temp1". Any idea how to improve that?
(The multi-temperature display of mate-sensors-applet was the main reason I chose Mate edition over Cinnamon. :D Cinnamon may be also capable of that after some tweaking, but I didn't bother.)
User avatar
xenopeek
Level 25
Level 25
Posts: 29615
Joined: Wed Jul 06, 2011 3:58 am

Re: <Solved> Mint 21: Package 'hddtemp' has no installation candidate

Post by xenopeek »

billyswong wrote: Sat Aug 13, 2022 2:34 am All drives call themselves "temp1".
Isn't there an adapter name above it? I can't check here as only one of my drives shows temperature. Try with sensors -u or sensors -j if you can see more context with that. Maybe you can customize the label with your /etc/sensors3.conf file? See the sensors.conf manpage.
Image
billyswong
Level 8
Level 8
Posts: 2235
Joined: Wed Aug 14, 2019 1:02 am

Re: <Solved> Mint 21: Package 'hddtemp' has no installation candidate

Post by billyswong »

xenopeek wrote: Sat Aug 13, 2022 4:32 am
billyswong wrote: Sat Aug 13, 2022 2:34 am All drives call themselves "temp1".
Isn't there an adapter name above it? I can't check here as only one of my drives shows temperature. Try with sensors -u or sensors -j if you can see more context with that.
I end up figuring out I can "click" in Sensors Applet Preference dialog to edit labels. So I use their different temperatures to figure out which is which then relabel them. It is not ideal but bearable. To sensors (same after -u or -j), drivetemp is giving generic adapter names such as "drivetemp-scsi-4-0" and "drivetemp-scsi-0-0", probably in accordance to the ports they plugged onto motherboard. Sensors from hddtemp know the drives' model. I guess drivetemp's approach is better if a user plugs multiple drives of the same model into the computer, while less friendly when users don't remember the ports but remember the different drive models.

mate-sensor-applet can improve itself by combining the adapter name and the sensor name when naming sensors from libsensors.
User avatar
xenopeek
Level 25
Level 25
Posts: 29615
Joined: Wed Jul 06, 2011 3:58 am

Re: <Solved> Mint 21: Package 'hddtemp' has no installation candidate

Post by xenopeek »

inxi -Dx for me shows the drive brand and model name + temperature. The information can be mapped together and it's too bad that sensors doesn't do this on its own.

Give that the temp1_input variable will always be set on drives that support drivetemp https://docs.kernel.org/hwmon/drivetemp.html, you can piece it together yourself to from /sys filesystem though I don't know exactly how to map it to "drivetemp-scsi-4-0" name either.

On my system the command find /sys/devices/pci* -name temp1_input finds all the drives that support it. Outputs for me:

Code: Select all

/sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:0/2:0:0:0/hwmon/hwmon0/temp1_input
That hwmon0 directory has the drivetemp variables as described in above link.

If from there you go 2 directories up there is a text file 'model' that has the drive model name:

Code: Select all

/sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:0/2:0:0:0/model
Image
Locked

Return to “Software & Applications”