tvogel / vaio-f11-linux

Automatically exported from code.google.com/p/vaio-f11-linux
7 stars 2 forks source link

No Support for Ambient Light Sensor #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
There is no available interface to access data from the ambient light sensor 
(that little dot next to the numlock LED). Additionally, there is no way to 
make it control the screen brightness. 

Original issue reported on code.google.com by Jason.Donenfeld on 10 Feb 2010 at 10:10

GoogleCodeExporter commented 9 years ago
Hi, the same situation here (Vaio VPCF12Z1E).
Thanks

Original comment by slin...@gmail.com on 2 Sep 2010 at 8:40

GoogleCodeExporter commented 9 years ago
I found this http://lwn.net/Articles/348576/

It seems someone made an ACPI driver for this. Does anyone know if this works 
with sony laptops?

Original comment by nuno.mt....@gmail.com on 8 Sep 2010 at 1:46

GoogleCodeExporter commented 9 years ago
No, it doesn't. Sony laptops use a private ACPI tree for controlling the ALS. I 
wrote some code for my TT laptop a while ago, that even includes color 
temperature detection, and I submitted it to the sony-laptop module maintainer, 
but it hasn't made it to the kernel tree yet.

Original comment by jachir...@gmail.com on 20 Sep 2010 at 10:32

GoogleCodeExporter commented 9 years ago
Can you share your code?

Maybe we can turn it into a patch that we can use.

Original comment by nuno.mt....@gmail.com on 20 Sep 2010 at 11:29

GoogleCodeExporter commented 9 years ago
Sure. How do I upload a patch to this system? Or where do I send the patch?

Original comment by jachir...@gmail.com on 21 Sep 2010 at 9:05

GoogleCodeExporter commented 9 years ago
Just attach it to a comment in this bug (when you start editing the comment 
there is an "Attach a file" link that appears).

Original comment by nuno.mt....@gmail.com on 21 Sep 2010 at 9:54

GoogleCodeExporter commented 9 years ago
This patch is for kernel 2.6.35.

For my laptop, SNC_ALS_METHOD is 0x012f (as is in the patch), but for the F 
series looks like it should be 0x137. In this method there are additional 
handles for managing keyboard backlight but I haven't tested them.

Original comment by jachir...@gmail.com on 21 Sep 2010 at 4:26

Attachments:

GoogleCodeExporter commented 9 years ago
Changed to be easily appliable with -p1.

Testing this now. Will get back shortly with results.

Original comment by Jason.Donenfeld on 21 Sep 2010 at 7:05

Attachments:

GoogleCodeExporter commented 9 years ago
Hello, I'm sorry but how do I use the patch? And will it work on sony S series?

Original comment by thera...@gmail.com on 22 Sep 2010 at 8:16

GoogleCodeExporter commented 9 years ago
same issue in VAIO VPCS120FL

Original comment by suga92 on 25 Sep 2010 at 7:25

GoogleCodeExporter commented 9 years ago
Same at VPCF121FX

Original comment by Stomaz....@gmail.com on 1 Oct 2010 at 11:23

GoogleCodeExporter commented 9 years ago
jachirica, how did you obtained the values SNC_ALS_METHOD? Just guessed?
0x012f doesn't work for me. With 0x137 I get 
/sys/class/backlight/sony/brightness and other entries but writing has no 
affect (maximal value is 255). With 0x135 (which is detected as "rkfill 
handle:") I get as maximal value 3 but also no affect once I try to change it.

I own a new Sony Vaio P (VPCP11S1E) and do not find sony-laptop.ko useful. I 
tried up to new to make same ACPI dumps of unknown ACPI getters to find their 
meaning but without success (compare Documentation/laptops/sony-laptop.txt in 
the kernel source). I need a way to enable the integrated UMTS modem (currently 
I can only upload the firmware if I do a warm start after starting Windows 
which is evil), and other stuff (camera, sound, ...).

Original comment by tux.J...@gmail.com on 28 Oct 2010 at 4:24

GoogleCodeExporter commented 9 years ago
I reversed-engineered the ACPI code and Windows driver of my TT. Laptops that 
use the 0x137 method looks like they may use a different sensor chip, so some 
code might need to be adapted.

Original comment by jachir...@gmail.com on 29 Oct 2010 at 5:17

GoogleCodeExporter commented 9 years ago
How do I apply these changes? Where do I put the diff file? as I apply the 
patch?
my laptop is a F11JFX

Original comment by davidken...@gmail.com on 13 Dec 2010 at 11:00

GoogleCodeExporter commented 9 years ago
How would that be in 64 bit systems?

Original comment by davidken...@gmail.com on 14 Dec 2010 at 12:21

GoogleCodeExporter commented 9 years ago
Same issue on VPCS12C5E

Original comment by alec...@toshiba-connect.it on 15 Dec 2010 at 1:08

GoogleCodeExporter commented 9 years ago
I think this can be closed, or at least redirected to #6, as there are working 
drivers for the ALS, which, when I got it right, will be included into the 
mainline kernel 2.6.39.

Original comment by johnpatc...@googlemail.com on 21 Mar 2011 at 11:32

GoogleCodeExporter commented 9 years ago
Per comment 17.

Original comment by Jason.Donenfeld on 22 Mar 2011 at 5:35