touch-packages team mailing list archive
-
touch-packages team
-
Mailing list archive
-
Message #08325
[Bug 1354306] Re: gpio shutdown trigger for ProLiant m400 cartridges
Launchpad has imported 1 comments from the remote bug at
https://bugs.freedesktop.org/show_bug.cgi?id=82347.
If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.
------------------------------------------------------------------------
On 2014-08-08T13:01:28+00:00 dann frazier wrote:
There are a couple of ARM-based server systems that use the gpio-
keyboard and gpio-keyboard-polled drivers to send an event requesting a
shutdown. The following rules DTRT, though obviously it'd be nice if a
more generic (but still safe) rule could be devised.
SUBSYSTEM=="input", KERNEL=="event*", SUBSYSTEMS=="platform", KERNELS
=="gpio-keys.6", PROGRAM="/bin/grep '^HP ProLiant m400 Server
Cartridge$' /proc/device-tree/model", TAG+="power-switch"
SUBSYSTEM=="input", KERNEL=="event*", SUBSYSTEMS=="platform", KERNELS=="gpio_keys.12", ATTRS{keys}=="116", PROGRAM="/bin/cat /proc/device-tree/model", RESULT=="HP ProLiant m800 Server Cartridge", TAG+="power-switch"
You'll notice a couple of differences between the two. The m800 rule
specifies a key attribute where the m400 rule does not. This is because
the first uses a polled gpio via the gpio-keyboard-polled driver. This
driver does not expose a "keys" attribute in sysfs. The m400 uses the
gpio-keyboard driver, which does.
You'll also notice the grep vs. cat/RESULT methods. Not sure if upstream
has a preference.
It might make sense to drop the model/pin matching of the m800 rule, and
bind to any ATTR{keys}=="116" - this is defined as KEY_POWER in
<linux/input.h>. Of course, that won't help the -polled variant.
Reply at:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1354306/comments/4
** Changed in: systemd
Status: Unknown => Confirmed
** Changed in: systemd
Importance: Unknown => Medium
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1354306
Title:
gpio shutdown trigger for ProLiant m400 cartridges
Status in systemd:
Confirmed
Status in “systemd” package in Ubuntu:
Triaged
Bug description:
Similar to the m800 case in LP: #1347776, udev/systemd also needs to
know how to trigger a graceful shutdown on ProLiant m400 cartridges.
[Impact]
Without this change, the power down button will not initiate an OS shutdown on this platform.
[Test Case]
Push button. Watch poweroff occur.
[Regression Potential]
The new rule is pretty tightly bound to the m400 system - so the risk of this rule matching and impacting behavior on a different platform is minimal. This will presumably cause new code to run and read /proc/device-tree/model on other platforms - but this is already done for the m800 system in both utopic and trusty.
To manage notifications about this bug go to:
https://bugs.launchpad.net/systemd/+bug/1354306/+subscriptions
References