Summary: | Brightness control is erratic (/sys/class/backlight/nv_backlight/max_brightness is wrong) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | Rohan Dhruva <rohandhruva> | ||||||||||||
Component: | Driver/nouveau | Assignee: | Nouveau Project <nouveau> | ||||||||||||
Status: | RESOLVED FIXED | QA Contact: | Xorg Project Team <xorg-team> | ||||||||||||
Severity: | normal | ||||||||||||||
Priority: | medium | ||||||||||||||
Version: | git | ||||||||||||||
Hardware: | Other | ||||||||||||||
OS: | Linux (All) | ||||||||||||||
Whiteboard: | |||||||||||||||
i915 platform: | i915 features: | ||||||||||||||
Attachments: |
|
Description
Rohan Dhruva
2010-11-25 10:06:34 UTC
Created attachment 40571 [details]
dmesg
Created attachment 40572 [details]
xorg.log
Created attachment 40573 [details]
lspci
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! 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. It would be better to integrate nvidiabl into nouveau. Agreed. Is there some way this could be kickstarted? I have filed a new issue on the nvidiabl tracker -- https://github.com/guillaumezin/nvidiabl/issues/8 Hello.. Has there been any update on this? Thanks! Try the nouveau kernel git tree, there's been some updates there semi-recently to this area. 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. What value does the various nv_backlight files have now? 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. 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 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. 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 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 :) Created attachment 51641 [details]
Latest dmesg
Created attachment 51642 [details]
Latest xorg.log
(In reply to comment #17) > 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; 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. (In reply to comment #21) > 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. > > 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. 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. 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 <ubuntu-devel-discuss@lists.ubuntu.com> Original-Maintainer: Debian X Strike Force <debian-x@lists.debian.org> 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 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. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.