shutdown trigger on gpio_keys.X for armhf hardware
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd |
Fix Released
|
Medium
|
|||
systemd (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Trusty |
Fix Released
|
Undecided
|
Manoj Iyer | ||
Utopic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Some ARM board uses GPIO gpio_key.12 for power control (key=116). The proposed patch adds entry to logind's 70-power-
Here is the udevadm output for /dev/input/event0
sudo udevadm info --query=all --name=
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/
KERNEL=
SUBSYSTEM=
DRIVER==""
looking at parent device '/devices/
KERNELS=
SUBSYSTEMS=
DRIVERS==""
ATTRS{
ATTRS{
ATTRS{uniq}==""
ATTRS{
looking at parent device '/devices/
KERNELS=
SUBSYSTEMS=
DRIVERS=
ATTRS{
ATTRS{
ATTRS{
ATTRS{
looking at parent device '/devices/soc.3':
KERNELS=
SUBSYSTEMS=
DRIVERS==""
Regarding the possibility of gpio_key.12 being used by other systems to map to some other trigger, I put in the check that the gpio_key.12 is associated with power control (keys=116). '116' is supposedly linux generic power control in DTS. There is no uniq idSystem or idVendor for device /dev/input/event0 as you can see from udevadm output, therefore I tried to use the best available combination as a safety check. This patch will enable power control for any system vendor (Other than the one the patch in intended for) that describes in DTS, the trigger gpio_key.12 as power control (116).
SRU Request
==========
[Impact]
* User won't be able to initiate a soft shutdown from the chassis manager.
[Test Case]
* To reproduce this bug, initiate a soft shutdown from the chassis manager, for example from ilo you could do
<ilo> set node power off shutdown <node number>
[Test Result]
== BEFORE PATCH ==
$ cat /lib/udev/
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
ACTION=="remove", GOTO="power_
SUBSYSTEM=="input", KERNEL=="event*", SUBSYSTEMS=="acpi", TAG+="power-switch"
SUBSYSTEM=="input", KERNEL=="event*", KERNELS=
LABEL="
$
</>hpiLO-> set node power off shutdown c3n2
c3: #Cartridge 3
c3n2: #Node 2 Shutting node down gracefully
hpiLO-> show node list
Slot ID Proc Manufacturer Architecture Memory Power Health
---- ----- -------
3 c3n1 **** ARM Architecture 8 GB On OK
3 c3n2 **** ARM Architecture 8 GB On OK
3 c3n3 **** ARM Architecture 8 GB On OK
3 c3n4 **** ARM Architecture 8 GB Off OK
hpiLO->
== AFTER PATCH ==
hpiLO-> set node power off shutdown c3n1
c3: #Cartridge 3
c3n1: #Node 1 Shutting node down gracefully
hpiLO-> show node list
Slot ID Proc Manufacturer Architecture Memory Power Health
---- ----- -------
3 c3n1 **** ARM Architecture 8 GB Off OK
3 c3n2 **** ARM Architecture 8 GB On OK
3 c3n3 **** ARM Architecture 8 GB On OK
3 c3n4 **** ARM Architecture 8 GB Off OK
hpiLO->
[Regression Potential]
None.
Note: Regarding the possibility of gpio_key.12 being used by other systems to map to some other trigger, I put in the check that the gpio_key.12 is associated with power control (keys=116). '116' is supposedly linux generic power control in DTS.
Related branches
- Martin Pitt: Approve
- Adam Conrad: Pending requested
- Ubuntu branches: Pending requested
-
Diff: 25 lines (+8/-0)2 files modifieddebian/changelog (+7/-0)
src/login/70-power-switch.rules (+1/-0)
affects: | ubuntu → systemd (Ubuntu) |
Changed in systemd (Ubuntu): | |
status: | New → In Progress |
description: | updated |
Changed in systemd: | |
importance: | Unknown → Medium |
status: | Unknown → Confirmed |
Changed in systemd: | |
status: | Confirmed → Fix Released |
Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https:/ /wiki.ubuntu. com/Bugs/ FindRightPackag e. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.
To change the source package that this bug is filed about visit https:/ /bugs.launchpad .net/ubuntu/ +bug/1347776/ +editstatus and add the package name in the text box next to the word Package.
[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]