Add Wireless Energy Saving action

Review Request #127263 - Created March 3, 2016 and submitted

Information
Jan Grulich
powerdevil
master
127325
Reviewers
plasma, solid, usability
broulik

This action adds an option to turn off wifi/wwan/bt once you switch profile (e.g you unplugg the power cable and start running on battery).

One more thing. Due to usage of NetworkManagerQt I had to add add_definitions(-DQT_NO_KEYWORDS) into CMakeLists.txt like we do in plasma-nm to avoid compilation error (thanks to NetworkManager) and replace all keywords by their Qt equivalent (e.g signals ? Q_SIGNALS).

How it behaves:
1) Switching from "AC" profile to "battery" (or from "battery" to "low battery" which is the same situation):
a) When the action is enabled in "AC" profile and options to turn off wifi/wwan/bt are enabled
x) Switching to a profile where the action is enabled too and options are turned on ? will do nothing as they should be already turned off
y) Switching to a profile where the action is enabled too but options are turned off ? will do nothing as the "battery" profile is more conservative and we have those devices disabled already in less conservative profile
z) Switching to a profile where the action is disabled ? will do nothing as there is nothing to do
b) When the action is enabled in "AC" profile and options to turn off wifi/wwan/bt are disabled
? this should behave according to the more conservative profile, if the options are enabled then all devices will be disabled too
C) When the action is disabled in "AC" profile
? should behave as in the case 1-b
2) Switching from "battery" profile to "AC" profile (or from "low battery" to "battery" which is the same situation):
a) When the action is enabled in "battery" profile and options to turn off wifi/wwan/bt are enabled
x) Switching to a profile where the action is enabled too and options are turned on ? will do nothing as it's same setup
y) Switching to a profile where the action is enabled too and options are turned off ? will turn on the wifi/wwan/bt
z) Switching to a profile where the action is disabled ? will recover the previous state of the wifi/wwan/bt
b) When the action is enabled in "battery" profile and options to turn off wifi/wwan/bt are disabled
x) Switching to a profile where the action is enabled too and options are turned on ? will do nothing as the option in "battery" should be ignored in this case due to more conservative profile
y) Switching to a profile where the action is enabled too and options are turned off ? will do nothing, same configuration
z) Switching to a profile where the action is disabled ? will recover the previous state of the wifi/wwan/bt
c) When the action is diabled in "battery" profile
? will just recover the previous state of the wifi/wwan/bt as there is nothing to change according to the new profile

I did some basic testing like (un)plugging the power cable and checking whether it applied the correct configuration.

Issues

  • 2
  • 13
  • 0
  • 15
Description From Last Updated
I think BluezQt should be optional. Not everbody uses bluetooth in their computers, desktop pc for instance. Lamarque Souza Lamarque Souza
What is this used for? Kai Uwe Broulik Kai Uwe Broulik
Lamarque Souza
Kai Uwe Broulik
Jan Grulich
Kai Uwe Broulik
Jan Grulich
Kai Uwe Broulik
Thomas Pfeiffer
Anthony Fieroni
Jan Grulich
Kai Uwe Broulik
Jan Grulich
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 039217405a7f8fa252bf1fa4c9fa85491d7069ab by Jan Grulich to branch master.
Loading...