d4nj1 / TLPUI

A GTK user interface for TLP written in Python
GNU General Public License v2.0
1.08k stars 83 forks source link

Enabling and Disabling settings is Broken #107

Closed ghost closed 1 year ago

ghost commented 2 years ago

I've tried this now on 3 different installations and its always the same.

Every time you try and disable a given setting - eg "SOUND POWER SAVE ON BAT" to remove it from TLPs control, when you 'save', rather than comment the line out like it should, it fills the values with "* empty". This is shown in the changes window before oyu authenticate

However this is not reflected in the UI - the value stays ticked and seemingly enabled with the previous previous setting still present and for all intents and purposes seems enabled.

Which means when the time comes that you WANT to re-enable that setting, you can't - because the UI already shows it as being in an enabled state. Meaning you have to either do so manually in /etc/tlp.conf - which renders the whole UI poinless - of change the values to soemthing else, apply, then change it back - which is even slower.

It seems to do this with almost every setting in the app - making it essentially completely useless.

d4nj1 commented 2 years ago

Hi, I try to get this reproduced at the next weekend as I currently have little time for this project.

Please help me by answering the following questions:

Thanks in advance

ghost commented 2 years ago

Hi, I try to get this reproduced at the next weekend as I currently have little time for this project.

Please help me by answering the following questions:

* If I understand correctly you have issues de/activating and saving the config values with the checkbox on the left side at each configuration item?

* Could you please share the TLP and TLPUI version you are using?

Thanks in advance

@d4nj1 Sorry I didn't reply sooner, for some reason I stopped getting email notifications?

I've since ditched linux entirely due to just the overwhelming poor quality of most distros at the moment, but I'll try find some time to fire up a test machine and reinstall TLPUI and try figure out a clearer way to show this. Whats the best way to upload a video/screen recording here?

d4nj1 commented 2 years ago

Hi @GlobalAlliance18 I managed to reproduce this in Arch and also locally in my dev env. Currently I think it's a bug in the UI. The reason for it is that some parameters can also be deactivated with "* empty" but this obviously does not reflect corretly in the UI.

Please see https://github.com/d4nj1/TLPUI/issues/59#issuecomment-583268906 for the description what means actived/deactived in regards to config items.

I dig into this deeper as soon as I can.

Kind regards

d4nj1 commented 2 years ago

Hi @GlobalAlliance18 , this took quite long as my "real" job is currently not giving me much free time for this project. Anyways, as I looked deeper into the UI I found out that it is not related to the UI and that it affects all default values set by TLP.

As described before and linked in https://github.com/d4nj1/TLPUI/issues/59#issuecomment-583268906 deactivating default values by adding * empty does not have an effect and when calling tlp-stat -c is not viewed as set in /etc/tlp.conf but as default like:

defaults.conf L0051: RESTORE_DEVICE_STATE_ON_STARTUP="0"

even though in /etc/tlp.conf the config line is:

RESTORE_DEVICE_STATE_ON_STARTUP="* empty"

@linrunner could you please advice us/me what might be the issue here? Is it maybe not possible to deactivate default configuration items anymore? Has this changed since TLP 1.3?

Thanks in advance

linrunner commented 2 years ago

Hi @d4nj1 gladly. As of 1.3 the proper and documented way to disable any intrinsic default is an empty string, e.g.

 RESTORE_DEVICE_STATE_ON_STARTUP=""

or equivalent

 RESTORE_DEVICE_STATE_ON_STARTUP=

in a config file (doesn't work by command line parameter override --).

"* empty"

is an invalid string and will be skipped by the new parser introduced with 1.3.

d4nj1 commented 2 years ago

Hi @GlobalAlliance18 I just relesed a new version which includes UI fixes for intrinsic defaults. Please feel free to try out latest master or tlpui-1.5.0-2 and report back if possible.

Best regards

d4nj1 commented 1 year ago

I guess it's fixed as there are no more complains.