[opensuse] Yast module to configure ACPI power-button to suspend?
All, I'm looking for the openSuSE way to configure my laptop power-button to suspend instead of power-off. Is there a yast module or some similar app for tweaking ACPI config that avoids writing a custom event-handler from scratch? Is there a current event-handler that can be tweaked? I would like the power-button to activate suspend just like lid-close does. There are a number of lacpi_id listed during boot, e.g. $ dmesg | grep acpi [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1]) [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1]) [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1]) [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x03] high edge lint[0x1]) [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x04] high edge lint[0x1]) [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x05] high edge lint[0x1]) [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x06] high edge lint[0x1]) [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x07] high edge lint[0x1]) [ 0.162541] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5 [ 1.826877] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI] [ 1.829522] acpi PNP0A08:00: _OSC: OS now controls [PCIeHotplug PME AER PCIeCapability] [ 1.829524] acpi PNP0A08:00: FADT indicates ASPM is unsupported, using BIOS configuration [ 1.889085] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns [ 3.300854] acpi LNXPWRBN:00: hash matches [ 5.746644] acpi device:01: registered as cooling_device0 However, the only button interface configured in /proc/acpi/button is 'lid'? $ ll /proc/acpi/button/ total 0 dr-xr-xr-x 3 root root 0 May 14 12:45 lid On Leap 42.3 the kernel module for the button is present /lib/modules/4.4.126-48-default/kernel/drivers/acpi/button.ko What is the best way to configure the power-button to suspend? -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Op maandag 14 mei 2018 19:53:31 CEST schreef David C. Rankin:
All,
I'm looking for the openSuSE way to configure my laptop power-button to suspend instead of power-off. Is there a yast module or some similar app for tweaking ACPI config that avoids writing a custom event-handler from scratch? Is there a current event-handler that can be tweaked? I would like the power-button to activate suspend just like lid-close does.
There are a number of lacpi_id listed during boot, e.g.
$ dmesg | grep acpi [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1]) [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1]) [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1]) [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x03] high edge lint[0x1]) [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x04] high edge lint[0x1]) [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x05] high edge lint[0x1]) [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x06] high edge lint[0x1]) [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x07] high edge lint[0x1]) [ 0.162541] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5 [ 1.826877] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI] [ 1.829522] acpi PNP0A08:00: _OSC: OS now controls [PCIeHotplug PME AER PCIeCapability] [ 1.829524] acpi PNP0A08:00: FADT indicates ASPM is unsupported, using BIOS configuration [ 1.889085] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns [ 3.300854] acpi LNXPWRBN:00: hash matches [ 5.746644] acpi device:01: registered as cooling_device0
However, the only button interface configured in /proc/acpi/button is 'lid'?
$ ll /proc/acpi/button/ total 0 dr-xr-xr-x 3 root root 0 May 14 12:45 lid
On Leap 42.3 the kernel module for the button is present
/lib/modules/4.4.126-48-default/kernel/drivers/acpi/button.ko
What is the best way to configure the power-button to suspend? AFAIK no YaST module, but configurable in KDE and GNOME.
-- Gertjan Lettink a.k.a. Knurpht openSUSE Board Member openSUSE Forums Team -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 05/14/2018 01:26 PM, Knurpht @ openSUSE wrote:
What is the best way to configure the power-button to suspend? AFAIK no YaST module, but configurable in KDE and GNOME.
I guess we will have to find the source code for one of the modules and see how it is interfacing with acpica. There is virtually no documentation provided by the acpica package installed by default. What happens in KDE or Gnome is of little help for XFCE, fluxbox, Icewm, LXDE, etc... Since acpi isn't a desktop function, it seems like there should be a system-wide interface for configuring these events, rather than relying on the happenstance of having one WM installed verses another. acpica is new to me, as acpi was the general interface in the past with a simple config in /etc/acpi/handler.sh. Apparently acpica is what is integrated with the kernel code, so using it makes sense, but as with most latest-greatest tools, documentation is the last thing to be developed. As OS-Dev put it: "I didn't find any good description of integrating the ACPICA source code into an operating system, and the released package is basically just a bundle of C files with little organization." https://wiki.osdev.org/ACPICA And https://www.acpica.org/documentation -- isn't exactly user-centric, unless you are looking what it is: https://acpica.org/sites/acpica/files/ACPI-Introduction.pdf or the API/Programming Reference: https://acpica.org/sites/acpica/files/acpica-reference_18.pdf -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Mon, 14 May 2018 13:51:20 -0500 "David C. Rankin" <drankinatty@suddenlinkmail.com> wrote:
On 05/14/2018 01:26 PM, Knurpht @ openSUSE wrote:
What is the best way to configure the power-button to suspend? AFAIK no YaST module, but configurable in KDE and GNOME.
I guess we will have to find the source code for one of the modules and see how it is interfacing with acpica. There is virtually no documentation provided by the acpica package installed by default. What happens in KDE or Gnome is of little help for XFCE, fluxbox, Icewm, LXDE, etc...
There is an LXDE version as well. I expect there is for most if not all desktops.
Since acpi isn't a desktop function,
The control does seem to be implemented by desktops, I suppose since it affects the behaviour of the desktop.
it seems like there should be a system-wide interface for configuring these events, rather than relying on the happenstance of having one WM installed verses another.
acpica is new to me, as acpi was the general interface in the past with a simple config in /etc/acpi/handler.sh. Apparently acpica is what is integrated with the kernel code, so using it makes sense, but as with most latest-greatest tools, documentation is the last thing to be developed.
As OS-Dev put it: "I didn't find any good description of integrating the ACPICA source code into an operating system, and the released package is basically just a bundle of C files with little organization." https://wiki.osdev.org/ACPICA
And https://www.acpica.org/documentation -- isn't exactly user-centric, unless you are looking what it is: https://acpica.org/sites/acpica/files/ACPI-Introduction.pdf or the API/Programming Reference: https://acpica.org/sites/acpica/files/acpica-reference_18.pdf
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 05/14/2018 02:06 PM, Dave Howorth wrote:
There is an LXDE version as well. I expect there is for most if not all desktops.
Since acpi isn't a desktop function, The control does seem to be implemented by desktops, I suppose since it affects the behaviour of the desktop.
dh, (or anyone else) Can you check your box that has a config utility for acpi and let me know if you have *both* acpi and acpica installed? I'm beginning to suspect that those desktops that configure it have more than just acpica installed, e.g. $ rpm -qa | grep '^acpi' The package acpica alone does not provide /proc/acpi/events. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Op dinsdag 15 mei 2018 08:22:33 CEST schreef David C. Rankin:
On 05/14/2018 02:06 PM, Dave Howorth wrote:
There is an LXDE version as well. I expect there is for most if not all desktops.
Since acpi isn't a desktop function,
The control does seem to be implemented by desktops, I suppose since it affects the behaviour of the desktop.
dh, (or anyone else)
Can you check your box that has a config utility for acpi and let me know if you have *both* acpi and acpica installed? I'm beginning to suspect that those desktops that configure it have more than just acpica installed, e.g.
$ rpm -qa | grep '^acpi'
The package acpica alone does not provide /proc/acpi/events. On Tumbleweed: knurpht@Knurpht-HP:~> rpm -qa| grep '^acpi' acpica-20180313-1.1.x86_64 knurpht@Knurpht-HP:~>
-- Gertjan Lettink a.k.a. Knurpht openSUSE Board Member openSUSE Forums Team -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, 15 May 2018 01:22:33 -0500 "David C. Rankin" <drankinatty@suddenlinkmail.com> wrote:
On 05/14/2018 02:06 PM, Dave Howorth wrote:
There is an LXDE version as well. I expect there is for most if not all desktops.
Since acpi isn't a desktop function, The control does seem to be implemented by desktops, I suppose since it affects the behaviour of the desktop.
dh, (or anyone else)
Can you check your box that has a config utility for acpi and let me know if you have *both* acpi and acpica installed? I'm beginning to suspect that those desktops that configure it have more than just acpica installed, e.g.
$ rpm -qa | grep '^acpi'
$ rpm -qa | grep '^acpi' acpica-20170119-1.14.x86_64 I have no idea about anything to do with acpi. I just know I can control suspend/hibernate etc.
The package acpica alone does not provide /proc/acpi/events.
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2018-05-15 08:22, David C. Rankin wrote:
On 05/14/2018 02:06 PM, Dave Howorth wrote:
There is an LXDE version as well. I expect there is for most if not all desktops.
Since acpi isn't a desktop function, The control does seem to be implemented by desktops, I suppose since it affects the behaviour of the desktop.
dh, (or anyone else)
Can you check your box that has a config utility for acpi and let me know if you have *both* acpi and acpica installed? I'm beginning to suspect that those desktops that configure it have more than just acpica installed, e.g.
$ rpm -qa | grep '^acpi'
The package acpica alone does not provide /proc/acpi/events.
acpid-2.0.25-7.1.x86_64 acpica-20170119-1.14.x86_64 XFCE settings has one module for "power manager" where these things are configured. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
On 05/14/2018 11:26 AM, Knurpht @ openSUSE wrote:
Op maandag 14 mei 2018 19:53:31 CEST schreef David C. Rankin:
All,
I'm looking for the openSuSE way to configure my laptop power-button to suspend instead of power-off. Is there a yast module or some similar app for tweaking ACPI What is the best way to configure the power-button to suspend?
AFAIK no YaST module, but configurable in KDE and GNOME.
I know for certain this is also Desktop Configurable in LXDE and Xfce, and it is probably safe to assume it is so in the other desktops. Look under power management or something similar. -- -Gerry Makaro openSUSE Member openSUSE Forum Moderator openSUSE Contributor aka Fraser_Bell on the Forums, OBS, IRC, and mail at openSUSE.org Fraser-Bell on Github -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
David C. Rankin wrote:
All,
I'm looking for the openSuSE way to configure my laptop power-button to suspend instead of power-off. Is there a yast module or some similar app for tweaking ACPI config that avoids writing a custom event-handler from scratch? Is there a current event-handler that can be tweaked? I would like the power-button to activate suspend just like lid-close does.
Not really sure, but check /etc/systemd/logind.conf. It has #HandlePowerKey=poweroff #PowerKeyIgnoreInhibited=no -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 05/15/2018 05:00 AM, Peter Suetterlin wrote:
David C. Rankin wrote:
All,
I'm looking for the openSuSE way to configure my laptop power-button to suspend instead of power-off. Is there a yast module or some similar app for tweaking ACPI config that avoids writing a custom event-handler from scratch? Is there a current event-handler that can be tweaked? I would like the power-button to activate suspend just like lid-close does.
Not really sure, but check /etc/systemd/logind.conf. It has
#HandlePowerKey=poweroff #PowerKeyIgnoreInhibited=no
Peter - you are an Evil Genius! $ sudo vi /etc/systemd/login.conf /PowerKey yy $ p x :s/poweroff/suspend :wq result: $ grep HandlePowerKey /etc/systemd/logind.conf #HandlePowerKey=poweroff HandlePowerKey=suspend $ sudo systemctl daemon-reload (close xterm; logout; login) press powerbutton -- crap still shuts down (reboot probably required) ...box reboots...login to desktop... press powerbutton -- WHOOP -- Success -- suspended perfectly Thank you Peter -- know we know systemd is your interface to the acpica config! -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
David C. Rankin wrote:
On 05/15/2018 05:00 AM, Peter Suetterlin wrote:
Not really sure, but check /etc/systemd/logind.conf. It has
#HandlePowerKey=poweroff #PowerKeyIgnoreInhibited=no
Peter - you are an Evil Genius!
Too much praise ;^> I just remembered that I ended up there when looking for the lid button some time ago...
$ grep HandlePowerKey /etc/systemd/logind.conf #HandlePowerKey=poweroff HandlePowerKey=suspend
Yes, that's what I would have tried, too.
$ sudo systemctl daemon-reload
Maybe that should have been a 'restart systemd-logind'
press powerbutton -- WHOOP -- Success -- suspended perfectly
:)
Thank you Peter -- know we know systemd is your interface to the acpica config!
Well, I guess we're close to the point that it is easier to remeber the things that have not (yet...) been absorbed by systemd *eg* -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (6)
-
Carlos E. R.
-
Dave Howorth
-
David C. Rankin
-
Fraser_Bell
-
Knurpht @ openSUSE
-
Peter Suetterlin