Hi,
I'm working on a XU4 project that requires dual functionality for the power button. This would require that the pwron pin to the XU4 only responds to a logic high that exceeds a fixed period on time, for example 1 second. This only needs implementing for power off. I could solve this in hardware, but would great if done at the OS level. Hope someone can help.
Cheers,
Malcolm
Delayed response to Pwron pin
-
- Posts: 2
- Joined: Wed Dec 11, 2019 8:15 pm
- languages_spoken: english
- ODROIDs: XU4
- Has thanked: 0
- Been thanked: 0
- Contact:
-
- Posts: 9095
- Joined: Wed Jul 15, 2015 5:00 pm
- languages_spoken: english
- ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
- Location: Bucharest, Romania
- Has thanked: 597 times
- Been thanked: 584 times
- Contact:
Re: Delayed response to Pwron pin
You can!
Disable the poweroff action from /etc/systemd/ something (I forgot where), and then use this multibutton program that listens to keypresses and can do various actions: https://github.com/mad-ady/multibutton
Disable the poweroff action from /etc/systemd/ something (I forgot where), and then use this multibutton program that listens to keypresses and can do various actions: https://github.com/mad-ady/multibutton
-
- Posts: 2
- Joined: Wed Dec 11, 2019 8:15 pm
- languages_spoken: english
- ODROIDs: XU4
- Has thanked: 0
- Been thanked: 0
- Contact:
Re: Delayed response to Pwron pin
Thanks for pointing me in the right direction. I've sorted the problem by editing \etc\systemd\login.conf and making active the HandlePowerKey=ignore
Switching on can still be achieved using the pwron pin but switching off is deactivated and can be done in software with system("poweroff")
Cheers,
Malcolm
Switching on can still be achieved using the pwron pin but switching off is deactivated and can be done in software with system("poweroff")
Cheers,
Malcolm
Who is online
Users browsing this forum: No registered users and 3 guests