On 02-13-2024 04:34PM, -pj via openSUSE Users wrote:
On 02-13-2024 05:59AM, Carlos E. R. wrote:
On 2024-02-13 00:13, -pj via openSUSE Users wrote:
On 02-12-2024 02:43PM, Carlos E. R. wrote:
On 2024-02-12 21:27, -pj via openSUSE Users wrote:
Maybe the machine keeps the keyboard powered (so that you can press a key to awake it) and this requires the PSU to run in another state. So perhaps disable keyboard wake up.
Thank you for your advice. I proceeded to review this website for more information in my search for an answer. https://shallowsky.com/blog/linux/kernel/no-mouse-kbd-wakeup.html
I then opened Konsole and passed the following command: cat /proc/acpi/wakeup
Device S-state Status Sysfs node LAN S5 *enabled pci:0000:00:19.0 ... KBC0 S4 *enabled pnp:00:06 *enabled serio:serio0 MSE0 S4 *disabled PWRB S3 *enabled platform:PNP0C0C:00
I see KBC0 listed as enabled above and passed: Thinkcentre-M57p:~ # echo KBC0 >/proc/acpi/wakeup
Suspend works well now with machine PSU shut off and only a flashing monitor and machine case power button light! Unsuspend works by only depressing the machines power button now also. :]
Nice :-)
When I powercycle and complete login, attempting to suspend the machine again results into a semi-failure suspend state as prior.
My question for you now is which file to modify in openSUSE Tumbleweed in order to get this wonderful command persistent between boots and upgrades? Am I able to modify a certain file by inserting just "echo KBC0 >/proc/acpi/wakeup" in it?
Certainly.
/etc/rc.local is not shown in the current filesystem, maybe because it was system IV related.
It would be "/etc/init.d/", and there I still have:
after.local boot.localhw boot.local
Not sure if they still work, and I am on Leap.
you can create your own systemd service to do things. Mine (calls a script):
Telcontar:~ # cat /etc/systemd/system/helloworld.service [Unit] Description=Plays a welcome sound when target multi-user is reached After=multi-user.target # graphical.target - multi-user.target
[Service] Type=oneshot RemainAfterExit=true StandardOutput=tty ExecStart=-/root/ThingsNeededForBoot/helloworld
[Install] WantedBy=multi-user.target WantedBy=graphical.target Telcontar:~ #
Hi, thanks for this information. I believe I have been able to create a working systemd service that persists (after powercycle), on this machine to allow the HP PS/2 Keyboard to power off, when suspend is envoked. The following is what I have done:
I reviewed this article: https://www.suse.com/support/kb/doc/?id=000019672
Do you think the Type=simple (in article above) is adequate for this keyboard situation?
Do you think the Type=oneshot is better for this situation?
Why is # graphical.target - multi-user.target not active in your example?
I then looked at your example provided above. I decided to implement your example above. Shown below is what I have done. >:| --------------------------------------------------------------------- Thinkcentre-M57p:/etc/systemd/system> ls -lah -rwxr-xr-x 1 root root 312 Feb 13 15:15 HP-PS2-Keyboard.service --------------------------------------------------------------------- Thinkcentre-M57p:/etc/systemd/system> locate HP-PS2-Keyboard.service /etc/systemd/system/HP-PS2-Keyboard.service /etc/systemd/system/graphical.target.wants/HP-PS2-Keyboard.service /etc/systemd/system/multi-user.target.wants/HP-PS2-Keyboard.service -------------------------------------------------------------------- Thinkcentre-M57p:/etc/systemd/system> cat HP-PS2-Keyboard.service [Unit] Description=Disable PS/2 style keyboard power when sleep state is envoked on this machine After=multi-user.target # graphical.target - multi-user.target
[Service] Type=oneshot RemainAfterExit=true StandardOutput=tty ExecStart=-/usr/sbin/HP-PS2-Keyboard.sh
[Install] WantedBy=multi-user.target WantedBy=graphical.target ---------------------------------------------------------------------- Thinkcentre-M57p:/usr/sbin> locate HP-PS2-Keyboard.sh /usr/sbin/HP-PS2-Keyboard.sh ------------------------------------------------------------------------ Thinkcentre-M57p:/usr/sbin> ls -lah -rwxr-xr-x 1 root root 93 Feb 13 15:28 HP-PS2-Keyboard.sh <- Should this script file have to have a .sh extension? The other files in /usr/sbin do not have .sh extensions shown. ------------------------------------------------------------------------ Thinkcentre-M57p:/usr/sbin> cat HP-PS2-Keyboard.sh #!/bin/bash echo KBC0 >/proc/acpi/wakeup echo "the script works" >> /tmp/HP-PS2-Keyboard.txt ----------------------------------------------------------------------- Thinkcentre-M57p:/tmp> ls -lah -rw-r--r-- 1 root root 17 Feb 13 15:41 HP-PS2-Keyboard.txt ----------------------------------------------------------------- Thinkcentre-M57p:/tmp> cat HP-PS2-Keyboard.txt the script works ----------------------------------------------------------
I sent the above to soon. If I rename the systemd service file to more generic (PS2-Keyboard.service), do I need to do anything to the systemd service as far as stopping and starting the service again? -Thanks for your help on this.