nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   Linux backlight driver (http://www.nvnews.net/vbulletin/showthread.php?t=143025)

guillaumezin 12-25-09 04:25 PM

Linux backlight driver
 
Hello,

I wrote a little Linux driver based on Andy Wingo's work (http://wingolog.org/pub/nvbacklight-0.1.tar.bz2) and MacTel Team (https://launchpad.net/~mactel-suppor..._filter=karmic) that enables the control of laptop backlight connected to nVidia chip using the /sys/class/backlight interface.

Source and binary download are now available on github: https://github.com/guillaumezin/nvidiabl

Guillaume

bistory 12-25-09 04:39 PM

Re: Linux backlight driver
 
That's great man !
I'll test it tomorrow (it's a little bit too late now for me).
You're like Santa :D you made my day !

mdoube 12-25-09 05:28 PM

Re: Linux backlight driver
 
Tried installing the .deb on Ubuntu Karmic, which completed OK.

No improvement in backlight control though:
Sony Vaio VGN SZ650N with nVidia 8400M GS

I use nvclock / smartdimmer and acpi events in /etc/acpi/events to get backlight control from Fn keys.

Code:

01:00.0 VGA compatible controller [0300]: nVidia Corporation G86 [GeForce 8400M GS] [10de:0427] (rev a1)
        Subsystem: Sony Corporation Device [104d:9008]
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Interrupt: pin A routed to IRQ 16
        Region 0: Memory at ca000000 (32-bit, non-prefetchable) [size=16M]
        Region 1: Memory at d0000000 (64-bit, prefetchable) [size=256M]
        Region 3: Memory at c8000000 (64-bit, non-prefetchable) [size=32M]
        Region 5: I/O ports at 2000 [size=128]
        Capabilities: [60] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [68] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-
                Address: 0000000000000000  Data: 0000
        Capabilities: [78] Express (v1) Endpoint, MSI 00
                DevCap:        MaxPayload 128 bytes, PhantFunc 0, Latency L0s <512ns, L1 <4us
                        ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
                DevCtl:        Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
                        MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta:        CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
                LnkCap:        Port #0, Speed 2.5GT/s, Width x16, ASPM L0s L1, Latency L0 <512ns, L1 <4us
                        ClockPM- Suprise- LLActRep- BwNot-
                LnkCtl:        ASPM L0s L1 Enabled; RCB 128 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta:        Speed 2.5GT/s, Width x16, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        Capabilities: [100] Virtual Channel <?>
        Capabilities: [128] Power Budgeting <?>
        Capabilities: [600] Vendor Specific Information <?>
        Kernel driver in use: nvidia
        Kernel modules: nvidia, nvidiafb


bistory 12-26-09 03:20 AM

Re: Linux backlight driver
 
I tested !
I used the .deb, I've a sony vaio VGN-FZ11E with a Nvidia 8400M GT and ...

IT WORKS ! (Tested on Ubuntu Karmic 32 bits).

I've a complete backlight controll from fn keys to dim when idle !

Thanks a lot :):):)

ercoppa 12-26-09 03:33 AM

Re: Linux backlight driver
 
Why do you not using nvidia_bl module (by MacTel Team)? It works like charm.

guillaumezin 12-26-09 04:29 AM

Re: Linux backlight driver
 
Quote:

Originally Posted by ercoppa (Post 2151107)
Why do you not using nvidia_bl module (by MacTel Team)? It works like charm.

Well, because I wasn't aware that there was already one, like a lot of people here: https://bugs.launchpad.net/ubuntu/+s...il/+bug/345531

Quote:

Originally Posted by mdoube (Post 2150993)
I tried it, its autodetection works but I can't reach 100%. I will see if I can see why.

Tried installing the .deb on Ubuntu Karmic, which completed OK.

No improvement in backlight control though:
Sony Vaio VGN SZ650N with nVidia 8400M GS

Did you tried different "model" option for the module?

Guillaume

Dragoran 12-26-09 07:38 AM

Re: Linux backlight driver
 
Quote:

nVidia staff is of course free to ship this driver with theirs, and to give me some hints on how to autodetect backlight and chipset!
The correct way here is to send your driver upstream (i.e get it included in the kernel)

bistory 12-26-09 10:16 AM

Re: Linux backlight driver
 
Quote:

Originally Posted by guillaumezin (Post 2151111)
Well, because I wasn't aware that there was already one, like a lot of people here: https://bugs.launchpad.net/ubuntu/+s...il/+bug/345531

Maybe there's a way to adapt your driver to eat less cpu ? I didn't test the MacTel driver, so I'm not able to say if it eats less CPU ^^

guillaumezin 12-26-09 03:04 PM

Re: Linux backlight driver
 
Quote:

Originally Posted by Dragoran (Post 2151147)
The correct way here is to send your driver upstream (i.e get it included in the kernel)

Well, yes and no, I wrote this driver to enhance the proprietary driver that doesn't handle the backlight, my idea is that it should be distributed with the video closed source driver. But I will enhance it and if it is good enough, I will propose it for kernel inclusion.

Guillaume

guillaumezin 01-16-10 10:55 AM

Re: Linux backlight driver
 
Hello,

The driver has been updated. Please see the initial post.

Guillaume.

bistory 01-16-10 01:04 PM

Re: Linux backlight driver
 
3 Attachment(s)
Here are the files needed for you to autoload :)

Thanks again for your work ;)

bistory 01-17-10 02:16 PM

Re: Linux backlight driver
 
You missed one dkms in the install command :
sudo tar xvjf nvidia_bl-0.50.tar.bz2 -C /usr/src --exclude *.deb && sudo dkms add build install -m nvidia_bl -v 0.50

Anyway, I tested it and it works perfectly :)


All times are GMT -5. The time now is 11:23 AM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.