From Fedora Project Wiki

(New page: {{QA/Test_Case |description=DeviceKit-power is a little service that takes data from the kernel, and processes it so that it's easy to consume. Known consumers are gnome-power-manager and ...)
 
m (Wiki cleanup ... trying to move actions into actions, and results into results)
 
Line 2: Line 2:
|description=DeviceKit-power is a little service that takes data from the kernel, and processes it so that it's easy to consume. Known consumers are gnome-power-manager and the XFCE battery widget. DeviceKit-power gets all the data from the kernel over the dbus service DeviceKit.  
|description=DeviceKit-power is a little service that takes data from the kernel, and processes it so that it's easy to consume. Known consumers are gnome-power-manager and the XFCE battery widget. DeviceKit-power gets all the data from the kernel over the dbus service DeviceKit.  
|actions=
|actions=
# yum install gnome-power-manager DeviceKit-power
# Ensure packages are installed by typing: <pre># yum install gnome-power-manager DeviceKit-power</pre>
# Remove or insert the AC adaptor, see changes in status using 'devkit --monitor' 'devkit-power --monitor'
# Remove and insert the AC adaptor while watching output from the following commands: <pre># devkit --monitor</pre> and <pre># devkit-power --monitor</pre>
# Using gnome-power-statistics you can obserbe the values in more detail. Make sure the percentages are all 0..100 and the value look sensible (for instance, Voltage is 0..20V, not 340034V). If this is the case please open a bug and dump the output of /sys/class/power_supply/*/*. If the values in /sys are wrong, then it's not a DeviceKit-power bug, it's a kernel bug or hardware fault.
# Launch ''Applications -> System Tools -> Power Statistics'' and inspect the displayed performance metrics
# For the wakeups, ensure "devkit-power --wakeups" produces userspace and kernel wakeups, and that these are sensible. The first time you run this command, you'll probably get no data, but just try again in a few seconds, and you should have some values. We don't poll by default all the time, as this itself would use power.
# Examine wake-ups by typing: <pre># devkit-power --wakeups</pre>
# Run devkit-power-daemon in verbose mode: 'killall devkit-power-daemon; /usr/libexec/devkit-power-daemon --verbose'
# Run devkit-power-daemon in verbose mode: <pre># killall devkit-power-daemon; /usr/libexec/devkit-power-daemon --verbose</pre>
# Crash test - devkit-power: use 'kill - SIGSEGV'; use invalid input
# Crash test - devkit-power: use <pre># pkill -SIGSEGV devkit-power</pre>; use invalid input
# Crash test - devkit-power-daemon: use dbus-send; use d-feet to execute methods
# Crash test - devkit-power-daemon: <pre># pkill -SIGSEGV devkit-power-daemon</pre>; use dbus-send; use d-feet to execute methods
|results=
|results=
# All steps succefully executed with no SELinux errors or permission denials
# All steps successfully executed with no SELinux errors or permission denials  
# If you don't get changed signals in DeviceKit or DeviceKit-power then it's probably a kernel bug. This is known for some Sony laptops, and needs to be fixed in the kernel.  
# Inserting and removing AC adapter is observed by using ''devkit'' monitor tools
# ''gnome-power-statistics'' - All percentages are 0..100 and the values look sensible (for instance, Voltage is 0..20V, not 340034V). If this is the case please open a bug and dump the output of /sys/class/power_supply/*/*. If the values in /sys are wrong, then it's not a DeviceKit-power bug, it's a kernel bug or hardware fault.  
# ''devkit-power'' - produces userspace and kernel wakeups, and that these are sensible. The first time you run this command, you'll probably get no data, but just try again in a few seconds, and you should have some values. We don't poll by default all the time, as this itself would use power.  
# devkit-power-daemon or devkit-power should not crash unless killed
# devkit-power-daemon or devkit-power should not crash unless killed
{{admon/note|Kernel bug?|If you don't get changed signals in DeviceKit or DeviceKit-power then it's probably a kernel bug. This is known for some Sony laptops, and needs to be fixed in the kernel.}}
}}
}}
[[Category:DeviceKit_Test_Cases]]
[[Category:DeviceKit_Test_Cases]]

Latest revision as of 14:58, 16 March 2009

Description

DeviceKit-power is a little service that takes data from the kernel, and processes it so that it's easy to consume. Known consumers are gnome-power-manager and the XFCE battery widget. DeviceKit-power gets all the data from the kernel over the dbus service DeviceKit.


How to test

  1. Ensure packages are installed by typing:
    # yum install gnome-power-manager DeviceKit-power
  2. Remove and insert the AC adaptor while watching output from the following commands:
    # devkit --monitor
    and
    # devkit-power --monitor
  3. Launch Applications -> System Tools -> Power Statistics and inspect the displayed performance metrics
  4. Examine wake-ups by typing:
    # devkit-power --wakeups
  5. Run devkit-power-daemon in verbose mode:
    # killall devkit-power-daemon; /usr/libexec/devkit-power-daemon --verbose
  6. Crash test - devkit-power: use
    # pkill -SIGSEGV devkit-power
    ; use invalid input
  7. Crash test - devkit-power-daemon:
    # pkill -SIGSEGV devkit-power-daemon
    ; use dbus-send; use d-feet to execute methods

Expected Results

  1. All steps successfully executed with no SELinux errors or permission denials
  2. Inserting and removing AC adapter is observed by using devkit monitor tools
  3. gnome-power-statistics - All percentages are 0..100 and the values look sensible (for instance, Voltage is 0..20V, not 340034V). If this is the case please open a bug and dump the output of /sys/class/power_supply/*/*. If the values in /sys are wrong, then it's not a DeviceKit-power bug, it's a kernel bug or hardware fault.
  4. devkit-power - produces userspace and kernel wakeups, and that these are sensible. The first time you run this command, you'll probably get no data, but just try again in a few seconds, and you should have some values. We don't poll by default all the time, as this itself would use power.
  5. devkit-power-daemon or devkit-power should not crash unless killed
Note.png
Kernel bug?
If you don't get changed signals in DeviceKit or DeviceKit-power then it's probably a kernel bug. This is known for some Sony laptops, and needs to be fixed in the kernel.