xbacklight doesn't work, but xrandr does and so does /sys/class/backlight

Bug #1054298 reported by Brian K. White
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Medium
Unassigned

Bug Description

Sony Vaio P
Ubuntu Precise and Quantal
kernel 3.5.0
gma500_gfx kernel driver
modesetting xorg driver
Assume the current quantal & quantal-proposed versions of everything.

xbacklight doesn't work. No backlight change, and no output from the program.
"xbacklight" and "xbacklight -get" show nothing, no output from the program at all.
"xbacklight -set50" and "xbacklight-d :0 -set 50" does nothing nor prints any output.

However both sysfs and xrandr work fine.

Specifically:
xrandr --verbose lists outputs and shows the main screen has backlight property,
and "xrandr --output LVDS-0 --set backlight 50" changes the backlight brightness.

And

"cat /sys/class/backlight/psb-bl/actual_brightness" shows the current brightness, and
"echo 50 >/sys/class/backlight/psb-bl/brightness" changes the brightness.

I have written the following script to use in place of xbacklight:
http://forums.bodhilinux.com/index.php?/topic/5985-brightness-scripts/page__view__findpost__p__56911

This script, both the sysfs and xrandr methods of it, works fine for me on the same machine.
(for sysfs, I had to make a udev rule to allow users to write to the sysfs files, as noted on that page and in the --help output of the script)
It requires zenity for the user interactive options. Not needed for the non-interactive options.

--
bkw

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1054298/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
Book 'em Dano (heymrdjd) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command, as it will automatically gather debugging information, in a terminal:

  apport-collect 1054298

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. Please include the information requested at https://wiki.ubuntu.com/Kernel/Debugging/Backlight as separate attachments. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

affects: ubuntu → linux (Ubuntu)
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.6 kernel[0] (Not a kernel in the daily directory) and install both the linux-image and linux-image-extra .deb packages.

Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. Please only remove that one tag and leave the other tags. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text.

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.6-rc7-quantal/

Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: needs-upstream-testing
Revision history for this message
Brian K. White (bkw777) wrote :

/sys/class/backlight/psb-bl/brightness works fine.

The xrandr program also works fine.

This script, which uses either of those, works fine.
http://code.google.com/p/bltool/

Only xbacklight doesn't, and at least some other things, such as the backlight module in enlightenment 17.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
Revision history for this message
My name (plmalternate) wrote :

Still doesn't work in Saucy.
For me, none of the following, cause any change in screen appearance, nor to they bring any response in lxterminal other than a new prompt:

xbacklight -get
xbacklight -set 100 -time 0
xbacklight -set 20 -time 0
xbacklight -set 2 -time 0

Running Saucy in plain openbox, no lxde other than lxterminal.

Also, as an aside, I think #4 may be misleading in saying "The xrandr program also works fine."
These commands work fine:
[code]
# Sets the "brightness" (i.e., thev transparency) of the LCD layer very dark:
xrandr --output VGA-0 --brightness 0.1
# Legitimate values are 0 to 1
# Sets the "brightness" (i.e., thev transparency) of the LCD layer all the way up:
xrandr --output VGA-0 --brightness 1
[/code]
but, unless I've misunderstood man xrandr they DO NOT affect the actual brightness of the backlight. In a well lit room, the effect looks very similar, but in a dark room the difference should be apparent.

It may be I haven't figured out the syntax correctly, but for me in Saucy, none of these do anything:
[code]
xrandr --output VGA-0 --set backlight 50
xrandr --output LVDS-0 --set backlight 50
xrandr --output --auto --set backlight 50
xrandr --output auto --set backlight 50
[/code]

Revision history for this message
My name (plmalternate) wrote :

Everything I wrote above is still true for me in 14.04, Trusty, 64 bit version, with pretty much the same setup, plain Openbox (no LXDE, no Lubuntu, no other DE) and lxterminal.

Revision history for this message
saeed najdm (saeed-najdmohtasham) wrote :

for ubuntu 16.04 on HP pavilion dv6 and Nvidia Graphic driver,
the problem is the same.

xbacklight -set 100 ----> NOT WORKS
xrandr --output LVDS-0 --set Backlight 100 ----> NOT WORKS
xrandr --output LVDS-0 --brightness 1 ----> WORKS(IT HAS A DIFFERENT EFFECT!)
echo 1 |sudo tee /sys/class/backlight/acpi_video0/brightness ----> WORKS

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.