New: Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong)
https://bugs.freedesktop.org/show_bug.cgi?id=31920
Summary: Brightness control is erratic
(/sys/class/backlight/nv_backlight/max_brightness is wrong)
Product: xorg
Version: git
Platform: Other
OS/Version: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Driver/nouveau
AssignedTo: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]
I have a Sony Vaio CW2 laptop, with an Nvidia GeForce 310M card. I am using the nouveau driver from git (via the xorg-edgers ubuntu repository). I have to say it works really well - I even get desktop effects in KDE with Gallium.
However, there is one problem with screen brightness. The max_brightness value for the backlight interface (/sys/class/backlight/nv_backlight/max_brightness) is set to 1025. When I use KDE power-devil (or any brightness control tool), it reduces the brightness by tiny fractions, which still keeps the screen at full brightness. The brightness actually varies only between 0 and 127 (128-1025 are full brightness), and then too only if I change it in increments of 10 or 20. I think ideally the max_brightness value should be 7 (or 10?) and it should vary in steps of 1.
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
A message that is not in the archive (sent off-list or not yet received): bug-31920-8800-V0hAGp6uBxMKqLRl/[email protected]/
[Bug 31920] Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong)
https://bugs.freedesktop.org/show_bug.cgi?id=31920
--- Comment #1 from Rohan Dhruva <[email protected]> 2010-11-25 10:08:13 PST --- Created an attachment (id=40571)
--> (https://bugs.freedesktop.org/attachment.cgi?id=40571)
dmesg
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 31920] Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong)
In reply to a message not in the archivehttps://bugs.freedesktop.org/show_bug.cgi?id=31920
--- Comment #2 from Rohan Dhruva <[email protected]> 2010-11-25 10:08:44 PST --- Created an attachment (id=40572)
--> (https://bugs.freedesktop.org/attachment.cgi?id=40572)
xorg.log
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 31920] Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong)
In reply to a message not in the archivehttps://bugs.freedesktop.org/show_bug.cgi?id=31920
--- Comment #3 from Rohan Dhruva <[email protected]> 2010-11-25 10:09:16 PST --- Created an attachment (id=40573)
--> (https://bugs.freedesktop.org/attachment.cgi?id=40573)
lspci
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 31920] Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong)
In reply to a message not in the archivehttps://bugs.freedesktop.org/show_bug.cgi?id=31920
--- Comment #4 from Rohan Dhruva <[email protected]> 2011-01-17 18:25:44 PST --- For a while, I've been using the nvidiabl drive for brightness control. I
noticed that it correctly detects the max and min values for my laptop and
video card. I was wondering if the nouveau code could somehow benefit from the
work done by the nvidiabl author. The code is present here -
https://github.com/guillaumezin/nvidiabl
The corresponding thread is here --
http://www.nvnews.net/vbulletin/showthread.php?t=143025 and I think some relevant updates/changes for my laptop model (VPCCW2) are here -
http://www.nvnews.net/vbulletin/showthread.php?t=143025&page=8
From all the feedback on the forum, it appears that nvidiabl works fine for everyone. I am not a developer, but if someone could guide me, I could probably help in figuring out how to use nvidiabl code in nouveau. Thanks!
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 31920] Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong)
In reply to a message not in the archivehttps://bugs.freedesktop.org/show_bug.cgi?id=31920
--- Comment #5 from Rohan Dhruva <[email protected]> 2011-04-24 01:22:02 PDT --- Is there a way to prevent nouveau from creating the/sys/class/backlight/nv_backlight interface? If not, could it be added as a
kernel parameter?
I find that brightness control works much better with the nvidiabl drivers, and I'd prefer to use those with nouveau if possible.
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 31920] Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong)
In reply to a message not in the archivehttps://bugs.freedesktop.org/show_bug.cgi?id=31920
--- Comment #6 from Marcin Slusarz <[email protected]> 2011-04-24 01:33:26 PDT --- It would be better to integrate nvidiabl into nouveau.
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 31920] Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong)
In reply to a message not in the archivehttps://bugs.freedesktop.org/show_bug.cgi?id=31920
--- Comment #7 from Rohan Dhruva <[email protected]> 2011-04-24 01:35:05 PDT --- Agreed. Is there some way this could be kickstarted?
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 31920] Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong)
In reply to a message not in the archivehttps://bugs.freedesktop.org/show_bug.cgi?id=31920
--- Comment #8 from Rohan Dhruva <[email protected]> 2011-04-24 01:41:18 PDT --- I have filed a new issue on the nvidiabl tracker --
https://github.com/guillaumezin/nvidiabl/issues/8
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 31920] Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong)
In reply to a message not in the archivehttps://bugs.freedesktop.org/show_bug.cgi?id=31920
--- Comment #9 from Rohan Dhruva <[email protected]> 2011-09-23 23:37:43 PDT --- Hello.. Has there been any update on this? Thanks!
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 31920] Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong)
In reply to a message not in the archivehttps://bugs.freedesktop.org/show_bug.cgi?id=31920
--- Comment #10 from Ben Skeggs <[email protected]> 2011-09-23 23:50:21 PDT --- Try the nouveau kernel git tree, there's been some updates there semi-recently
to this area.
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 31920] Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong)
In reply to a message not in the archivehttps://bugs.freedesktop.org/show_bug.cgi?id=31920
--- Comment #11 from Rohan Dhruva <[email protected]> 2011-09-25 22:19:47 PDT --- I tried both the latest nouveau kernel git tree, and latest X.org packages from
git (via the xorg-edgers ubuntu repository). None of them fix this bug.
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 31920] Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong)
In reply to a message not in the archivehttps://bugs.freedesktop.org/show_bug.cgi?id=31920
--- Comment #12 from Ben Skeggs <[email protected]> 2011-09-26 04:57:33 PDT --- What value does the various nv_backlight files have now?
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 31920] Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong)
In reply to a message not in the archivehttps://bugs.freedesktop.org/show_bug.cgi?id=31920
--- Comment #13 from Rohan Dhruva <[email protected]> 2011-09-26 09:24:30 PDT --- If anything, it has become less granular now. Here are some of the outputs:
rohan@ubuntu:/sys/class/backlight/nv_backlight$ cat max_brightness 1025 rohan@ubuntu:/sys/class/backlight/nv_backlight$ cat actual_brightness 615 rohan@ubuntu:/sys/class/backlight/nv_backlight$ cat brightness 615 rohan@ubuntu:/sys/class/backlight/nv_backlight$ cat bl_power 0 rohan@ubuntu:/sys/class/backlight/nv_backlight$ cat brightness 103 rohan@ubuntu:/sys/class/backlight/nv_backlight$
IIRC, the max_brightness is still same as before (1025). However, the actual "max" looks to be something around 615.
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 31920] Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong)
In reply to a message not in the archivehttps://bugs.freedesktop.org/show_bug.cgi?id=31920
--- Comment #14 from Emil Velikov <[email protected]> 2011-09-26 11:57:26 PDT --- Rohan
Can you please make sure that you are running nouveau kernel git tree [1] as the official kernel does _not_ yet have those changes
If you are interested what those changes are, here is the list [2]
Thanks
[1] http://cgit.freedesktop.org/nouveau/linux-2.6/
[2]
http://cgit.freedesktop.org/nouveau/linux-2.6/log/drivers/gpu/drm/nouveau/nouveau_backlight.c
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 31920] Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong)
In reply to a message not in the archivehttps://bugs.freedesktop.org/show_bug.cgi?id=31920
--- Comment #15 from Rohan Dhruva <[email protected]> 2011-09-26 11:59:55 PDT ---
Emil: Thank you for the links! I'm indeed running the latest DRM code. I
followed the instructions here --
http://nouveau.freedesktop.org/wiki/InstallDRM. I cloned the repo without
history, and did an out-of-tree build.
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 31920] Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong)
In reply to a message not in the archivehttps://bugs.freedesktop.org/show_bug.cgi?id=31920
--- Comment #16 from Emil Velikov <[email protected]> 2011-09-26 12:21:16 PDT --- Rohan
If you are using the latest kernel code, nouveau will report "max_brightness==100"
See commit drm/nv50/backlight: express brightness level in percent - bc0df418
Cheers
Emil
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 31920] Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong)
In reply to a message not in the archivehttps://bugs.freedesktop.org/show_bug.cgi?id=31920
--- Comment #17 from Rohan Dhruva <[email protected]> 2011-09-26 12:29:25 PDT --- I just did a git pull, make clean, and recompiled the modules. My modules.dep
file also shows that the extra/ directory is being used for nouveau modules. Is
there anything else I must be doing? I'm quite sure that the stock ubuntu
modules are being overriden.
I'm also attaching my dmesg and xorg.log to be sure :)
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 31920] Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong)
In reply to a message not in the archivehttps://bugs.freedesktop.org/show_bug.cgi?id=31920
--- Comment #18 from Rohan Dhruva <[email protected]> 2011-09-26 12:30:13 PDT --- Created an attachment (id=51641)
--> (https://bugs.freedesktop.org/attachment.cgi?id=51641)
Latest dmesg
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 31920] Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong)
In reply to a message not in the archivehttps://bugs.freedesktop.org/show_bug.cgi?id=31920
Rohan Dhruva <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #40571|0 |1
is obsolete| |
Attachment #40572|0 |1
is obsolete| |--- Comment #19 from Rohan Dhruva <[email protected]> 2011-09-26 12:30:46 PDT --- Created an attachment (id=51642)
--> (https://bugs.freedesktop.org/attachment.cgi?id=51642)
Latest xorg.log
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 31920] Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong)
In reply to a message not in the archivehttps://bugs.freedesktop.org/show_bug.cgi?id=31920
--- Comment #20 from Ben Skeggs <[email protected]> 2011-09-26 15:34:52 PDT --- (In reply to comment #17)
Quoted 6 lines
I just did a git pull, make clean, and recompiled the modules. My modules.dep file also shows that the extra/ directory is being used for nouveau modules. Is there anything else I must be doing? I'm quite sure that the stock ubuntu modules are being overriden.
I'm also attaching my dmesg and xorg.log to be sure :)
I'm afraid somehow you're still getting the old driver loaded. The code in nouveau git *cannot* report max_brightness of 1025 anymore, as evidenced by this section of the patches linked above:
- props.max_brightness = 1025;
+ props.max_brightness = 100;
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 31920] Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong)
In reply to a message not in the archivehttps://bugs.freedesktop.org/show_bug.cgi?id=31920
--- Comment #21 from Rohan Dhruva <[email protected]> 2011-09-26 15:47:25 PDT --- Is there any way I can debug this issue? Maybe modify some other file I can
modify? Delete the older modules? Thank you for your patience.
Btw, when will this code merge into mainstream? I was wondering if we'll see it in next release of major distros.
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 31920] Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong)
In reply to a message not in the archivehttps://bugs.freedesktop.org/show_bug.cgi?id=31920
--- Comment #22 from Ben Skeggs <[email protected]> 2011-09-26 16:01:12 PDT --- (In reply to comment #21)
Quoted 2 lines
Is there any way I can debug this issue? Maybe modify some other file I can modify? Delete the older modules? Thank you for your patience.
I suggest perhaps deleting any directory in /lib/modules that contains nouveau.ko/drm.ko and friends, then reinstalling them from the nouveau git tree you built.
Quoted 3 lines
Btw, when will this code merge into mainstream? I was wondering if we'll see it in next release of major distros.
The patches are queued for kernel 3.2.
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 31920] Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong)
In reply to a message not in the archivehttps://bugs.freedesktop.org/show_bug.cgi?id=31920
--- Comment #23 from Lucas Stach <[email protected]> 2011-09-27 01:09:13 PDT --- Don't know if Ubuntu uses this, but Fedora stuffs the nouveau driver into the
initrd. If Ubuntu does a similar thing you have to rebuild your initrd after
installing the new modules to get your newly built nouveau loaded.
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 31920] Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong)
In reply to a message not in the archivehttps://bugs.freedesktop.org/show_bug.cgi?id=31920
Rohan Dhruva <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED--- Comment #25 from Rohan Dhruva <[email protected]> 2012-03-31 23:00:06 UTC --- This has been working for me since kernel 3.1, in Fedora 16. I also tried
kernel 3.2 in Ubuntu 12.04, and it has been working fine out of the box.
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 31920] Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong)
In reply to a message not in the archivehttps://bugs.freedesktop.org/show_bug.cgi?id=31920
--- Comment #24 from Alex Mayorga Adame <alex_mayorga-/[email protected]> 2012-03-31 22:55:16 PDT --- Did this make it into kernel 3.2? What can be done for the brightness controls
to work properly?
I reported https://bugs.launchpad.net/nouveau/+bug/551668 a while ago on Ubuntu's bug tracker I believe is this bug or a related one and it is still causing problems on the following configuration:
alex-mayorga@VPCCW1FFXL:~$ uname -a Linux VPCCW1FFXL 3.2.0-21-generic #34-Ubuntu SMP Fri Mar 30 04:25:35 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux alex-mayorga@VPCCW1FFXL:~$ lspci -nn | grep VGA 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GT216 [GeForce GT 230M] [10de:0a2a] (rev a2) alex-mayorga@VPCCW1FFXL:~$ apt-cache show xserver-xorg-video-nouveau Package: xserver-xorg-video-nouveau Priority: optional Section: x11 Installed-Size: 344 Maintainer: Ubuntu Developers <[email protected]> Original-Maintainer: Debian X Strike Force <[email protected]> Architecture: amd64 Version: 1:0.0.16+git20111201+b5534a1-1build2 Provides: xorg-driver-video Depends: libc6 (>= 2.4), libdrm-nouveau1a (>= 2.4.23), libudev0 (>= 147), xorg-video-abi-11, xserver-xorg-core (>= 2:1.10.99.901) Recommends: libgl1-mesa-dri (>= 7.11.1) Filename: pool/main/x/xserver-xorg-video-nouveau/xserver-xorg-video-nouveau_0.0.16+git20111201+b5534a1-1build2_amd64.deb Size: 109400 MD5sum: 5ab8e5861a11a57d783fa9862d88900f SHA1: 7abb48438df08eed97dd4676bc111bdbaf714376 SHA256: 886d7e2f968819373d81a932388ede20995d9bd1d3d8f2091100f988a314a780 Description-en: X.Org X server -- Nouveau display driver This driver for the X.Org X server (see xserver-xorg for a further description) provides support for NVIDIA Riva, TNT, GeForce, and Quadro cards. . This package provides 2D support including EXA acceleration, Xv and RandR. 3D functionality is provided by the libgl1-mesa-dri package. . This package is built from the FreeDesktop.org xf86-video-nouveau driver. Homepage: http://nouveau.freedesktop.org/wiki/ Description-md5: b084a16945b86c1eda89ad33dbb4530d Bugs: https://bugs.launchpad.net/ubuntu/+filebug Origin: Ubuntu Supported: 5y Task: ubuntu-desktop, ubuntu-usb, kubuntu-desktop, kubuntu-active-desktop, kubuntu-active, edubuntu-desktop, edubuntu-usb, xubuntu-desktop, mythbuntu-frontend, mythbuntu-desktop, mythbuntu-backend-slave, mythbuntu-backend-master, lubuntu-core, ubuntustudio-desktop
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.