Bug 453854 - Please follow BinaryUnitDialect, appropriately
Summary: Please follow BinaryUnitDialect, appropriately
Status: CONFIRMED
Alias: None
Product: plasma-systemmonitor
Classification: Applications
Component: general (show other bugs)
Version: 5.24.4
Platform: Gentoo Packages Linux
: NOR minor
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords:
: 391596 464604 467317 474155 (view as bug list)
Depends on: 57240
Blocks:
  Show dependency treegraph
 
Reported: 2022-05-15 20:36 UTC by Erik Quaeghebeur
Modified: 2024-06-10 17:37 UTC (History)
9 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Quaeghebeur 2022-05-15 20:36:20 UTC
SUMMARY
The system monitor does not seem to follow the BinaryUnitDialect config option. Likely it is just a matter of replacing some function with some higher-level ones, as other apps do the right thing (e.g., Krusader).

STEPS TO REPRODUCE
1. Set BinaryUnitDialect=2 in [Locale] section of $KDEHOME/.config/kdeglobals (setting to metric/SI instead of IEC)
2. Start system monitor
3. Look at some of the stats showing

OBSERVED RESULT
IEC formatting is used everywhere instead of metric

EXPECTED RESULT
Metric formatting is used everywhere it is appropriate (I think the only place IEC might make sense is for memory size and usage when a preference for metric is expressed)

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
The BinaryUnitDialect config option is described in Bug 57240. This option is for now still without a GUI, but Bug 364321 makes it clear this is about to change. So apps like the system monitor should be made ready to follow BinaryUnitDialect.
Comment 1 vmelkon 2022-05-17 03:37:30 UTC
I have tested this on Kubuntu 22.04
I can confirm that I have the same result.

KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3

I have tried BinaryUnitDialect=2 and BinaryUnitDialect=1.
In both cases, KSysGuard just ignores it and keeps on showing kiB, MiB, GiB, TiB.
Comment 2 Nate Graham 2023-01-24 18:28:00 UTC
*** Bug 464604 has been marked as a duplicate of this bug. ***
Comment 3 David Redondo 2023-01-25 10:22:48 UTC
There is no UI for this setting and seems it is not even global, only KIO reads it https://lxr.kde.org/search?%21v=kf5-qt5&_filestring=&_string=%22BinaryUnitDialect%22
Comment 4 Erik Quaeghebeur 2023-01-25 12:11:17 UTC
(In reply to David Redondo from comment #3)
> There is no UI for this setting

That is the topic of the linked bug report: https://bugs.kde.org/show_bug.cgi?id=364321
This is a chicken-and-egg problem: as long as applications to not support it, the value of a GUI is limited and developers will not find it urgent, and application developers will point to the lack of a GUI to say that it is not urgent

> it is not even global, only KIO reads it

I cannot comment on this. I guess that means it is harder to implement? AFAIU previously, it was just a matter of using existing framework functions that do support it. Then perhaps a new bug report is in order to request for better support for this in a framework.
Comment 5 Nate Graham 2023-03-14 19:57:35 UTC
*** Bug 467317 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2023-05-16 23:48:32 UTC
*** Bug 391596 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2023-07-21 21:34:56 UTC
> AFAIU previously, it was just a matter of using existing framework functions that do support it
That's correct, yes. The frameworks-provided function has been fixed to read the setting properly; see https://invent.kde.org/frameworks/kcoreaddons/-/merge_requests/352. Now System Monitor just needs to use it and then this will get fixed automatically.
Comment 8 Nate Graham 2023-09-05 19:47:49 UTC
*** Bug 474155 has been marked as a duplicate of this bug. ***
Comment 9 Andreas Nordal 2023-09-11 22:40:31 UTC
Is it a good idea to use the same configuration for everything?

There may be opposite conventions to follow:
For network speed, I would even suggest that if the configuration isn't SI, the configuration is wrong.
But opposite for memory and partition sizes.

Not that I would argue for more options. Rather that getting the default right in each case without not making the user choose between two wrongs is more important.
Comment 10 vmelkon 2023-09-16 03:38:00 UTC
Good idea.

"Not that I would argue for more options. Rather that getting the default right in each case without not making the user choose between two wrongs is more important."

>>I would argue for more options. Nothing wrong with more options, as long as it is documented somewhere. After all, Microsoft documents their registry keys and someone publishes 500 page books on Windows Server.
If Microsoft can program a feature, then so can anyone.
(In this case, Windows doesn't have such features).