Fedora Test Days | |
---|---|
Power Management | |
Date | 2012-10-11 |
Time | all day |
Website | QA/Fedora_18_test_days |
IRC | #fedora-test-day (webirc) |
Mailing list | test |
What to test?[edit]
Today's instalment of Fedora Test Day will focus on Power Management
Who's available[edit]
The following cast of characters will be available for testing, workarounds, bug fixes, and general discussion ...
- Development - Jaroslav Škarvada (jskarvad) / PowerManagement SIG
- Quality Assurance - Jan Ščotka (jscotka)
Note: jskarvad will be available at least during 10:00 - 22:00 (UTC+2) on #fedora-test-day, #fedora-power, #fedora-devel, otherwise he will be on e-mail with non guaranteed response time. He will be also available on site in Red Hat Brno office during 13:00 - 19:00, Visitors room, 4th floor (in the front of reception desk).
Prerequisite for Test Day[edit]
- The 32 bit live medium (SHA-1: e003ad7e7bcac9cc018ee2e0cee5977a4779b59d) or 64 bit live medium (SHA-1: f63f4faebdd0b3398ba6755d681d7e630efba091) or an updated Fedora 18 pre-release or you may get nightly composed LiveCD.
- It is possible to convert the LiveCD into LiveUSB by following the How_to_create_and_use_Live_USB instructions. If you convert the LiveCD into LiveUSB it is recommended to create on USB another primary partition that will serve as swap. This is useful for pm-hibernate test case.
- If you attend the event on-site in Red Hat Brno office, there will be prepared bootable USB flash disks/CD ROMs, thus you only need to bring your hardware there. (13.00-17.00 CEST)
- Your hardware profile uploaded to Smolt according to these instructions
- In case you have dependency problem with smolt package use the workaround bellow:
yum install --nogpgcheck "http://fedorapeople.org/~jskarvad/pm-test-day-repo/smolt-1.4.3-6.fc18.noarch.rpm"
- Optional: account on fedoraproject.org if you plan to upload the pm-utils bugreport file. If you do not have one and you do not plan to get it, you can still attend the test day - there are instructions in the appropriate test case(s) bellow how to handle such situation.
Typing convetions[edit]
In the following text commands that needs to be run as root are prefixed by #, e.g.:
# id
means to run id command under the root account. Commands prefixed by $ do not need to be run under the root account.
How to test?[edit]
It is focused especially on suspend, hibernate, power-consumption, LCD brightness control and tuned. Some test cases are only for laptop users and it is noted in the test case description field. If you do not have laptop just skip them. You can also skip other test cases (e.g. if you do not have enough time). In this case just leave the columns for skipped test cases blank. Please note that your report will be still valuable even if you do not finish all test cases. The procedure:
- Run test cases bellow.
Prepare your system[edit]
- Install the public key (in case you would like to verify the PM Test Day support package, otherwise you can skip this step because the public key will be installed automatically with the PM Test Day support package in the next step):
# rpm --import http://jskarvad.fedorapeople.org/RPM-GPG-KEY-pm-test-day
- Install the PM Test Day support package by:
# yum install http://jskarvad.fedorapeople.org/pm-test-day-repo/pm-test-day-4-1.fc18.noarch.rpm
- This procedure will also install the public key which will be then used for verification of packages from the PM Test Day repo.
- In case you have dependency problem with smolt package use the workaround bellow:
yum install --nogpgcheck "http://fedorapeople.org/~jskarvad/pm-test-day-repo/smolt-1.4.3-6.fc18.noarch.rpm"
Make sure you have all current updates (and temporal fixes) installed by:
# yum update
Clear your audit log (especially important in case you aren't running from the live medium):
# echo -n > /var/log/audit/audit.log
Known Bugs / Workarounds[edit]
- RHBZ #862801 - Anaconda hangs when 'Configuring installed system'
- You can encounter this when doing liveinst from the live media, current workaround: 'pkill anaconda'.
- Problem with screen locking:
- Screen locking is disabled on live medium, to enable:
- Set password for liveuser:
# passwd liveuser
- Enable the locking feature:
$ gsettings set org.gnome.desktop.lockdown disable-lock-screen 'false'
- Enable the lock in gnome-control-center:
$ gnome-control-center screen
- The desktop locking is task of gnome-settings-daemon/UPower not pm-utils (pm-suspend*, pm-hibernate). Pm-utils is backend for UPower and knows nothing about desktop locking. To lock your desktop you need to suspend/hibernate from gnome-shell UI.
- Problem with hibernation from gnome-shell
- AFAIK currently it is not possible to hibernate from gnome-shell UI without tweaking (please don't ask me why, I am not Gnome developer), you can invoke the full hibernation (including desktop locking if set, see above) by the following dbus call:
$ dbus-send --print-reply --system --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Hibernate
- Or with gnome-shell 3.6:
# dbus-send --print-reply --system --dest=org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.Hibernate boolean:false
- RHBZ #859224 - Please take systemd-logind's handle-power-key/handle-suspend-key/handle-hibernate-key/handle-lid-switch inhibitor locks if GNOME wants to handle the respective keys on its own
- Double suspend problem.
Test Cases[edit]
Testcase | Description | Target | Approx. time required |
---|---|---|---|
pm-suspend | Tests suspend / resume via pm-utils. | All | 2 minutes |
pm-hibernate | Tests hibernate / resume via pm-utils. | All | 2 minutes |
pm-suspend-hybrid | Tests hybrid suspend (AKA suspend to both) / resume via pm-utils. | All | 2 minutes |
pm-powersave | Tests detection of AC / battery (upower functionality) and pm-powersave reactions to power source changes (pm-utils). | Laptops | 1 minutes |
Lid close | Tests system reaction to lid close. | Laptops | 1 minutes |
Backlight control | Tests LCD backlight control. | Laptops | 1 minute |
Tuned | Tests tuned-adm (tuned) basic functionality. | All | 5 minutes |
Tuned disabled idle | Measures power consumption of machine in active idle with tuned disabled. | Laptops or users with wattmeter | 15 minutes |
Tuned powersave idle | Measures power consumption of machine in active idle with tuned laptop-battery-powersave profile. | Laptops or users with wattmeter | 15 minutes |
Selinux AVCs | Tests if there are no SELinux AVCs during profile switching. | All | 1 minutes |
Test Results[edit]
If you have problems with any of the tests, report a bug to Bugzilla usually for the component pm-utils, selinux-policy, kernel, or tuned. If you are reporting suspend/hibernate problem, please also attach output from dmesg and pm-utils-bugreport-info.sh. If you are unsure about exactly how to file the report or what other information to include, just ask on IRC and we will help you. Once you have completed the tests, add your results to the Results table below following the example results from the first line. The first column should be your name with a link to your Fedora User Wiki page (if you have one), and the second should be a link to the Smolt profile of the system you tested. For each test case, use the result template to enter your result, as shown in the example result line.
Previous test day (for reference)[edit]
Long comments[edit]
- ↑ RHBZ #679631 machine whirs up after pressing power button to resume, and even shows last screen, but remains unresponsive, if hard disk is present; but if disk is pulled while I use liveusb image, it works
- ↑ same failure as pm-suspend on first power-on; then hard power cycle triggered hibenation recovery on second power-on with same failure as pm-hibernate; next hard power cycle (third power-on) booted fresh
- ↑ Also encountered some AVCs on spindown-disk profile, but we are going to fix this upstream in the next tuned update (this is minor as the profile is phasing out in the compat sub-package)
- ↑ Suspends correctly after closing the laptop lid. After opening the lid, system successfully resumes to the GUI but then immediately suspends again. Pressing the power button afterwards resumes the system correctly. (reportedly caused by a bug in gsettings ?)
- ↑ Following avc erors/messages are displayed when pmtd-selinux-test is run immediately after systemctl start tuned.service. If test script pmtd-selinux-test is run again there are no AVC matches. [root@localhost liveuser]# pmtd-selinux-test AVCs: ---- type=SYSCALL msg=audit(10/11/2012 07:35:39.207:517) : arch=x86_64 syscall=connect success=no exit=-13(Permission denied) a0=0x7 a1=0x7f6c94ee8390 a2=0x21 a3=0x6e75722f7261762f items=0 ppid=1 pid=6187 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=tuned exe=/usr/bin/python2.7 subj=system_u:system_r:tuned_t:s0 key=(null) type=AVC msg=audit(10/11/2012 07:35:39.207:517) : avc: denied { search } for pid=6187 comm=tuned name=dbus dev="tmpfs" ino=13925 scontext=system_u:system_r:tuned_t:s0 tcontext=system_u:object_r:system_dbusd_var_run_t:s0 tclass=dir
- ↑ I am really surprised that there is NO WAY how to hibernate in Gnome3 with password prompt after booting again. There is no "clickable" action and after pm-hibernate it doesn't prompt for password.
- ↑ In every Fedora release, automatic suspend (after x minutes) didn't work properly. Sometimes it worked, sometimes it didn't. However the script on the following page fixed this issue for me (translated from german to english with google translate: http://translate.google.com/translate?sl=de&tl=en&js=n&prev=_t&hl=de&ie=UTF-8&layout=2&eotf=1&u=http%3A%2F%2Flinuxundich.de%2Fde%2Fhardware%2Fstandbysuspend-unter-linux-bei-vielen-notebooks-und-mainboards-reparieren%2F&act=url Original: http://linuxundich.de/de/hardware/standbysuspend-unter-linux-bei-vielen-notebooks-und-mainboards-reparieren/ I don't know what the script exactly does, but you may have a look at it, if you want.
- ↑ - System starts with lowest brightness level - I always have to adjust after start (to max brightness). - Bluetooth automatically starts after boot. If I turn off bluetooth via laptopbutton the backlight brightness increases for some reason. The bluetooth button acts like backlight control key 'up' but only when turning bluetooth off. When turning bluetooth on, all is normal. - The backlight control keys itself work as they should.
- ↑ Result 1 > Passed Result 2: tuned.service is still running after doing a 'systemctl stop tuned.service' Console-Log: [root@localhost liveuser]# systemctl stop tuned.service [root@localhost liveuser]# pgrep tuned 640 [root@localhost liveuser]#
- ↑ Fail to return when 2 lcds connected https://picasaweb.google.com/106948465206430639830/PmTestDay?authuser=0&authkey=Gv1sRgCL3M0YbP54jcuwE&feat=directlink
- ↑ pmtd-selinux-test
AVCs: ----
type=SYSCALL msg=audit(10/11/2012 11:45:35.738:309) : arch=x86_64 syscall=connect success=no exit=-13(Permission denied) a0=0x7 a1=0x7f19d797c390 a2=0x21 a3=0x6e75722f7261762f items=0 ppid=1 pid=2097 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=tuned exe=/usr/bin/python2.7 subj=system_u:system_r:tuned_t:s0 key=(null)
type=AVC msg=audit(10/11/2012 11:45:35.738:309) : avc: denied { search } for pid=2097 comm=tuned name=dbus dev="tmpfs" ino=14446 scontext=system_u:system_r:tuned_t:s0 tcontext=system_u:object_r:system_dbusd_var_run_t:s0 tclass=dir
type=USER_AVC msg=audit(10/11/2012 11:49:18.533:312) : pid=1 uid=root auid=unset ses=unset subj=system_u:system_r:init_t:s0 msg='avc: denied { status } for auid=liveuser uid=liveuser gid=liveuser path=/usr/lib/systemd/system/crond.service cmdline="systemctl stop crond.service" scontext=system_u:system_r:system_dbusd_t:s0 tcontext=system_u:object_r:crond_unit_file_t:s0 tclass=service exe=/usr/lib/systemd/systemd sauid=root hostname=? addr=? terminal=?'
type=SYSCALL msg=audit(10/11/2012 12:12:48.187:315) : arch=x86_64 syscall=connect success=no exit=-13(Permission denied) a0=0x7 a1=0x7f975d50a390 a2=0x21 a3=0x6e75722f7261762f items=0 ppid=3234 pid=3236 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=tuned exe=/usr/bin/python2.7 subj=system_u:system_r:tuned_t:s0 key=(null) type=AVC msg=audit(10/11/2012 12:12:48.187:315) : avc: denied { search } for pid=3236 comm=tuned name=dbus dev="tmpfs" ino=14446 scontext=system_u:system_r:tuned_t:s0 tcontext=system_u:object_r:system_dbusd_var_run_t:s0 tclass=dir Current active profile: /usr/lib/tuned/balanced/tuned.conf
- Switching to profile: balanced
AVCs: <no matches> Current active profile: /usr/lib/tuned/balanced/tuned.conf
- Switching to profile: latency-performance
AVCs: <no matches> Current active profile: /usr/lib/tuned/latency-performance/tuned.conf
- Switching to profile: powersave
AVCs: <no matches> Current active profile: /usr/lib/tuned/powersave/tuned.conf
- Switching to profile: throughput-performance
AVCs: <no matches> Current active profile: throughput-performance
- Switching to profile: virtual-guest
AVCs: <no matches> Current active profile: virtual-guest
- Switching to profile: virtual-host
AVCs: <no matches>
- ↑ acpi error finding sysfs power node The exact wording of error is unknown since it was continually printing to screen but there was at least one slightly different error that made the exact error unreadable.
- ↑ AVC denial (type=AVC msg=audit(1350010423.641:81): avc: denied { search } for pid=1859 comm="tuned" name="dbus" dev="tmpfs" ino=13881 scontext=system_u:system_r:tuned_t:s0 tcontext=system_u:object_r:system_dbusd_var_run_t:s0 tclass=dir) but tuned still began.