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

Newegg Daily Deals

Reply
 
Thread Tools
Old 07-03-10, 02:42 AM   #61
damdim
Registered User
 
Join Date: Jan 2010
Posts: 21
Default Re: Linux backlight driver

I have just tried your script in a VAIO VPCCW1S1E with Arch installed and it works. The only problem is that max_brightness value in my laptop equals to 127, so I had to change the increment from "1" to "10" and also the value of $BBL and the starting value of $GVAR.
damdim is offline   Reply With Quote
Old 07-03-10, 12:27 PM   #62
muddenhed
Creator of oBacklight
 
Join Date: Apr 2010
Posts: 19
Default Re: Linux backlight driver

Quote:
Originally Posted by damdim View Post
I have just tried your script in a VAIO VPCCW1S1E with Arch installed and it works. The only problem is that max_brightness value in my laptop equals to 127, so I had to change the increment from "1" to "10" and also the value of $BBL and the starting value of $GVAR.
Thanks for your response damdim. i will look into this and make appropiate changes to the script.

/Marcus
muddenhed is offline   Reply With Quote
Old 07-03-10, 02:46 PM   #63
muddenhed
Creator of oBacklight
 
Join Date: Apr 2010
Posts: 19
Default Re: Linux backlight driver

Quote:
Originally Posted by damdim View Post
I have just tried your script in a VAIO VPCCW1S1E with Arch installed and it works. The only problem is that max_brightness value in my laptop equals to 127, so I had to change the increment from "1" to "10" and also the value of $BBL and the starting value of $GVAR.
I have now released version 0.3.3. of this script with changes that will make it easier to change the above values.

Fetch it from here...

/Marcus
muddenhed is offline   Reply With Quote
Old 07-04-10, 06:55 AM   #64
damdim
Registered User
 
Join Date: Jan 2010
Posts: 21
Default Re: Linux backlight driver

Nice changes Marcus. But there is another small problem I forgot to wright in my previous post. In the "Brightness down acpi event" you should add another "if statement" that checks if GVAR is less or equal to MBV-DID. The same goes for "Brightness up acpi event" that checks if GVAR is greater or equal to DID. f.e.

Code:
 # Brightness down acpi event
  if [ "$CMD" == "00000001 00000010" ]
   then
    if [ "$GVAR" -ge "$DID" ]
     then
      SVAR=$(($GVAR - $DID))
      echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness
      echo $SVAR > /root/oBacklight.def
      else
      SVAR="0"
      echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness
      echo $SVAR > /root/oBacklight.def
    fi
  fi

  # Brightness up acpi event
  if [ "$CMD" == "00000001 00000011" ]
   then
     if [ "$GVAR" -le $(($MBV-$DID)) ]
     then
      SVAR=$(($GVAR + $DID))
      echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness
      echo $SVAR > /root/oBacklight.def
      else
      SVAR=$MBV
      echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness
      echo $SVAR > /root/oBacklight.def
    fi
  fi
damdim is offline   Reply With Quote
Old 07-04-10, 01:22 PM   #65
muddenhed
Creator of oBacklight
 
Join Date: Apr 2010
Posts: 19
Default Re: Linux backlight driver

Thanks damdim, excellent spotting.

Didn't notice that issue myself since only use 1 in stepping. I added your suggestion into the code and it will be in the 0.3.4 release.

Thanks again, and if you find anything else just let me know so i can fix it.
muddenhed is offline   Reply With Quote
Old 07-06-10, 01:22 PM   #66
Satarsa
Registered User
 
Join Date: Jul 2010
Posts: 3
Default Re: Linux backlight driver

