View Full Version : Disable the lock switch?
Jak Crow
2010-06-24, 21:23
Has anyone developed anything to prevent the slider switch from waking and unlocking the screen? It's ridiculous to have the option to lock and turn off the screen only to have the switch basically get around it. It's also a pain in the *** when the phone is in a case that can nudge the switch while the phone is in it.
Has anyone developed anything to prevent the slider switch from waking and unlocking the screen? It's ridiculous to have the option to lock and turn off the screen only to have the switch basically get around it. It's also a pain in the *** when the phone is in a case that can nudge the switch while the phone is in it.
I'm sure there's a way to disable it in a configuration file somewhere, but I've only been able to do it by forcefully swiping my finger past it. Doesn't seem to be very accident prone. Have you tried storing your phone right-side up so it doesn't brush the switch the wrong way?
Creamy Goodness
2010-06-24, 22:00
I think you should enable the lock code, then at least it won't fully unlock without enering a code as well.
system > settings > enable autolock
current code should be 12345
DONT LOOSE IT OR YOU WILL HAVE TO REFLASH
I checked mce.ini and it's only got the "power button" and "home button". I don't think it's the home button, but maybe it is? I wouldn't screw with that though!
qwerty12
2010-06-24, 22:29
Run "stop mce", and change "/sys/devices/platform/gpio-switch/kb_lock/state" in /sbin/mce to "/sys/devices/platform/gpio-switcx/kb_lock/state". Remember to "start mce" afterwards.
Yes, this is Maemo, where thanks to Nokia keeping MCE et al. closed, you are forced to resort to such stupid hacks.
"and change "/sys/devices/platform/gpio-switch/kb_lock/state" in /sbin/mce to "/sys/devices/platform/gpio-switcx/kb_lock/state"."
Can someone explain how to do it, please?
How can you edit /sbin/mce ? I don't get it...
How can you edit /sbin/mce ? I don't get it...
You need to use a unix potato.
You need to use a unix potato.
Could you be more specific? What is a unix potato? Or did you mean "You need to use a unix, potato" (where the potato in this case is me...)
Andre Klapper
2012-01-10, 14:02
You need to have root access, and you need a text editor. Like nano, vi(m), emacs or something similar...
Mike Fila
2012-01-10, 14:13
people have shaved off the little tab on the switch and made a notch instead to be able to still use it
sixwheeledbeast
2012-01-10, 14:50
Cheers Mike
I never thought of that. My switch has worn flat, to the point I have to use the power button. This maybe a good solution to repair.
Mike Fila
2012-01-10, 15:20
if that doesnt work for you you could try using an abs plastic like lego cut it into little shavings with a razor, then mix it with acetone. Make a thick paste out of it and put a couple of drops to make a finger hold.
http://hackaday.com/2011/12/16/welding-and-casting-abs/
You need to have root access, and you need a text editor. Like nano, vi(m), emacs or something similar...
It worked with emacs thanks. I won't use this but I was curious just to make it work.
Try my soft lock screen method
The tklock the attached *. / usr/desktop kao to share/applications/hildon /
24451
Again the *. / usr/copy PNG to share/ICONS/hicolor / 48 x48 / hildon /
试试我的软锁屏方法
把tklock 附件中的 *.desktop 拷到 /usr/share/applications/hildon/
再把*.PNG 拷贝到 /usr/share/icons/hicolor/48x48/hildon/
http://talk.maemo.org/attachment.php?attachmentid=24451&stc=1&d=1326360339
chrisgreen
2012-02-15, 04:48
My keyboard lock switch developed a fault which caused the screen to randomly turn on and off, sometimes in quick succession, making the phone almost unusable. This disables the lock switch until the next reboot:
Open a terminal
Gain root access (sudo/su/whatever)
echo 1 > /sys/devices/platform/gpio-switch/kb_lock/disable
I'd be interested to know of a way to do this every time the phone boots up. Tried a script in /etc/init.d and ran update-rc.d to activate it in rc2.d but no joy...
magick777
2012-02-15, 07:40
My keyboard lock switch developed a fault which caused the screen to randomly turn on and off, sometimes in quick succession, making the phone almost unusable. This disables the lock switch until the next reboot:
Open a terminal
Gain root access (sudo/su/whatever)
echo 1 > /sys/devices/platform/gpio-switch/kb_lock/disable
I'd be interested to know of a way to do this every time the phone boots up. Tried a script in /etc/init.d and ran update-rc.d to activate it in rc2.d but no joy...
Try doing this from event.d once hildon-desktop is loaded, so create a file such as:
/etc/event.d/disablelockscreen:
start on started hildon-desktop
console output
script
echo 1 > /sys/devices/platform/gpio-switch/kb_lock/disable
end script
@chrisgreen,
Just put your script on /etc/event.d with:
start on started hildon-desktop
script
...
end script
That's at least how I do my swap-on-sd, mount-extra-partition, tune-kernel-parameters, etc (all in a single script, for easy maintainability..)
Add.: @magic777, that was quick :)
vBulletin® v3.8.8, Copyright ©2000-2024, vBulletin Solutions, Inc.