Reply
Thread Tools
Posts: 39 | Thanked: 16 times | Joined on Mar 2011 @ Germany
#1
Guys, do you know a way to disable the proximity sensor via software on harmattan? I remember that this was possible on N900 by editing a system file.
I've already searched on the forum but I haven't found anything useful.

I've been having problems with the proximity sensor of my N9 since I replaced its lcd. Unfortunately the frame of the lcd I've installed is not as tight as the original one so the screen seems to come out of some millimeters from the phone itself causing the proximity sensor misbehavior.
After I've applied some glue to the plastic frame of the lcd the situation has improved but the problem still comes out from time to time and I'm sure it will arise again if the phone will fall down to the ground.
I believe that by disabling the proximity sensor I will still be able to make calls without problems by locking the phone with the power button in the same way I use to do on my N900.
I'm kindly looking forward to your suggestions. Thank you in advance!

Last edited by wokawoka; 2013-09-03 at 21:14.
 
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#2
you can easily remove the proximity sensor until your new screen comes, and the phone will work fine.

which brings me to my next point...
__________________
~ teleshoes ~
 
Posts: 39 | Thanked: 16 times | Joined on Mar 2011 @ Germany
#3
Originally Posted by wolke View Post
you can easily remove the proximity sensor until your new screen comes, and the phone will work fine.

which brings me to my next point...
Thank you for your suggestion. I haven't ordered any other lcd screen though, and I wouldn't like to open the phone once again since the screws are messing up (my fault, I've been using a torx 4 screwdriver instead a torx plus 4).

That's why I'm looking for a solution via software. There must be a way ...
 
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#4
serious advice: please consider purchasing a torxplus for 4$USD, removing the screws from the top, opening the phone, and swapping the two most frequently used screws for two of the screws from the battery casing.

buy another lcd in the meantime, ensuring that it comes with the bezel. theyre fairly cheap. ive bought and replaced 6 of them.

now, i suggest this to you because the cheap LCDs you can buy online WILL FAIL, and if you cant get the screws out, youll need to rent a dremel or buy a phone. ive had 3 separate screens fail, usually 3-5 weeks after installation. the other 3 were ok, but 2 of them fit oddly. {i suggest finding an original certified-from-nokia n9 screen for roughly twice the price}

honestly, it sounds like a bad overall experience with current screen.


as for software soln, there is not necessarily a solution. it is more than possible that there is, but i dont think anyone knows how, which makes me suspicious of it being easy. certainly, its not as easy as on the n900 where there was a sys device interface for it.
__________________
~ teleshoes ~
 
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#5
failure for all 3 {3 different sellers, two distinctly different manufacturers} started out as a faint orange glow near the top for a few days, then a deep orange discoloring, and the next day or so, total sudden failure.
__________________
~ teleshoes ~
 
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#6
im fulla sh*t:
echo 0 > /sys/devices/platform/i2c_omap.2/i2c-2/2-0039/prox_enable

EDIT: note that i still recommend replacing your screen, and making it so that replacing your screen AGAIN is easy
__________________
~ teleshoes ~
 

The Following 5 Users Say Thank You to wolke For This Useful Post:
Posts: 39 | Thanked: 16 times | Joined on Mar 2011 @ Germany
#7
Originally Posted by wolke View Post
im fulla sh*t:
echo 0 > /sys/devices/platform/i2c_omap.2/i2c-2/2-0039/prox_enable
Thank you so much wolke! And sorry for replying so late.
The command seems to work very well even if the file needs to be modified again after a reboot. Do you know a way to make it permanent? Do I need to find a way to launch that command at startup with a script?

Concerning my screen, I bought it following some advices on the forum, and I have to say that the quality seems ok (I created myself the problem with the plastic frame pulling the screen too much while disassembling the phone once again. After having applied some glue now the frame is ok and the screen is well in place).
I have to say also that I've used a regular torx screwdriver because I really didn't know the existence of torx plus screws. Of course I'm also going to order some new N9 screws and the right screwdriver as soon as possible.

The real problem now is, I'm sure of it, the proximity sensor.
The new screen didn't have a proximity sensor so I have to move it from one screen to the other.
While the proximity sensor was working perfectly when it was fitted on the old screen, it started to behave wrongly after the transplant.
Sometimes I can clearly see the LPS disappearing for a short time, and it happens also that I can see the screen turning off-on rapidly by itself during a phone call even if leave the phone in my hand.
This doesn't happen always but enough to be a problem for me.
Recently from time to time I find myself in the situation that I can't even unlock the phone from the LPS even if the phone is not really frozen and it still continues to update the informations on the LPS and I can access it via ssh. In this case I'm forced to reboot the phone. This apparently doesn't seem to happen if I disable the proximity sensor with the command suggested here (I'm still checking though).

I swear I have been very careful in moving and connecting the proximity sensor flex cable.
Could it be possible that the sensor is still ok but I reinstalled it in a wrong way? I remember I used the two little holes at the beginning of the flex cable as a guide to place it in the right position on the plastic frame. Even if it lwas looking placed in a right way to me, I've also tried to reposition it without any real change.

I think I've heard about proximity sensor alignment. Do you guys have something to suggest before I buy another proximity sensor? I'm just afraid I would waste some money without changing the situation.
Thank you so much once again...
 
Posts: 39 | Thanked: 16 times | Joined on Mar 2011 @ Germany
#8
My last post was really too long, I guess.
After some days now I'm totally sure that the problems I'm facing are due to something wrong with the proximity sensor.
If I disable it with the command kindly provided by wolke some posts ago my phone doesn't lock up anymore even without rebooting the phone for days.

Do you guys have any suggestions about the right positioning of the proximity sensor? Is there really a correct alignment to take care of?
I just would like to see if there's something I still can do before ordering a new sensor...
 
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#9
here are some things that may be obvious, but must be said.

A) make sure you didnt put glue on the screen where the prox sensor goes, and make sure there is nothing on the sensor itself {qtip?}
B) make sure that the prox sensor is sitting snugly in its place, and that the connector is attached snugly.
C) make sure the screen you bought has a little oval window in the topright corner for the prox sensor. {by window, i mean the normal light-colored spot that will let light through, like on official screens}
__________________
~ teleshoes ~
 
Posts: 52 | Thanked: 33 times | Joined on Oct 2011 @ Poland, Tricity
#10
Here is a script which you can run to disable/enable the sensor. Helps when you have your N9 behind some kind of foil.

Code:
#
# Disable/enable proximity sensor
#
# To enable use: proximity_disable.sh 0
#
prox_enable_path=`find /sys/devices/ -name 'prox_enable'`

if [ -z "$1" ]; then
     echo "0" > $prox_enable_path
else
     echo "1" > $prox_enable_path
fi
Save it as /use/sbin/proximity_disable.sh or /use/bin/proximity_disable.sh, note however that you need to login as root (devel-su) to use the script. Don't forget to chmod the script to add execution rights.
 
Reply


 
Forum Jump


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