Created attachment 137566 [details]
Smart json output
Plugged in a newly bought 4 GiB HDD and got a scary warning, see attached log.
Linux/KDE Plasma: git master as of today
(There's also hardly any additional info like "we believe that because xyz")
"string": "Warning: This result is based on an Attribute check.",
Created attachment 137584 [details]
screenshot of simulation
I'm not quite sure what to make of this. The firmware must have reported that the overall smart_status was failing earlier.
When I load that json blob into simulation mode it definitely doesn't get reported as failure - I'm attaching a screenshot. And indeed when walking through the code I don't see how it would be reported as one.
For bug #429804 a separate warning mode was introduced but that wasn't hit according to the picture you sent on telegram and indeed it wouldn't be because only bit 2 is set and that isn't mapped to a failure https://invent.kde.org/plasma/plasma-disks/-/blob/948eb1ddc324dde5442bda9474fe4166d944302b/src/instabilities.cpp#L18 if it was the KCM would even tell you what exactly indicates problems with the drive.
Maybe it was because on first plug in smart was disabled? I had the same with another hdd. Will upload before and after turning in smart jsons later.
If you maybe had the org.kde.plasma.disks category enabled journald might have some details on what went wrong.
Created attachment 137611 [details]
Smart json before enablin smart
This was the other drive when I plugged it in
Now THAT does make more sense. Thx
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-disks/-/merge_requests/18
Git commit b1914d5a1c6cf0ae957e1b07aec9f3c153ed6e2e by Harald Sitter.
Committed on 15/04/2021 at 13:08.
Pushed by sitter into branch 'master'.
consider devices invalid (ignore them) that have smart disabled
when SMART is disabled smartctl will exit0 but contain no smart_status
which means default values get used and the device is considered
invalid. since we don't know what the status is in this situation we'll
consider the entire data set invalid and thereby hide the device.
with the growing amount of potentially discarded (but present) data
blobs it might soon make sense to think about rendering invalid devices
in the KCM with an unknown state so people at least can find out that
their drives aren't being monitored
A +77 -0 autotests/fixtures/pass-without-status.json
A +2 -0 autotests/fixtures/pass-without-status.json.license
M +1 -0 autotests/fixtures/simulation.qrc
M +15 -0 autotests/smartdatatest.cpp
M +9 -0 src/smartdata.cpp