linrunner / TLP

TLP - Optimize Linux Laptop Battery Life
https://linrunner.de/tlp
GNU General Public License v2.0
2.74k stars 130 forks source link

Limit showing rfkill warnings to when it is actually relevant #640

Closed VorpalBlade closed 2 years ago

VorpalBlade commented 2 years ago

As far as I understand it, this solves issue #639. It still shows the warning when a config option that does conflict is present.

When none of those options are set (and the user prefer to use NetworkManager or systemd-network for example) to manage their rfkill, this will no longer display the warning.

In addition the new error message also shows what settings variable exactly is conflicting with systemd-rfkill, which improves usability and reduces the risk of misreported bugs.

Let me know if I understood this correctly, or if there are additional things that need to go into TLP_RFKILL_SERVICES_SAFE.

I can also update this PR I made any coding style mistakes. I'm a bit out of practise with writing bash code, having switched to zsh a couple of years ago.

linrunner commented 2 years ago

Hi,

the point of these messages via tlp-stat -s and syslog is to alert users that they have not fully completed the documented installation steps for TLP. If they consciously choose to do so, then they must also accept the messages. I do not want to change this behaviour, mainly for support reasons.

VorpalBlade commented 2 years ago

Hm okay. What about a config option that you can set to indicate you are aware of this and do not want to use the rfkill feature, then quiet the warnings if you also don't have any of the conflicting options? Would that be sufficient?

I really don't want to use the rfkill features of tlp (I use it to manage various sysctls and Thinkpad batteries), and I find the warnings really annoying.

linrunner commented 2 years ago

Btw: your code is bash specific. TLP is limited to Posix shell code. No arrays etc.

VorpalBlade commented 2 years ago

Sorry, I was not aware that it was POSIX shell only.