forked from guillaumezin/nvidiabl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
176 lines (97 loc) · 6.75 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
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-support) that enables the control of laptop backlight connected to NVIDIA chip using the /sys/class/backlight interface.
Kubuntu 9.10 for instance uses this interface to control the backlight from powerdevil.
It is tested with a Sony AW11M/H laptop (Nvidia 9300M GS). Other users successfully tested it on other laptops (have a look at the nvidiabl-laptops.h file).
Installation from nvidiabl-dkms_xxxx_all.deb file (Debian and distributions based on it):
_________________________________________________________________________________________
Install the file from your favorite software manager or type:
sudo dpkg -i nvidiabl-dkms_xxxx_all.deb
Uninstallation (after installation from nvidiabl-dkms_xxxx_all.deb file):
_________________________________________________________________________
Uninstall the nvidiabl package from your favorite software manager or type:
sudo dpkg -r nvidiabl
Installation from nvidiabl-x.xx-source-only.dkms.tar.gz file:
_____________________________________________________________
If not already done, install DKMS, for instance with Ubuntu:
sudo aptitude update && sudo aptitude install dkms
Then:
sudo dkms ldtarball --archive=nvidiabl-x.xx-source-only.dkms.tar.gz build install
Where x.xx is the nvidiabl module version.
Uninstallation (after installation from nvidiabl-x.xx-source-only.dkms.tar.gz file):
____________________________________________________________________________________
cd /usr/src/nvidiabl-x.xx
make dkms-remove
Where x.xx is the nvidiabl module version. To know what version are installed on your system, type:
dkms status
If nvidiabl is the last module to use DKMS, you can remove the DKMS package, for instance with Ubuntu, type:
sudo aptitude remove dkms
Installation from source files:
_______________________________
If not already done, install DKMS, for instance with Ubuntu, type:
sudo aptitude update && sudo aptitude install dkms
Uncompress the source files and from that directory, type:
make dkms-install
Then you can erase the directory where source files have been uncompressed.
Create a package:
_________________
For instance for version 0.72:
sudo dkms mkdeb mktarball --source-only -m nvidiabl -v 0.72
Then the package should be available here: /var/lib/dkms/nvidiabl/0.72/tarball/nvidiabl-0.72-source-only.dkms.tar.gz
Uninstallation (after installation from nvidiabl-x.xx-source-only.dkms.tar.gz file or from source files version 0.59 or newer):
_______________________________________________________________________________________________________________________________
cd /usr/src/nvidiabl-x.xx
make dkms-remove
Where x.xx is the nvidiabl module version. To know what versions are installed on your system, type:
dkms status
If nvidiabl is the last module to use DKMS, you can remove the DKMS package, for instance with Ubuntu, type:
sudo aptitude remove dkms
Uninstallation (after installation from source files or from nvidiabl-x.xx-source-only.dkms.tar.gz for version 0.58 or older):
______________________________________________________________________________________________________________________________
sudo dkms remove -m nvidiabl -v x.xx --all
sudo rm -rf /usr/src/nvidiabl-x.xx
Where x.xx is the nvidiabl module version 0.58 or previous. To know what version are installed on your system, type:
dkms status
On some older version, the package name can be nvbacklight or nvidia_bl.
If nvidiabl is the last module to use DKMS, you can remove the DKMS package, for instance with Ubuntu, type:
sudo aptitude remove dkms
Driver loading:
_______________
The driver autoloads at boot up for Sony Vaio VGN AW11, FZ11 and FZ38 laptops and other laptops, have a look in the nvidiabl-laptops.h file.
To load the driver manually, you need to add a line containing nvidiabl in /etc/modules.
If you want the driver to autoload for your laptop without adding a line to /etc/modules, please give me the output of:
lspci -nn
cat /sys/class/dmi/id/sys_vendor
cat /sys/class/dmi/id/product_name
Driver debug:
_____________
If you know Linux driver programming, you can modify yourself the nvidiabl-laptops.h and send me the line you added.
You can debug the driver with the following options:
module_param_named(off, off, long, 0644);
MODULE_PARM_DESC(off, "value to put in the register to disable the backlight, negative value is interpreted as percentage of maximum, -101 for default, autodetect otherwise");
module_param_named(min, min, long, 0644);
MODULE_PARM_DESC(min, "minimum register value for the backlight, negative value is interpreted as percentage of maximum, -101 for default, autodetect otherwise");
module_param_named(max, max, long, 0644);
MODULE_PARM_DESC(max, "maximum register value for the backlight, -101 for default, autodetect otherwise");
module_param_named(screen_type, screen_type, long, 0644);
MODULE_PARM_DESC(max, "screen type, 0 for default, 1 for auto, 2 to force LVDS, 3 to force EPD");
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");
For instance, if you want to test 50 as min value and 500 as max value, type:
sudo modprobe -r nvidiabl
sudo modprobe nvidiabl min=50 max=500
I can change the backlight value from the power settings GUI but my Fn keys are not working:
____________________________________________________________________________________________
On https://github.com/guillaumezin/nvidiabl/blob/master/scripts, there are bash (in /usr/local/sbin) and ACPI (in /etc) scripts examples that permit on my laptop to use Fn keys to change the backlight settings. This is an ugly workaround (you don't have OSD this way), good practice should be to have a look at the /usr/share/doc/udev/README.keymap.txt.gz and fill a bug report.
There is some intereting scripts here too: http://dev.osource.se/software/obacklight.
Redirect brightness control Fn keys on Lenovo's Thinkpads
_________________________________________________________
In order to redirect the brightness control Fn keys to nvidiabl you have to disable the brightness feature of the thinkpad acpi module. Simple create the file /etc/modprobe.d/thinkpad.conf and add the line
options thinkpad_acpi brightness_enable=0
Then type:
sudo rmmod thinkpad_acpi
sudo modprobe nividabl
sudo modprobel thinkpad_acpi
Instead of a modprobe option you may reconfigure the boot loader and add thinkpad_acpi.brightness_enable=0 to the command line.
nVidia staff is of course free to ship this driver with theirs!
Guillaume