Bug 425027 - USB drives do not show SMART data
Summary: USB drives do not show SMART data
Status: REPORTED
Alias: None
Product: partitionmanager
Classification: Applications
Component: general (other bugs)
Version First Reported In: 4.1.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Andrius Štikonas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-05 08:26 UTC by physkets
Modified: 2024-07-09 11:49 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description physkets 2020-08-05 08:26:28 UTC
SUMMARY

External drives connected via USB have the "SMART Status" option greyed-out.


EXPECTED RESULT

smartctl suggests using the `-d sat` option for external drives:  
https://unix.stackexchange.com/questions/39064/smartctl-on-external-hdd-inside-ide-to-usb-enclosure#109736


SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.19.4
KDE Frameworks Version: 5.72.0
Qt Version: 5.15.0
Kernel Version: 5.7.12-zen
Comment 1 Andrius Štikonas 2020-08-05 09:38:43 UTC
Hmm, I don't have any devices that support that. So it would be a bit hard for me to test...

If you have some patch that works for you, merge request would be ideal. But I understand that this is not always possible.
Comment 2 physkets 2020-08-05 16:18:30 UTC
It is unlikely I will be able to figure it out, but could you point me to the relevant bits in the code?

I tried looking, but the GUI files seem to include a `smartstatus.h` that I'm unable to find. Could you help me out?
Comment 3 Andrius Štikonas 2020-08-05 16:31:30 UTC
(In reply to physkets from comment #2)
> It is unlikely I will be able to figure it out, but could you point me to
> the relevant bits in the code?
> 
> I tried looking, but the GUI files seem to include a `smartstatus.h` that
> I'm unable to find. Could you help me out?

Those files are here
https://invent.kde.org/system/kpmcore/-/tree/master/src/core

There are four .cpp files dealing with smart.

smartstatus.cpp displays all that info that GUI requests. It's probably a bit higher level stuff than you need. But you can take a brief look

smartparser.cpp on the other hand runs smartctl command in function
void SmartParser::loadSmartOutput()

adding option -d sat there might immediately help you with your drive but it likely breaks other SMART drives.
Comment 4 Andrius Štikonas 2020-08-05 16:34:56 UTC
(In reply to Andrius Štikonas from comment #3)
> (In reply to physkets from comment #2)
> > It is unlikely I will be able to figure it out, but could you point me to
> > the relevant bits in the code?
> > 
> > I tried looking, but the GUI files seem to include a `smartstatus.h` that
> > I'm unable to find. Could you help me out?
> 
> Those files are here
> https://invent.kde.org/system/kpmcore/-/tree/master/src/core
> 
> There are four .cpp files dealing with smart.
> 
> smartstatus.cpp displays all that info that GUI requests. It's probably a
> bit higher level stuff than you need. But you can take a brief look
> 
> smartparser.cpp on the other hand runs smartctl command in function
> void SmartParser::loadSmartOutput()
> 
> adding option -d sat there might immediately help you with your drive but it
> likely breaks other SMART drives.

Hmm, I briefly read man smartctl. It might be better to use -d sat,auto