For the tde_dbus_hardwarecontrol daemon, the destination is always
"org.trinitydesktop.hardwarecontrol", which provides interfaces for
individual components. The permissions for the standard dbus Introspectable
and Properties calls are therefore set together on one destination,
regardless of the interfaces for the individual components.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 9a99527f0c)
Reading the status of input switches seems safe so that it can be allowed
to everyone. This will prevent the log from being filled with unauthorized
access messages if the user is not a member of the plugdev group - this
resolve issue TDE/tde#44.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 78b2136011)
to be able to generate a signal when the power state changes,
if the signal is not generated from udev.
This resolves issue TDE/tde#30.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit fb1316c785)
a switchChanged() signal for an EV_SW input event.
This resolves the detection of closing the lid on some hardware.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 8bfa123fb6)
This will resolve event device detection on special hardware, for example,
the LID switch on Pinebook Pro.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit f68fadda81)
The values from energy_* and power_now are converted
from mWh and mW to Ah and A, so that the units are
equal to values from charge_* and current_now.
This resolves issue #68.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit c088fbf55b)
This is useful if the system no longer supports policy at_console.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 7f7f7322f9)
+ Added reading of estimated time to fully charged battery
(time_to_full_now)
The remaining time is calculated if the value is not provided
in the battery information.
If the battery does not provide charging current information,
the estimated time to charge the battery cannot be calculated.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit ecd1e4bd40)
+ The current frequency is parsed from the scaling_cur_freq file
If the current frequency is not found in /proc/cpuinfo, the attempt
to read value from cpuinfo_cur_freq failed because only root can
read this file.
+ The have_frequency flag is not set when parsing current frequency from sysfs
Setting the have_frequency flag after parsing current frequency for the
first core caused the current frequency not to be parsed for other cores.
+ Frequency characteristics are parsed for all cores
The assumption that the frequency characteristics for all cores will be
the same as the first core is no longer reliable. There are heterogeneous
architectures - for example ARM big.LITTLE.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit ba82cdf5be)
+ Added initialization of all values
Some batteries do not provide all values and, without
initialization, values may contain dubious data.
+ Added reading of current battery capacity value in percent
(capacity)
Some batteries may provide the current capacity value in
percent instead of the current energy value.
+ Added check whether the battery provides current energy value
(charge_now or energy_now)
The current energy is calculated if the value is not provided
in the battery information.
+ Added reading of estimated time to empty battery
(time_to_empty_now)
The remaining time is calculated if the value is not provided
in the battery information.
If the battery does not provide charging current information,
the estimated time to charge the battery cannot be calculated.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 86c1d896c7)
drives that contain dashes. This relates to issue #32.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 32566accda)
Use interface name in TDENetworkConnectionManager_BackendNM instead of MAC address
This relates to bug 2748
The name of the network interface seems to be a more stable identifier than the MAC
address because the MAC address can be changed easily or even automatically - see
randomization of MAC addresses on wireless interfaces. Therefore, the use of the
MAC address as a network interface identifier was abandoned.
Beware, this change is an API / ABI change! However, most changes are internal
and the only one affected is application TDENetworkManager.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit e0fd34a1bd)
This applies for example to the software RAID defined in the BIOS
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 36481f68c1)