Imx93 evk ONOFF button can be used for standby function.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Imx93 evk ONOFF button can be used for standby function.

跳至解决方案
1,700 次查看
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 项奖励
回复
1 解答
1,670 次查看
xiang_1001
Contributor III
The function is realized after modifying the file/etc /etc/systemd/logind.conf

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,659 次查看
gaurav_sharma
NXP Employee
NXP Employee

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

0 项奖励
回复
1,660 次查看
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 项奖励
回复
1,671 次查看
xiang_1001
Contributor III
The function is realized after modifying the file/etc /etc/systemd/logind.conf
0 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-2195417%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EImx93%20evk%20ONOFF%20%E6%8C%89%E9%92%AE%E5%8F%AF%E7%94%A8%E4%BA%8E%E5%BE%85%E6%9C%BA%E5%8A%9F%E8%83%BD%E3%80%82%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2195417%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%82%A8%E5%A5%BD%EF%BC%8Cimx93%20evk%20%E7%9A%84%20ONOFF%20%E6%8C%89%E9%92%AE%E8%83%BD%E5%90%A6%E5%86%8D%E6%AC%A1%E5%AE%9E%E7%8E%B0%E7%9F%AD%E6%8C%89%E5%BE%85%E6%9C%BA%E5%92%8C%E7%9F%AD%E6%8C%89%E5%94%A4%E9%86%92%E5%8A%9F%E8%83%BD%EF%BC%9F%E5%A6%82%E4%BD%95%E5%AE%9E%E7%8E%B0%EF%BC%9F%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%3E%E5%93%A6%EF%BC%8C%E6%8A%B1%E6%AD%89%EF%BC%8C%E7%9C%8B%E6%9D%A5%E4%BD%A0%E5%B7%B2%E7%BB%8F%E6%83%B3%E6%98%8E%E7%99%BD%E4%BA%86%E3%80%82%E8%AF%B7%E5%BF%BD%E7%95%A5%E6%88%91%E7%9A%84%E5%9B%9E%E7%AD%94%E3%80%82%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%20%E6%98%AF%E7%9A%84%20ONOFF%20%E6%8C%89%E9%92%AE%E8%A2%AB%E8%B7%AF%E7%94%B1%E5%88%B0%20gpio%20%E7%BA%BF%E8%B7%AF%EF%BC%8C%E8%AF%A5%E7%BA%BF%E8%B7%AF%E8%BF%9B%E4%B8%80%E6%AD%A5%E8%BF%9E%E6%8E%A5%E5%88%B0%20PMIC%20%E8%BE%93%E5%85%A5%EF%BC%8C%E5%8F%AF%E4%BB%A5%E9%85%8D%E7%BD%AE%E4%B8%BA%E8%A1%8C%E5%8A%A8%E5%94%A4%E9%86%92%E6%BA%90%E3%80%82%3CBR%20%2F%3E%3CBR%20%2F%3E%E4%BD%9C%E4%B8%BA%E9%BB%98%E8%AE%A4%E7%94%B5%E8%B7%AF%E6%9D%BF%E6%94%AF%E6%8C%81%E5%8C%85%E7%9A%84%E4%B8%80%E9%83%A8%E5%88%86%EF%BC%8C%E4%BD%A0%E7%BB%9D%E5%AF%B9%E5%8F%AF%E4%BB%A5%E9%80%9A%E8%BF%87%E7%9F%AD%E6%8C%89%20ONOFF%20%E6%8C%89%E9%92%AE%E5%B0%86%E7%B3%BB%E7%BB%9F%E4%BB%8E%E6%8C%82%E8%B5%B7%E4%B8%AD%E5%94%A4%E9%86%92%E3%80%82%E6%82%A8%E5%8F%AF%E4%BB%A5%E5%B0%9D%E8%AF%95%E6%89%A7%E8%A1%8C%3CSTRONG%3E%22echo%20mem%26gt%3B%20%2Fsys%2Fpower%2Fstate%3C%2FSTRONG%3E%22%EF%BC%8C%E5%B0%86%E5%85%B6%E5%8F%91%E9%80%81%E5%88%B0%E6%8C%82%E8%B5%B7%E7%8A%B6%E6%80%81%EF%BC%8C%E7%84%B6%E5%90%8E%E6%8C%89%E4%B8%80%E6%AC%A1%E5%85%B3%E6%9C%BA%E6%8C%89%E9%92%AE%E5%B0%86%E5%85%B6%E5%94%A4%E9%86%92%E3%80%82%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%E6%88%96%E8%80%85%EF%BC%8C%E5%A6%82%E6%9E%9C%E6%82%A8%E6%83%B3%E5%B0%86%E5%BC%80%E5%85%B3%E6%8C%89%E9%92%AE%E9%85%8D%E7%BD%AE%E4%B8%BA%3CSTRONG%3E%22%E6%9A%82%E5%81%9C%3C%2FSTRONG%3E%22%E7%B3%BB%E7%BB%9F%EF%BC%8C%E5%88%99%E5%BF%85%E9%A1%BB%E6%89%A7%E8%A1%8C%E4%BB%A5%E4%B8%8B%E6%93%8D%E4%BD%9C%EF%BC%9A-%3CBR%20%2F%3E%3CBR%20%2F%3E1.%E7%BC%96%E8%BE%91%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%20-%20%2Fetc%2Fsystemd%2Flogind.conf%3CBR%20%2F%3E%20%EF%BC%8C%E5%B0%86%3CSTRONG%3EHandlePowerKey%3C%2FSTRONG%3E%E5%8F%98%E9%87%8F%E8%AE%BE%E7%BD%AE%E4%B8%BA%20%22%E6%9A%82%E5%81%9C%22%E3%80%82%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.%E9%87%8D%E5%90%AF%20systemd-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%3E%E4%B9%8B%E5%90%8E%EF%BC%8C%E5%8F%AA%E9%9C%80%E7%9F%AD%E6%8C%89%20ONOFF%20%E6%8C%89%E9%92%AE%EF%BC%8C%E5%B0%B1%E8%83%BD%E5%B0%86%20imx93%20%E9%80%81%E5%85%A5%E6%8C%82%E8%B5%B7%E7%8A%B6%E6%80%81%E3%80%82%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%3E%E4%BF%AE%E6%94%B9%E6%96%87%E4%BB%B6%2Fetc%2Fsystemd%2Flogind.conf%20%E5%90%8E%E5%8D%B3%E5%8F%AF%E5%AE%9E%E7%8E%B0%E8%AF%A5%E5%8A%9F%E8%83%BD%3C%2FLINGO-BODY%3E