[Touch-packages] [Bug 1347776] Re: shutdown trigger on gpio_keys.X for armhf hardware
** Changed in: systemd Status: Confirmed => Fix Released -- 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/1347776 Title: shutdown trigger on gpio_keys.X for armhf hardware Status in systemd: Fix Released Status in systemd package in Ubuntu: Fix Released Status in systemd source package in Trusty: Fix Released Status in systemd source package in Utopic: Fix Released 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-switch.rules to initiate soft shutdown of the cartridge from ilo. Here is the udevadm output for /dev/input/event0 sudo udevadm info --query=all --name=/dev/input/event0 --attribute- walk 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/soc.3/gpio_keys.12/input/input0/event0': KERNEL=="event0" SUBSYSTEM=="input" DRIVER=="" looking at parent device '/devices/soc.3/gpio_keys.12/input/input0': KERNELS=="input0" SUBSYSTEMS=="input" DRIVERS=="" ATTRS{name}=="gpio_keys.12" ATTRS{phys}=="gpio-keys/input0" ATTRS{uniq}=="" ATTRS{properties}=="0" looking at parent device '/devices/soc.3/gpio_keys.12': KERNELS=="gpio_keys.12" SUBSYSTEMS=="platform" DRIVERS=="gpio-keys" ATTRS{keys}=="116" ATTRS{switches}=="" ATTRS{disabled_keys}=="" ATTRS{disabled_switches}=="" looking at parent device '/devices/soc.3': KERNELS=="soc.3" SUBSYSTEMS=="platform" 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 set node power off shutdown [Test Result] == BEFORE PATCH == $ cat /lib/udev/rules.d/70-power-switch.rules # 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_switch_end" SUBSYSTEM=="input", KERNEL=="event*", SUBSYSTEMS=="acpi", TAG+="power-switch" SUBSYSTEM=="input", KERNEL=="event*", KERNELS=="thinkpad_acpi", TAG+="power-switch" LABEL="power_switch_end" $ 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. To manage notifications about this bug go to: https://bugs.launchpad.net/systemd/+bug/1347776/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages
[Touch-packages] [Bug 1347776] Re: shutdown trigger on gpio_keys.X for armhf hardware
I added the keys sysfs attribute to gpio-keys-polled.c. Please try this patch (should apply on ubuntu-linux 4.3). diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c index 11e77a9..3a8ee50 100644 --- a/drivers/input/keyboard/gpio_keys_polled.c +++ b/drivers/input/keyboard/gpio_keys_polled.c @@ -43,6 +43,85 @@ struct gpio_keys_polled_dev { struct gpio_keys_button_data data[0]; }; +/** + * get_n_events_by_type() - returns maximum number of events per @type + * @type: type of button (%EV_KEY, %EV_SW) + * + * Return value of this function can be used to allocate bitmap + * large enough to hold all bits for given type. + */ +static inline int get_n_events_by_type(int type) +{ + BUG_ON(type != EV_SW && type != EV_KEY); + + return (type == EV_KEY) ? KEY_CNT : SW_CNT; +} + +/** + * gpio_keys_polled_attr_show_helper() - fill in stringified bitmap of buttons + * @ddata: pointer to drvdata + * @buf: buffer where stringified bitmap is written + * @type: button type (%EV_KEY, %EV_SW) + * + * Returns 0 on success or negative errno on failure. + */ +static ssize_t gpio_keys_polled_attr_show_helper( + struct gpio_keys_polled_dev *ddata, + char *buf, unsigned int type) +{ + int n_events = get_n_events_by_type(type); + unsigned long *bits; + ssize_t ret; + int i; + + bits = kcalloc(BITS_TO_LONGS(n_events), sizeof(*bits), GFP_KERNEL); + if (!bits) + return -ENOMEM; + + for (i = 0; i < ddata->pdata->nbuttons; i++) { + struct gpio_keys_button *bdata = >pdata->buttons[i]; + + if (bdata->type != type) + continue; + + __set_bit(bdata->code, bits); + } + + ret = scnprintf(buf, PAGE_SIZE - 1, "%*pbl", n_events, bits); + buf[ret++] = '\n'; + buf[ret] = '\0'; + + kfree(bits); + + return ret; +} + +static ssize_t gpio_keys_polled_show_keys(struct device *dev, +struct device_attribute *attr, +char *buf) +{ + struct platform_device *pdev = to_platform_device(dev); + struct gpio_keys_polled_dev *ddata = platform_get_drvdata(pdev); + + return gpio_keys_polled_attr_show_helper(ddata, buf, EV_KEY); +} + +/* + * ATTRIBUTES: + * + * /sys/devices/platform/gpio-keys-polled/keys [ro] + */ +static DEVICE_ATTR(keys, S_IRUGO, gpio_keys_polled_show_keys, NULL); + +static struct attribute *gpio_keys_polled_attrs[] = { + _attr_keys.attr, + NULL, +}; + +static struct attribute_group gpio_keys_polled_attr_group = { + .attrs = gpio_keys_polled_attrs, +}; + static void gpio_keys_polled_check_state(struct input_dev *input, struct gpio_keys_button *button, struct gpio_keys_button_data *bdata) @@ -286,6 +365,13 @@ static int gpio_keys_polled_probe(struct platform_device *pdev) bdev->pdata = pdata; platform_set_drvdata(pdev, bdev); + error = sysfs_create_group(>dev.kobj, _keys_polled_attr_group); + if (error) { + dev_err(dev, "Unable to export keys, error: %d\n", + error); + return error; + } + error = input_register_polled_device(poll_dev); if (error) { dev_err(dev, "unable to register polled device, err=%d\n", -- 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/1347776 Title: shutdown trigger on gpio_keys.X for armhf hardware Status in systemd: Confirmed Status in systemd package in Ubuntu: Fix Released Status in systemd source package in Trusty: Fix Released Status in systemd source package in Utopic: Fix Released 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-switch.rules to initiate soft shutdown of the cartridge from ilo. Here is the udevadm output for /dev/input/event0 sudo udevadm info --query=all --name=/dev/input/event0 --attribute- walk 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/soc.3/gpio_keys.12/input/input0/event0': KERNEL=="event0" SUBSYSTEM=="input" DRIVER=="" looking at parent device '/devices/soc.3/gpio_keys.12/input/input0': KERNELS=="input0" SUBSYSTEMS=="input" DRIVERS=="" ATTRS{name}=="gpio_keys.12" ATTRS{phys}=="gpio-keys/input0"
[Touch-packages] [Bug 1347776] Re: shutdown trigger on gpio_keys.X for armhf hardware
gpio-keys-polled: add sysfs bitmask to export supported keycodes ** Patch added: "gpio-keys-polled-sysfs-keys.patch" https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1347776/+attachment/4529893/+files/gpio-keys-polled-sysfs-keys.patch -- 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/1347776 Title: shutdown trigger on gpio_keys.X for armhf hardware Status in systemd: Confirmed Status in systemd package in Ubuntu: Fix Released Status in systemd source package in Trusty: Fix Released Status in systemd source package in Utopic: Fix Released 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-switch.rules to initiate soft shutdown of the cartridge from ilo. Here is the udevadm output for /dev/input/event0 sudo udevadm info --query=all --name=/dev/input/event0 --attribute- walk 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/soc.3/gpio_keys.12/input/input0/event0': KERNEL=="event0" SUBSYSTEM=="input" DRIVER=="" looking at parent device '/devices/soc.3/gpio_keys.12/input/input0': KERNELS=="input0" SUBSYSTEMS=="input" DRIVERS=="" ATTRS{name}=="gpio_keys.12" ATTRS{phys}=="gpio-keys/input0" ATTRS{uniq}=="" ATTRS{properties}=="0" looking at parent device '/devices/soc.3/gpio_keys.12': KERNELS=="gpio_keys.12" SUBSYSTEMS=="platform" DRIVERS=="gpio-keys" ATTRS{keys}=="116" ATTRS{switches}=="" ATTRS{disabled_keys}=="" ATTRS{disabled_switches}=="" looking at parent device '/devices/soc.3': KERNELS=="soc.3" SUBSYSTEMS=="platform" 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 set node power off shutdown [Test Result] == BEFORE PATCH == $ cat /lib/udev/rules.d/70-power-switch.rules # 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_switch_end" SUBSYSTEM=="input", KERNEL=="event*", SUBSYSTEMS=="acpi", TAG+="power-switch" SUBSYSTEM=="input", KERNEL=="event*", KERNELS=="thinkpad_acpi", TAG+="power-switch" LABEL="power_switch_end" $ 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. To manage notifications about this bug go to:
[Touch-packages] [Bug 1347776] Re: shutdown trigger on gpio_keys.X for armhf hardware
This bug was fixed in the package systemd - 204-5ubuntu20.4 --- systemd (204-5ubuntu20.4) trusty-proposed; urgency=medium * Add HP ProLiant m800 Server Cartridge power control support. The cartridge uses gpio_keys.12 to emulate shutdown. (LP: #1347776) -- Manoj Iyer manoj.i...@canonical.com Mon, 21 Jul 2014 17:58:06 -0500 ** Changed in: systemd (Ubuntu Trusty) Status: Fix Committed = Fix Released -- 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/1347776 Title: shutdown trigger on gpio_keys.X for armhf hardware Status in systemd: Confirmed Status in “systemd” package in Ubuntu: Fix Released Status in “systemd” source package in Trusty: Fix Released Status in “systemd” source package in Utopic: Fix Released 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-switch.rules to initiate soft shutdown of the cartridge from ilo. Here is the udevadm output for /dev/input/event0 sudo udevadm info --query=all --name=/dev/input/event0 --attribute- walk 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/soc.3/gpio_keys.12/input/input0/event0': KERNEL==event0 SUBSYSTEM==input DRIVER== looking at parent device '/devices/soc.3/gpio_keys.12/input/input0': KERNELS==input0 SUBSYSTEMS==input DRIVERS== ATTRS{name}==gpio_keys.12 ATTRS{phys}==gpio-keys/input0 ATTRS{uniq}== ATTRS{properties}==0 looking at parent device '/devices/soc.3/gpio_keys.12': KERNELS==gpio_keys.12 SUBSYSTEMS==platform DRIVERS==gpio-keys ATTRS{keys}==116 ATTRS{switches}== ATTRS{disabled_keys}== ATTRS{disabled_switches}== looking at parent device '/devices/soc.3': KERNELS==soc.3 SUBSYSTEMS==platform 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/rules.d/70-power-switch.rules # 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_switch_end SUBSYSTEM==input, KERNEL==event*, SUBSYSTEMS==acpi, TAG+=power-switch SUBSYSTEM==input, KERNEL==event*, KERNELS==thinkpad_acpi, TAG+=power-switch LABEL=power_switch_end $ /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
[Touch-packages] [Bug 1347776] Re: shutdown trigger on gpio_keys.X for armhf hardware
** Bug watch added: freedesktop.org Bugzilla #82347 https://bugs.freedesktop.org/show_bug.cgi?id=82347 ** Also affects: systemd via https://bugs.freedesktop.org/show_bug.cgi?id=82347 Importance: Unknown Status: Unknown -- 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/1347776 Title: shutdown trigger on gpio_keys.X for armhf hardware Status in systemd: Unknown Status in “systemd” package in Ubuntu: Fix Released Status in “systemd” source package in Trusty: Fix Committed Status in “systemd” source package in Utopic: Fix Released 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-switch.rules to initiate soft shutdown of the cartridge from ilo. Here is the udevadm output for /dev/input/event0 sudo udevadm info --query=all --name=/dev/input/event0 --attribute- walk 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/soc.3/gpio_keys.12/input/input0/event0': KERNEL==event0 SUBSYSTEM==input DRIVER== looking at parent device '/devices/soc.3/gpio_keys.12/input/input0': KERNELS==input0 SUBSYSTEMS==input DRIVERS== ATTRS{name}==gpio_keys.12 ATTRS{phys}==gpio-keys/input0 ATTRS{uniq}== ATTRS{properties}==0 looking at parent device '/devices/soc.3/gpio_keys.12': KERNELS==gpio_keys.12 SUBSYSTEMS==platform DRIVERS==gpio-keys ATTRS{keys}==116 ATTRS{switches}== ATTRS{disabled_keys}== ATTRS{disabled_switches}== looking at parent device '/devices/soc.3': KERNELS==soc.3 SUBSYSTEMS==platform 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/rules.d/70-power-switch.rules # 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_switch_end SUBSYSTEM==input, KERNEL==event*, SUBSYSTEMS==acpi, TAG+=power-switch SUBSYSTEM==input, KERNEL==event*, KERNELS==thinkpad_acpi, TAG+=power-switch LABEL=power_switch_end $ /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. To manage notifications about this bug go to: https://bugs.launchpad.net/systemd/+bug/1347776/+subscriptions -- Mailing list:
[Touch-packages] [Bug 1347776] Re: shutdown trigger on gpio_keys.X for armhf hardware
This bug was fixed in the package systemd - 208-7ubuntu4 --- systemd (208-7ubuntu4) utopic; urgency=medium * Lower Breaks: to lvm2 again. Our lvm2 package has always used udev for device setup, and thus should be compatible with systemd, too. -- Martin Pitt martin.p...@ubuntu.com Thu, 07 Aug 2014 07:11:28 +0200 ** Changed in: systemd (Ubuntu Utopic) Status: Fix Committed = Fix Released -- 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/1347776 Title: shutdown trigger on gpio_keys.X for armhf hardware Status in “systemd” package in Ubuntu: Fix Released Status in “systemd” source package in Trusty: Fix Committed Status in “systemd” source package in Utopic: Fix Released 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-switch.rules to initiate soft shutdown of the cartridge from ilo. Here is the udevadm output for /dev/input/event0 sudo udevadm info --query=all --name=/dev/input/event0 --attribute- walk 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/soc.3/gpio_keys.12/input/input0/event0': KERNEL==event0 SUBSYSTEM==input DRIVER== looking at parent device '/devices/soc.3/gpio_keys.12/input/input0': KERNELS==input0 SUBSYSTEMS==input DRIVERS== ATTRS{name}==gpio_keys.12 ATTRS{phys}==gpio-keys/input0 ATTRS{uniq}== ATTRS{properties}==0 looking at parent device '/devices/soc.3/gpio_keys.12': KERNELS==gpio_keys.12 SUBSYSTEMS==platform DRIVERS==gpio-keys ATTRS{keys}==116 ATTRS{switches}== ATTRS{disabled_keys}== ATTRS{disabled_switches}== looking at parent device '/devices/soc.3': KERNELS==soc.3 SUBSYSTEMS==platform 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/rules.d/70-power-switch.rules # 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_switch_end SUBSYSTEM==input, KERNEL==event*, SUBSYSTEMS==acpi, TAG+=power-switch SUBSYSTEM==input, KERNEL==event*, KERNELS==thinkpad_acpi, TAG+=power-switch LABEL=power_switch_end $ /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
[Touch-packages] [Bug 1347776] Re: shutdown trigger on gpio_keys.X for armhf hardware
With the package from the proposed it seems to be working fine. I have verified the same. Thanks, Pradeep. ** Tags removed: verification-needed ** Tags added: verification-done -- 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/1347776 Title: shutdown trigger on gpio_keys.X for armhf hardware Status in “systemd” package in Ubuntu: Fix Committed Status in “systemd” source package in Trusty: Fix Committed Status in “systemd” source package in Utopic: Fix Committed 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-switch.rules to initiate soft shutdown of the cartridge from ilo. Here is the udevadm output for /dev/input/event0 sudo udevadm info --query=all --name=/dev/input/event0 --attribute- walk 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/soc.3/gpio_keys.12/input/input0/event0': KERNEL==event0 SUBSYSTEM==input DRIVER== looking at parent device '/devices/soc.3/gpio_keys.12/input/input0': KERNELS==input0 SUBSYSTEMS==input DRIVERS== ATTRS{name}==gpio_keys.12 ATTRS{phys}==gpio-keys/input0 ATTRS{uniq}== ATTRS{properties}==0 looking at parent device '/devices/soc.3/gpio_keys.12': KERNELS==gpio_keys.12 SUBSYSTEMS==platform DRIVERS==gpio-keys ATTRS{keys}==116 ATTRS{switches}== ATTRS{disabled_keys}== ATTRS{disabled_switches}== looking at parent device '/devices/soc.3': KERNELS==soc.3 SUBSYSTEMS==platform 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/rules.d/70-power-switch.rules # 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_switch_end SUBSYSTEM==input, KERNEL==event*, SUBSYSTEMS==acpi, TAG+=power-switch SUBSYSTEM==input, KERNEL==event*, KERNELS==thinkpad_acpi, TAG+=power-switch LABEL=power_switch_end $ /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. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1347776/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net
[Touch-packages] [Bug 1347776] Re: shutdown trigger on gpio_keys.X for armhf hardware
I tested the systemd package from proposed and it works as expected. Below are the test results: ubuntu@ubuntu:~$ sudo apt-get dist-upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages will be upgraded: accountsservice apport apt apt-transport-https apt-utils base-files bsdutils byobu cloud-init dbus dpkg file gcc-4.9-base gnupg gpgv grub-legacy-ec2 initramfs-tools initramfs-tools-bin language-selector-common libaccountsservice0 libapt-inst1.5 libapt-pkg4.12 libblkid1 libboost-iostreams1.54.0 libc-bin libc6 libcgmanager0 libdbus-1-3 libgcc1 libjson-c2 libjson0 libmagic1 libmount1 libpam-systemd libssl1.0.0 libsystemd-daemon0 libsystemd-login0 libtasn1-6 libudev1 libuuid1 libxml2 mount multiarch-support net-tools openssl python3-apport python3-distupgrade python3-gi python3-problem-report resolvconf systemd-services tzdata ubuntu-release-upgrader-core udev upstart util-linux uuid-runtime ubuntu@ubuntu:~$ cat /lib/udev/rules.d/70-power-switch.rules # 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_switch_end SUBSYSTEM==input, KERNEL==event*, SUBSYSTEMS==acpi, TAG+=power-switch SUBSYSTEM==input, KERNEL==event*, KERNELS==thinkpad_acpi, 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 LABEL=power_switch_end ubuntu@ubuntu:~$ /hpiLO- show node list Slot IDProc Manufacturer Architecture Memory Power Health - -- -- - -- 3 c3n1 8 GB Off OK 3 c3n2 8 GB OnOK 3 c3n3 8 GB Off OK 3 c3n4 8 GB OnOK hpiLO- hpiLO- set node power off shutdown c3n4 c3: #Cartridge 3 c3n4: #Node 4 Shutting node down gracefully hpiLO- ubuntu@ubuntu:~$ Broadcast message from root@ubuntu (unknown) at 19:40 ... The system is going down for power off NOW! Connection to 192.168.17.25 closed by remote host. Connection to 192.168.17.25 closed. ubuntu@sm2:~$ hpiLO- show node list Slot IDProc Manufacturer Architecture Memory Power Health - -- -- - -- 3 c3n1 8 GB Off OK 3 c3n2 8 GB OnOK 3 c3n3 8 GB Off OK 3 c3n4 8 GB Off OK hpiLO- -- 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/1347776 Title: shutdown trigger on gpio_keys.X for armhf hardware Status in “systemd” package in Ubuntu: Fix Committed Status in “systemd” source package in Trusty: Fix Committed Status in “systemd” source package in Utopic: Fix Committed 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-switch.rules to initiate soft shutdown of the cartridge from ilo. Here is the udevadm output for /dev/input/event0 sudo udevadm info --query=all --name=/dev/input/event0 --attribute- walk 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/soc.3/gpio_keys.12/input/input0/event0': KERNEL==event0 SUBSYSTEM==input DRIVER== looking at parent device '/devices/soc.3/gpio_keys.12/input/input0': KERNELS==input0 SUBSYSTEMS==input DRIVERS== ATTRS{name}==gpio_keys.12 ATTRS{phys}==gpio-keys/input0 ATTRS{uniq}== ATTRS{properties}==0 looking at parent device '/devices/soc.3/gpio_keys.12': KERNELS==gpio_keys.12 SUBSYSTEMS==platform DRIVERS==gpio-keys ATTRS{keys}==116 ATTRS{switches}== ATTRS{disabled_keys}== ATTRS{disabled_switches}== looking at parent device '/devices/soc.3': KERNELS==soc.3 SUBSYSTEMS==platform DRIVERS== Regarding the possibility of gpio_key.12 being used by other systems to map to some
[Touch-packages] [Bug 1347776] Re: shutdown trigger on gpio_keys.X for armhf hardware
Committed to packaging git for utopic: http://anonscm.debian.org/gitweb/?p=pkg- systemd/systemd.git;a=commitdiff;h=47c10f310 I also uploaded that fix to trusty's SRU review queue. ** Changed in: systemd (Ubuntu Utopic) Status: In Progress = Fix Committed ** Changed in: systemd (Ubuntu Trusty) Status: New = In Progress ** Changed in: systemd (Ubuntu Trusty) Assignee: (unassigned) = Manoj Iyer (manjo) -- 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/1347776 Title: shutdown trigger on gpio_keys.X for armhf hardware Status in “systemd” package in Ubuntu: Fix Committed Status in “systemd” source package in Trusty: In Progress Status in “systemd” source package in Utopic: Fix Committed 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-switch.rules to initiate soft shutdown of the cartridge from ilo. Here is the udevadm output for /dev/input/event0 sudo udevadm info --query=all --name=/dev/input/event0 --attribute- walk 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/soc.3/gpio_keys.12/input/input0/event0': KERNEL==event0 SUBSYSTEM==input DRIVER== looking at parent device '/devices/soc.3/gpio_keys.12/input/input0': KERNELS==input0 SUBSYSTEMS==input DRIVERS== ATTRS{name}==gpio_keys.12 ATTRS{phys}==gpio-keys/input0 ATTRS{uniq}== ATTRS{properties}==0 looking at parent device '/devices/soc.3/gpio_keys.12': KERNELS==gpio_keys.12 SUBSYSTEMS==platform DRIVERS==gpio-keys ATTRS{keys}==116 ATTRS{switches}== ATTRS{disabled_keys}== ATTRS{disabled_switches}== looking at parent device '/devices/soc.3': KERNELS==soc.3 SUBSYSTEMS==platform 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). To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1347776/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1347776] Re: shutdown trigger on gpio_keys.X for armhf hardware
Hello Manoj, or anyone else affected, Accepted systemd into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/systemd/204-5ubuntu20.4 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance! ** Changed in: systemd (Ubuntu Trusty) Status: In Progress = Fix Committed ** Tags added: verification-needed -- 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/1347776 Title: shutdown trigger on gpio_keys.X for armhf hardware Status in “systemd” package in Ubuntu: Fix Committed Status in “systemd” source package in Trusty: Fix Committed Status in “systemd” source package in Utopic: Fix Committed 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-switch.rules to initiate soft shutdown of the cartridge from ilo. Here is the udevadm output for /dev/input/event0 sudo udevadm info --query=all --name=/dev/input/event0 --attribute- walk 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/soc.3/gpio_keys.12/input/input0/event0': KERNEL==event0 SUBSYSTEM==input DRIVER== looking at parent device '/devices/soc.3/gpio_keys.12/input/input0': KERNELS==input0 SUBSYSTEMS==input DRIVERS== ATTRS{name}==gpio_keys.12 ATTRS{phys}==gpio-keys/input0 ATTRS{uniq}== ATTRS{properties}==0 looking at parent device '/devices/soc.3/gpio_keys.12': KERNELS==gpio_keys.12 SUBSYSTEMS==platform DRIVERS==gpio-keys ATTRS{keys}==116 ATTRS{switches}== ATTRS{disabled_keys}== ATTRS{disabled_switches}== looking at parent device '/devices/soc.3': KERNELS==soc.3 SUBSYSTEMS==platform 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/rules.d/70-power-switch.rules # 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_switch_end SUBSYSTEM==input, KERNEL==event*, SUBSYSTEMS==acpi, TAG+=power-switch SUBSYSTEM==input, KERNEL==event*, KERNELS==thinkpad_acpi, TAG+=power-switch LABEL=power_switch_end $ /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
[Touch-packages] [Bug 1347776] Re: shutdown trigger on gpio_keys.X for armhf hardware
** Description changed: Some ARM board uses GPIO gpio_key.12 for power control (key=116). The proposed patch adds entry to logind's 70-power-switch.rules to initiate soft shutdown of the cartridge from ilo. Here is the udevadm output for /dev/input/event0 sudo udevadm info --query=all --name=/dev/input/event0 --attribute-walk 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/soc.3/gpio_keys.12/input/input0/event0': - KERNEL==event0 - SUBSYSTEM==input - DRIVER== + looking at device '/devices/soc.3/gpio_keys.12/input/input0/event0': + KERNEL==event0 + SUBSYSTEM==input + DRIVER== - looking at parent device '/devices/soc.3/gpio_keys.12/input/input0': - KERNELS==input0 - SUBSYSTEMS==input - DRIVERS== - ATTRS{name}==gpio_keys.12 - ATTRS{phys}==gpio-keys/input0 - ATTRS{uniq}== - ATTRS{properties}==0 + looking at parent device '/devices/soc.3/gpio_keys.12/input/input0': + KERNELS==input0 + SUBSYSTEMS==input + DRIVERS== + ATTRS{name}==gpio_keys.12 + ATTRS{phys}==gpio-keys/input0 + ATTRS{uniq}== + ATTRS{properties}==0 - looking at parent device '/devices/soc.3/gpio_keys.12': - KERNELS==gpio_keys.12 - SUBSYSTEMS==platform - DRIVERS==gpio-keys - ATTRS{keys}==116 - ATTRS{switches}== - ATTRS{disabled_keys}== - ATTRS{disabled_switches}== + looking at parent device '/devices/soc.3/gpio_keys.12': + KERNELS==gpio_keys.12 + SUBSYSTEMS==platform + DRIVERS==gpio-keys + ATTRS{keys}==116 + ATTRS{switches}== + ATTRS{disabled_keys}== + ATTRS{disabled_switches}== - looking at parent device '/devices/soc.3': - KERNELS==soc.3 - SUBSYSTEMS==platform - DRIVERS== + looking at parent device '/devices/soc.3': + KERNELS==soc.3 + SUBSYSTEMS==platform + 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/rules.d/70-power-switch.rules + # 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_switch_end + + SUBSYSTEM==input, KERNEL==event*, SUBSYSTEMS==acpi, TAG+=power-switch + SUBSYSTEM==input, KERNEL==event*, KERNELS==thinkpad_acpi, TAG+=power-switch + + LABEL=power_switch_end + $ + + /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. -- You received
[Touch-packages] [Bug 1347776] Re: shutdown trigger on gpio_keys.X for armhf hardware
** Package changed: ubuntu = systemd (Ubuntu) ** Changed in: systemd (Ubuntu) Status: New = In Progress ** Also affects: systemd (Ubuntu Trusty) Importance: Undecided Status: New ** Also affects: systemd (Ubuntu Utopic) Importance: Undecided Status: In Progress -- 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/1347776 Title: shutdown trigger on gpio_keys.X for armhf hardware Status in “systemd” package in Ubuntu: In Progress Status in “systemd” source package in Trusty: New Status in “systemd” source package in Utopic: In Progress 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-switch.rules to initiate soft shutdown of the cartridge from ilo. Here is the udevadm output for /dev/input/event0 sudo udevadm info --query=all --name=/dev/input/event0 --attribute- walk 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/soc.3/gpio_keys.12/input/input0/event0': KERNEL==event0 SUBSYSTEM==input DRIVER== looking at parent device '/devices/soc.3/gpio_keys.12/input/input0': KERNELS==input0 SUBSYSTEMS==input DRIVERS== ATTRS{name}==gpio_keys.12 ATTRS{phys}==gpio-keys/input0 ATTRS{uniq}== ATTRS{properties}==0 looking at parent device '/devices/soc.3/gpio_keys.12': KERNELS==gpio_keys.12 SUBSYSTEMS==platform DRIVERS==gpio-keys ATTRS{keys}==116 ATTRS{switches}== ATTRS{disabled_keys}== ATTRS{disabled_switches}== looking at parent device '/devices/soc.3': KERNELS==soc.3 SUBSYSTEMS==platform 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). To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1347776/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp