Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 12-14-10, 07:00 PM   #85
tafano
Registered User
 
Join Date: Dec 2010
Posts: 2
Default Re: Linux backlight driver

Thank you for the patch. (I'm Italian, so I'm sorry for my bad English).
I had brightness problem in a Samsung R70, and I think you could add it in the list of computer were the patch works well. Infact it does. This is a great success for me, raeally thanks!!
I have now another problem:
I can now set brightness values with commands like
Code:
echo 50 | tee -a /sys/class/backlight/nvidia_backlight/brightness
but also with
Code:
smartdimmer --s N
were N in a natural number such that 15<=N<=100. This is quite useful because it don't need ROOT password.

The hot-keys of my computer can show the "brightness message" and move the bar, but i can't see any change neither in brightness nor in the value given by
Code:
cat /sys/class/backlight/nvidia_backlight/brightness
nor in the value given by
Code:
 smartdimmer -g
Moreover it's quite useless the commands
Code:
smartdimmer -d
Code:
smartdimmer -i
because they decrease/increase the brightness of only one unit, that is very few.

There is a way to change the brightness value with the keys and to connect it with the default Ubuntu brightness manager (for example editing the code that Ubuntu use to change the brightness)?

Thanks for help,
Stefano.
tafano is offline   Reply With Quote
Old 12-14-10, 08:07 PM   #86
rohandhruva
Registered User
 
Join Date: Nov 2010
Posts: 7
Default Re: Linux backlight driver

I have a sony Vaio VPCCW2 series laptop. When I modprobe the module, it loads successfully. But the moment I try to adjust brightness, it becomes 0, and screen goes dark. Even if I try to set it to max brightness. Can you please help me figure out the problem?
Attached Files
File Type: gz nvidia-bug-report.log.gz (49.4 KB, 164 views)
File Type: txt bug.txt (3.4 KB, 167 views)
rohandhruva is offline   Reply With Quote
Old 12-16-10, 10:33 AM   #87
pepito
Registered User
 
Join Date: Dec 2010
Posts: 1
Default Re: Linux backlight driver

I have a Sony Vaio VPCCW21FX series laptop with Nvidia 310M and Linux 2.6.36.
The module loads fine, but the screen is too dark, the brightness level is limited to 0 - 127, even when I set the max parameter (it is basically ignored).

In an older version of this driver I used to use parameters max_level=127000 shift=7 and they worked fine.

Finally, I would like it very much if this module was integrated in the Linux kernel, or at least if it had a sourceforge project page for proper cvs, forums, mailing list, requests, etc.
pepito is offline   Reply With Quote
Old 12-19-10, 10:47 AM   #88
guillaumezin
Registered User
 
Join Date: Dec 2009
Posts: 26
Default Re: Linux backlight driver

Hello,

0.57 version integrates Sony VPCCW2 family but needs testing for min and max values.

I will see how to open a Sourceforge project or something similar, this is a good suggestion.

tafano, could you the results of these commands:

Code:
lspci -nn
cat /sys/class/dmi/id/sys_vendor
cat /sys/class/dmi/id/product_name
Guillaume
guillaumezin is offline   Reply With Quote
Old 12-19-10, 11:01 AM   #89
rohandhruva
Registered User
 
Join Date: Nov 2010
Posts: 7
Default Re: Linux backlight driver

Quote:
Originally Posted by guillaumezin View Post
Hello,

0.57 version integrates Sony VPCCW2 family but needs testing for min and max values.

Guillaume
Can you please tell me how to do that? Thanks!
rohandhruva is offline   Reply With Quote
Old 12-19-10, 01:52 PM   #90
tafano
Registered User
 
Join Date: Dec 2010
Posts: 2
Default Re: Linux backlight driver

This is the result:

Code:
stefano@stefano-laptop:~$ lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub [8086:2a00] (rev 03)
00:01.0 PCI bridge [0604]: Intel Corporation Mobile PM965/GM965/GL960 PCI Express Root Port [8086:2a01] (rev 03)
00:1a.0 USB Controller [0c03]: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 [8086:2834] (rev 03)
00:1a.1 USB Controller [0c03]: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 [8086:2835] (rev 03)
00:1a.7 USB Controller [0c03]: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 [8086:283a] (rev 03)
00:1b.0 Audio device [0403]: Intel Corporation 82801H (ICH8 Family) HD Audio Controller [8086:284b] (rev 03)
00:1c.0 PCI bridge [0604]: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 [8086:283f] (rev 03)
00:1c.1 PCI bridge [0604]: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 [8086:2841] (rev 03)
00:1c.3 PCI bridge [0604]: Intel Corporation 82801H (ICH8 Family) PCI Express Port 4 [8086:2845] (rev 03)
00:1d.0 USB Controller [0c03]: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 [8086:2830] (rev 03)
00:1d.1 USB Controller [0c03]: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 [8086:2831] (rev 03)
00:1d.2 USB Controller [0c03]: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 [8086:2832] (rev 03)
00:1d.7 USB Controller [0c03]: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 [8086:2836] (rev 03)
00:1e.0 PCI bridge [0604]: Intel Corporation 82801 Mobile PCI Bridge [8086:2448] (rev f3)
00:1f.0 ISA bridge [0601]: Intel Corporation 82801HEM (ICH8M) LPC Interface Controller [8086:2815] (rev 03)
00:1f.2 IDE interface [0101]: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA IDE Controller [8086:2828] (rev 03)
00:1f.3 SMBus [0c05]: Intel Corporation 82801H (ICH8 Family) SMBus Controller [8086:283e] (rev 03)
01:00.0 VGA compatible controller [0300]: nVidia Corporation G86 [GeForce 8400M GS] [10de:0427] (rev a1)
03:00.0 Network controller [0280]: Intel Corporation PRO/Wireless 4965 AG or AGN [Kedron] Network Connection [8086:4229] (rev 61)
04:00.0 Ethernet controller [0200]: Marvell Technology Group Ltd. 88E8039 PCI-E Fast Ethernet Controller [11ab:4353] (rev 15)
05:09.0 CardBus bridge [0607]: Ricoh Co Ltd RL5c476 II [1180:0476] (rev b4)
05:09.1 SD Host controller [0805]: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter [1180:0822] (rev 18)
05:09.2 System peripheral [0880]: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter [1180:0592] (rev 09)
05:09.3 System peripheral [0880]: Ricoh Co Ltd xD-Picture Card Controller [1180:0852] (rev 04)
stefano@stefano-laptop:~$ cat /sys/class/dmi/id/sys_vendor
SAMSUNG ELECTRONICS CO., LTD.
stefano@stefano-laptop:~$ cat /sys/class/dmi/id/product_name
SR70S/SR71S
stefano@stefano-laptop:~$
I have written a a few line of C code, that allows me to change brightness using a "lanciatore" (I think the English translation i thrower, but I'm not shure). Anyway, my program works only in the exact directory, and now I can't use it from an hot-key of the keyboard (It returns an error, but I can't understand why...).
Anyway, if it can be useful, this is the code:

Code:
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>


int main(int argc, char *argv[], char *envp[])
{ int LumAttuale;
  FILE *F;
   if (!strcmp(argv[1],"-i")) {
    char in1[40], in2[15];
    system("smartdimmer -g > .gestioneLumi/out.txt");
    F=fopen(".gestioneLumi/out.txt","r" );
      fscanf(F,"%s %s %d", in1 ,in2 ,&LumAttuale);    
    LumAttuale+=10;
    strcpy (in1,"smartdimmer --s ");
    sprintf(in1, "%s %d", "smartdimmer --s", LumAttuale);
    
    if (LumAttuale!=100) { system(in1); };}

    
    if (!strcmp(argv[1],"-d")) {
    char in1[40], in2[15];
     system("smartdimmer -g > .gestioneLumi/out.txt");
    F=fopen(".gestioneLumi/out.txt","r" );
      fscanf(F,"%s %s %d", in1 ,in2 ,&LumAttuale);    
    LumAttuale-=10;
    strcpy (in1,"smartdimmer --s ");
    sprintf(in1, "%s %d", "smartdimmer --s", LumAttuale);
    
    if (LumAttuale>14) { system(in1); } else { system("smartdimmer --s 15");};}
return 0;

}
tafano is offline   Reply With Quote
Old 12-26-10, 07:08 AM   #91
theone123
Registered User
 
Join Date: Oct 2010
Posts: 15
Default Re: Linux backlight driver

On the latest Kernel in Ubuntu 10.04 the script doesn't work anymore. If i started a different kernel it worked. Maybe there's a change in the new one??
theone123 is offline   Reply With Quote
Old 12-31-10, 10:18 AM   #92
guillaumezin
Registered User
 
Join Date: Dec 2009
Posts: 26
Default Re: Linux backlight driver

Quote:
Originally Posted by tafano View Post
This is the result:

Code:
stefano@stefano-laptop:~$ lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub [8086:2a00] (rev 03)
00:01.0 PCI bridge [0604]: Intel Corporation Mobile PM965/GM965/GL960 PCI Express Root Port [8086:2a01] (rev 03)
00:1a.0 USB Controller [0c03]: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 [8086:2834] (rev 03)
00:1a.1 USB Controller [0c03]: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 [8086:2835] (rev 03)
00:1a.7 USB Controller [0c03]: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 [8086:283a] (rev 03)
00:1b.0 Audio device [0403]: Intel Corporation 82801H (ICH8 Family) HD Audio Controller [8086:284b] (rev 03)
00:1c.0 PCI bridge [0604]: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 [8086:283f] (rev 03)
00:1c.1 PCI bridge [0604]: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 [8086:2841] (rev 03)
00:1c.3 PCI bridge [0604]: Intel Corporation 82801H (ICH8 Family) PCI Express Port 4 [8086:2845] (rev 03)
00:1d.0 USB Controller [0c03]: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 [8086:2830] (rev 03)
00:1d.1 USB Controller [0c03]: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 [8086:2831] (rev 03)
00:1d.2 USB Controller [0c03]: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 [8086:2832] (rev 03)
00:1d.7 USB Controller [0c03]: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 [8086:2836] (rev 03)
00:1e.0 PCI bridge [0604]: Intel Corporation 82801 Mobile PCI Bridge [8086:2448] (rev f3)
00:1f.0 ISA bridge [0601]: Intel Corporation 82801HEM (ICH8M) LPC Interface Controller [8086:2815] (rev 03)
00:1f.2 IDE interface [0101]: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA IDE Controller [8086:2828] (rev 03)
00:1f.3 SMBus [0c05]: Intel Corporation 82801H (ICH8 Family) SMBus Controller [8086:283e] (rev 03)
01:00.0 VGA compatible controller [0300]: nVidia Corporation G86 [GeForce 8400M GS] [10de:0427] (rev a1)
03:00.0 Network controller [0280]: Intel Corporation PRO/Wireless 4965 AG or AGN [Kedron] Network Connection [8086:4229] (rev 61)
04:00.0 Ethernet controller [0200]: Marvell Technology Group Ltd. 88E8039 PCI-E Fast Ethernet Controller [11ab:4353] (rev 15)
05:09.0 CardBus bridge [0607]: Ricoh Co Ltd RL5c476 II [1180:0476] (rev b4)
05:09.1 SD Host controller [0805]: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter [1180:0822] (rev 18)
05:09.2 System peripheral [0880]: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter [1180:0592] (rev 09)
05:09.3 System peripheral [0880]: Ricoh Co Ltd xD-Picture Card Controller [1180:0852] (rev 04)
stefano@stefano-laptop:~$ cat /sys/class/dmi/id/sys_vendor
SAMSUNG ELECTRONICS CO., LTD.
stefano@stefano-laptop:~$ cat /sys/class/dmi/id/product_name
SR70S/SR71S
stefano@stefano-laptop:~$
Thank you, I will add your laptop to the autoload list for next version.

For your hotkeys not working, you should have a look to the /usr/share/doc/udev/README.keymap.txt or the
/usr/share/doc/udev/README.keymap.txt.gz file, it seems to be a bug in your multimedia keys handling (I have a similar problem).

Or you can take my scripts example (sony-nvidia-acpi-scripts.tar.gz) and create your own samsung-brightness-up and samsung-brightness-down executable files. To know what to put in these files, you can detect ACPI events sent by the keys using the command "sudo acpi_listen".

Guillaume
guillaumezin is offline   Reply With Quote

Old 12-31-10, 10:24 AM   #93
guillaumezin
Registered User
 
Join Date: Dec 2009
Posts: 26
Default Re: Linux backlight driver

Quote:
Originally Posted by rohandhruva View Post
Can you please tell me how to do that? Thanks!
Code:
sudo modprobe -r nvidiabl
sudo modprobe nvidiabl min=50 max=500
and test min and max backlight, repeat the procedure until you have correct behavior and post the values.

Other debug parameters :

Code:
module_param_named(off, off, long, 0644);
MODULE_PARM_DESC(off, "value to put in the register to disable the backlight");

module_param_named(min, min, long, 0644);
MODULE_PARM_DESC(min, "minimum register value for the backlight");

module_param_named(max, max, long, 0644);
MODULE_PARM_DESC(max, "maximum register value for the backlight");

module_param_named(pci_id, pci_id, ulong, 0644);
MODULE_PARM_DESC(pci_id, "PCI ID of the Nvidia card - usefull only when not using autodetection and more than one Nvidia PCI device");

module_param_named(model, model, charp, 0644);
MODULE_PARM_DESC(model, "backlight model, must be empty for autodetection, nv4x or nv5x");
Guillaume
guillaumezin is offline   Reply With Quote
Old 01-01-11, 11:16 AM   #94
Zem
Registered User
 
Join Date: Jan 2011
Posts: 14
Default Re: Linux backlight driver

Hi Guillaume

thank you for your work.
I own a Vaio CW2 with nvidia gt330m GPU, so I had to make a couple minor modifications to get your driver working.

I added:
Code:
NVIDIABL_DECLARE_LAPTOP_MODEL("Sony Corporation", "VPCCW2C5E", 0x0a2b, 0, 7000, 128000),
to nvidiabl-laptops.h and:
Code:
/* NVIDIA GeForce 330M */
{ PCI_VDEVICE(NVIDIA, 0x0a2b), (kernel_ulong_t)&nv5x_driver_data },
to nvidiabl-models.c

However, I think "VPCCW2C5E" is a generic model name common to all CW2s customized on the Sony site, so there may exist laptops with that name with the 310m GPU.


However, I wasn't able to get the Fn keys to work; I'm using kubuntu 10.10, and I added in /etc/acpi/ a script sony-brn-up.sh:
Code:
#!/bin/sh

test -f /usr/share/acpi-support/key-constants || exit 0 
. /usr/share/acpi-support/key-constants
acpi_fakekey $KEY_BRIGHTNESSUP
and in /etc/acpi/events/ a script sony-brightness-up:
Code:
# /etc/acpi/events/sony-brightness-up

event=sony/hotkey SNC 00000001 00000011
action=/etc/acpi/sony-brn-up.sh
and the same for brightness-down; however the keys aren't registered by xev. Am I doing something wrong?

Thank you
Zem is offline   Reply With Quote
Old 01-03-11, 08:59 AM   #95
guillaumezin
Registered User
 
Join Date: Dec 2009
Posts: 26
Default Re: Linux backlight driver

Quote:
Originally Posted by Zem View Post
However, I think "VPCCW2C5E" is a generic model name common to all CW2s customized on the Sony site, so there may exist laptops with that name with the 310m GPU.
Thank you, I will add you model to the source code. I declared first "VPCCW2C5E" then the whole "VPCCW2" family, so if the laptop is a "VPCCW2C5E" model, it will use your settings, otherwise it will fall back to the generic "VPCCW2" settings (GeForce 310M). If Sony uses the exact same model name whatever the GPU is, this is bad design, but I should be able to handle that situation if other users are complaining.

Quote:
Originally Posted by Zem View Post
However, I wasn't able to get the Fn keys to work; I'm using kubuntu 10.10, and I added in /etc/acpi/ a script sony-brn-up.sh:
Code:
#!/bin/sh

test -f /usr/share/acpi-support/key-constants || exit 0 
. /usr/share/acpi-support/key-constants
acpi_fakekey $KEY_BRIGHTNESSUP
and in /etc/acpi/events/ a script sony-brightness-up:
Code:
# /etc/acpi/events/sony-brightness-up

event=sony/hotkey SNC 00000001 00000011
action=/etc/acpi/sony-brn-up.sh
and the same for brightness-down; however the keys aren't registered by xev. Am I doing something wrong?

Thank you
The "acpi_fakekey $KEY_BRIGHTNESSUP" command doesn't work for me neither, instead, I write directly inside "/sys/class/backlight/nvidia_backlight/brightness", see my example in the download section. This is an ugly workaround (you don't have OSD this way), good practive should be to have a look at the /usr/share/doc/udev/README.keymap.txt.gz and fill a bug report (there are some work for Sony laptops Fn keys on Launchpad but not released yet for Ubuntu 10.10).

Guillaume
guillaumezin is offline   Reply With Quote
Old 01-03-11, 11:16 AM   #96
Zem
Registered User
 
Join Date: Jan 2011
Posts: 14
Default Re: Linux backlight driver

I'll try that, thanks.

I also have another problem.
Everytime an application goes in fullscreen, or I lock the screen, or I play a video with mplayer (not vlc or xine), brightness is reset to 100%.

Is anybody else affected by this?
Zem is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:39 PM.


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