maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Brainstorm (https://talk.maemo.org/forumdisplay.php?f=47)
-   -   Disable long-press power button (https://talk.maemo.org/showthread.php?t=99306)

ynzinier 2017-04-21 15:45

Disable long-press power button
 
The Thing:
when walking or placing the N900 in a pocket of trousers or a jacket somehow it goes down, probably by unknowingly pressing the power button. It happens sometimes, there's no pattern nor probable bug causing this. I can't find any log of power on/off.

Potential solution:
disable the long-press on power button through file in (not sure about this) /sys/devices/platform/gpio-switch/

Advantages:
N900 won't turn off anymore by incidental long-press.

Disadvantages:
When stuck or in need to do a hard restart you will have to remove battery.

Does anyone have an idea how to debug or just disable the button?

pichlo 2017-04-21 16:07

Re: Disable long-press power button
 
How do you know it was the power button press and not, for example, a dodgy battery?

The simplest solution is a hardware mod: glue a small ring (for example, a washer) to the case around the power button. You will still be able to press it with a tool but not by accident.

ynzinier 2017-04-21 16:23

Re: Disable long-press power button
 
Quote:

Originally Posted by pichlo (Post 1527150)
How do you know it was the power button press and not, for example, a dodgy battery?

Well, it happens only when in my pocket.

freemangordon 2017-04-21 16:38

Re: Disable long-press power button
 
Quote:

Originally Posted by ynzinier (Post 1527154)
Well, it happens only when in my pocket.

Most probably it is bad battery/weak battery holder springs.

ynzinier 2017-05-09 18:13

Re: Disable long-press power button
 
Checked in another pocket and there was no such accident.
Back to the question: how to disable this functionality with some software edit?

juiceme 2017-05-10 05:02

Re: Disable long-press power button
 
Quote:

Originally Posted by ynzinier (Post 1527827)
Checked in another pocket and there was no such accident.
Back to the question: how to disable this functionality with some software edit?

Could well be I am wrong here, but the long press cannot be masked in software; it triggers a hard shutdown even in case where cpu is totally locked.

pichlo 2017-05-10 05:25

Re: Disable long-press power button
 
...all of which brings us back neatly to the weak battery contacts.

ynzinier 2017-05-10 18:22

Re: Disable long-press power button
 
Quote:

Originally Posted by juiceme (Post 1527836)
Could well be I am wrong here, but the long press cannot be masked in software; it triggers a hard shutdown even in case where cpu is totally locked.

Hm, that makes the problem harder to solve.

Quote:

Originally Posted by pichlo (Post 1527838)
...all of which brings us back neatly to the weak battery contacts.

I can fold them to better connect to board (fold the battery holders too), but even after falling from about 1 m it didn't switch off.

nieldk 2017-05-10 18:33

Re: Disable long-press power button
 
I seriously doubt that this should not be configurable somehow.
Linux is in basics just configs in file system . Even hardware.
Just, no one have been told where it's hidden.

juiceme 2017-05-10 18:38

Re: Disable long-press power button
 
Quote:

Originally Posted by nieldk (Post 1527889)
I seriously doubt that this should not be configurable somehow.
Linux is in basics just configs in file system . Even hardware.
Just, no one have been told where it's hidden.

heh, if there's a rc delay connected to the power supply enable line I sure would like to see that configured by software :D


All times are GMT. The time now is 20:15.

vBulletin® Version 3.8.8