-
Notifications
You must be signed in to change notification settings - Fork 159
feat: add pwrsave script to network module #168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This changes allow to customize behavior of network modules power save for wifi. The used method spits out an error if the device has no wifi built in, which confuses the user. To prevent that I implemented a simple solution that the user only get a warning if no wifi device present. Also added functionality to disable the whole mechanism. You can choose a standard rc.local entry or a systemd service to manipulate behavior on reboots (Enable/Disable the service) Signed-off-by: Stephan Wendel <me@stephanwe.de>
Prove of concept: https://github.com/KwadFan/MainsailOS/actions/runs/2560281839 -> with rc.local option Test runs will be removed after merge, for future visitors, it works :) |
Looks good, though just a thought - perhaps its a better idea to make it go in the udev rules setting - that way it would also act better on the rpi2 output @meteyou gave. Its better than the rclocal we have now. |
How about adding a third option to use udev rule? My intention was to provide something simple, useable for the "enduser" but not to go far away from a existing solution to not break something that uses rc.local style. Personally I like the udev method, that should also provide something simple like an systemctl disable wifi..... |
@KwadFan Sure, if you are up for it that would be great! |
Could be take a few days, because I am o Vacation but will do. |
This sets a udev rule to disable powermanagement. Also set udev as default. To be configured by users, I added also a script called 'pwrsave-udev' This allows to create or modify (on/off) behavior off udev rule. The create option is to recreate in case of deleting the rule. Signed-off-by: Stephan Wendel <me@stephanwe.de>
@guysoft I think I did what you thought about as a better solution. The rule and the script itself works fine. Didnt test a build yet. |
Thanks for doing that. Merged :) |
fix: fixes error not parsed variables #168
This changes allow to customize behavior of network modules power save
for wifi.
The used method spits out an error if the device has no wifi built in,
which confuses the user.
To prevent that I implemented a simple solution that the user only get a
warning if no wifi device present.
Also added functionality to disable the whole mechanism.
You can choose a standard rc.local entry or
a systemd service to manipulate behavior on reboots
(Enable/Disable the service)
Signed-off-by: Stephan Wendel me@stephanwe.de