Quote:
Originally Posted by damdim View Post
I changed a little the source so it can compile against a 2.6.34 kernel. The changes were copied from MacTel Team latest module (https://launchpad.net/~mactel-support/+archive/ppa). Change the .min and .max values to fit your hardware and add the pci id to "static DEFINE_PCI_DEVICE_TABLE(nvidia_bl_device_table)" section accordingly from http://us.download.nvidia.com/XFree8...ppendix-a.html if your card is not already there.
P.S. It will compile only against a 2.6.34 kernel. For a previous kernel use the original source from guillaumezin in the first post.
For me these code doesn't work. gcc says that FB_BACKLIGHT_LEVELS is not defined. How should it be done?
Satarsa is offline   Reply With Quote
Old 07-07-10, 04:14 AM   #67
Satarsa
Registered User
 
Join Date: Jul 2010
Posts: 3
Default Re: Linux backlight driver

Quote:
Originally Posted by Satarsa View Post
For me these code doesn't work. gcc says that FB_BACKLIGHT_LEVELS is not defined. How should it be done?
Ok, I've found that this is the value of the relative maximum of the brightness. I've just defined it in the beginning an it works with my vaio vpccw2s1r with gf 330m and gentoo linux.
Thank you, that's really great.
Satarsa is offline   Reply With Quote
Old 07-15-10, 06:25 PM   #68
superlex88
Registered User
 
Join Date: May 2010
Posts: 4
Default Re: Linux backlight driver

Hi!
I'm trying openSUSE11.3 on a Sony Vaio FZ31M. The version of nvidia_bl for kernel 2.6.31 works very well, but the version for kernel 2.6.34 gives random brightness' values, both with fn keys and with scroll of Battery Management.

EDIT:
Fixed changing

Code:
static struct driver_data nv5x_driver_data = {
	.bar           = 0,
	.reg_offset    = NV5X_PDISPLAY_OFFSET + NV5X_PDISPLAY_SOR0_BRIGHTNESS,
	.reg_size      = 4,
	.off           = 0,
	.min           = 1024,
	.max           = 140000,
	.backlight_ops = {
#ifdef USE_BACKLIGHT_SUSPEND
		.options        = BL_CORE_SUSPENDRESUME,
#endif
		.get_brightness = nv5x_get_intensity,
		.update_status  = nv5x_set_intensity,
	}
};
in

Code:
static struct driver_data nv5x_driver_data = {
	.bar           = 0,
	.reg_offset    = NV5X_PDISPLAY_OFFSET + NV5X_PDISPLAY_SOR0_BRIGHTNESS,
	.reg_size      = 4,
	.off           = 0,
	.min           = 50,
	.max           = 1024,
	.backlight_ops = {
#ifdef USE_BACKLIGHT_SUSPEND
		.options        = BL_CORE_SUSPENDRESUME,
#endif
		.get_brightness = nv5x_get_intensity,
		.update_status  = nv5x_set_intensity,
	}
};
superlex88 is offline   Reply With Quote

Old 08-08-10, 08:25 PM   #69
mrmac
Registered User
 
Join Date: Aug 2010
Posts: 1
Default Re: Linux backlight driver

hi guys! reading about this module gave me hopes for getting backlight control in ubuntu for my macbook pro 15".

i compile the driver, load it successfully

but

echo 7 > /sys/devices/virtual/backlight/nvidia_backlight/brightness
does nothing.


i have these two cards in my ubunu 10.04 laptop

mamo@xerxes:~$ lspci |grep -i vga
02:00.0 VGA compatible controller: nVidia Corporation G96 [GeForce 9600M GT] (rev a1)
03:00.0 VGA compatible controller: nVidia Corporation C79 [GeForce 9400M] (rev b1)

the one connected to my panel is the the 9400M one.

I figured that maybe the second card interferes somehow , so i commented away the vendor string for the 9600M card in the sources, but still no difference.
mrmac is offline   Reply With Quote
Old 08-29-10, 02:01 PM   #70
sambiase
Registered User
 
Join Date: Feb 2008
Posts: 3
Default Re: Linux backlight driver

Hi All,

I recently bough a Sony Vaio VPC S12C5E and installed openSuse 11.3 on it. Most of the things are working but I cant get brightness and FN keys to work. I read most of the posts in this thread and the majority relates to Ubuntu but as written before, I run suse 11.3. Below I state more info regarding my laptop:

kernel 2.6.34-12-desktop
nvidia GeForce 310M
NVIDIA Driver Version: 256.35
cat /sys/class/dmi/id/sys_vendor --> Sony Corporation
cat /sys/class/dmi/id/product_name --> VPCS12C5E
locate nvidia_bl --> /lib/modules/2.6.34-12-desktop/kernel/drivers/video/backlight/mbp_nvidia_bl.ko
/usr/src/linux-2.6.34-12/drivers/video/backlight/mbp_nvidia_bl.c


I really appreciate any help since brightness is running at max and this decrease my battery life. Thanks in advance.
sambiase is offline   Reply With Quote
Old 09-14-10, 03:04 PM   #71
vagopestoso
Registered User
 
Join Date: Sep 2010
Posts: 2
Default Re: Linux backlight driver

Hi,
I'm following the indications here for my vpccw1s1e and i have it almost working.
But i have a question:
How do you know which min and max values should be put in the struct nv5x_driver_data?
Because I changed .min to 1024 and .max to 133000 and it works. But how do you know those are the correct values?

Thank you very much!
vagopestoso is offline   Reply With Quote
Old 09-14-10, 05:24 PM   #72
Satarsa
Registered User
 
Join Date: Jul 2010
Posts: 3
Default Re: Linux backlight driver

Quote:
Originally Posted by vagopestoso View Post
Hi,
I'm following the indications here for my vpccw1s1e and i have it almost working.
But i have a question:
How do you know which min and max values should be put in the struct nv5x_driver_data?
Because I changed .min to 1024 and .max to 133000 and it works. But how do you know those are the correct values?

Thank you very much!
Acctually, I don't know! I tried different .max values and starting from values > 140000 it doesn't change the brightness. Thus I just chose 140000.
Satarsa 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 01:14 AM.


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