Imx93 evk ONOFF button can be used for standby function.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Imx93 evk ONOFF button can be used for standby function.

Jump to solution
1,698 Views
xiang_1001
Contributor III

Hello, can the imx93 evk ONOFF button do short press standby and short press wake-up function again? How to achieve it?

xiang_1001_0-1761794552413.png

 

0 Kudos
Reply
1 Solution
1,668 Views
xiang_1001
Contributor III
The function is realized after modifying the file/etc /etc/systemd/logind.conf

View solution in original post

0 Kudos
Reply
3 Replies
1,657 Views
gaurav_sharma
NXP Employee
NXP Employee

Oh, sorry I see you have already figured it out. Please ignore my response.

0 Kudos
Reply
1,658 Views
gaurav_sharma
NXP Employee
NXP Employee

@xiang_1001 yes ONOFF button is routed to a gpio line which further goes to the PMIC inputs and can be configured to act as a wake-up source. 

as part of default bsp, you can definitely wake the system from suspend by short pressing the ONOFF button. you can try by executing 'echo mem > /sys/power/state' to send it to suspend and then press the onoff button just once to wake it up. 


Or If you want to configure the onoff button to 'suspend' the system, you have to do the following: -

1. Edit the conf file - /etc/systemd/logind.conf
 set HandlePowerKey variable to 'suspend'

gaurav_sharma_0-1761804995958.png

2. Restart systemd-logind

systemctl restart systemd-logind

after this you will be able to send imx93 to suspend state with short pressing ONOFF button







0 Kudos
Reply
1,669 Views
xiang_1001
Contributor III
The function is realized after modifying the file/etc /etc/systemd/logind.conf
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2195417%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EImx93%20evk%20ONOFF%20button%20can%20be%20used%20for%20standby%20function.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2195417%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%20can%20the%20imx93%20evk%20ONOFF%20button%20do%20short%20press%20standby%20and%20short%20press%20wake-up%20function%20again%3F%20How%20to%20achieve%20it%3F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22xiang_1001_0-1761794552413.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22xiang_1001_0-1761794552413.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F363156i5AD4D68B22F88000%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22xiang_1001_0-1761794552413.png%22%20alt%3D%22xiang_1001_0-1761794552413.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2195521%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Imx93%20evk%20ONOFF%20button%20can%20be%20used%20for%20standby%20function.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2195521%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EOh%2C%20sorry%20I%20see%20you%20have%20already%20figured%20it%20out.%20Please%20ignore%20my%20response.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2195515%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Imx93%20evk%20ONOFF%20button%20can%20be%20used%20for%20standby%20function.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2195515%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F242171%22%20target%3D%22_blank%22%3E%40xiang_1001%3C%2FA%3E%26nbsp%3Byes%20ONOFF%20button%20is%20routed%20to%20a%20gpio%20line%20which%20further%20goes%20to%20the%20PMIC%20inputs%20and%20can%20be%20configured%20to%20act%20as%20a%20wake-up%20source.%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3Eas%20part%20of%20default%20bsp%2C%20you%20can%20definitely%20wake%20the%20system%20from%20suspend%20by%20short%20pressing%20the%20ONOFF%20button.%20you%20can%20try%20by%20executing%20'%3CSTRONG%3Eecho%20mem%20%26gt%3B%20%2Fsys%2Fpower%2Fstate%3C%2FSTRONG%3E'%20to%20send%20it%20to%20suspend%20and%20then%20press%20the%20onoff%20button%20just%20once%20to%20wake%20it%20up.%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3EOr%20If%20you%20want%20to%20configure%20the%20onoff%20button%20to%20'%3CSTRONG%3Esuspend%3C%2FSTRONG%3E'%20the%20system%2C%20you%20have%20to%20do%20the%20following%3A%20-%3CBR%20%2F%3E%3CBR%20%2F%3E1.%20Edit%20the%20conf%20file%20-%26nbsp%3B%2Fetc%2Fsystemd%2Flogind.conf%3CBR%20%2F%3E%26nbsp%3Bset%26nbsp%3B%3CSTRONG%3EHandlePowerKey%3C%2FSTRONG%3E%20variable%20to%20'suspend'%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22gaurav_sharma_0-1761804995958.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22gaurav_sharma_0-1761804995958.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F363181i76055E33D6200AE9%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22gaurav_sharma_0-1761804995958.png%22%20alt%3D%22gaurav_sharma_0-1761804995958.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E2.%20Restart%26nbsp%3Bsystemd-logind%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3E%3C!--ScriptorStartFragment--%3E%3CSTRONG%3Esystemctl%20restart%20systemd-logind%3C%2FSTRONG%3E%3C!--ScriptorEndFragment--%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3Eafter%20this%20you%20will%20be%20able%20to%20send%20imx93%20to%20suspend%20state%20with%20short%20pressing%20ONOFF%20button%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2195500%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%20Imx93%20evk%20ONOFF%20button%20can%20be%20used%20for%20standby%20function.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2195500%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EThe%20function%20is%20realized%20after%20modifying%20the%20file%2Fetc%20%2Fetc%2Fsystemd%2Flogind.conf%3C%2FLINGO-BODY%3E