Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 292581 - /proc/acpi/video/[system-specific]/LCD/brightness and /sys/class/backlight/acpi_video0/brightness don't fit
Summary: /proc/acpi/video/[system-specific]/LCD/brightness and /sys/class/backlight/ac...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-09 20:31 UTC by doggie
Modified: 2010-02-04 17:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix for unsorted values in /proc/acpi/video/.../brightness (acpi-video-backlight-fix.patch,700 bytes, patch)
2009-11-12 00:00 UTC, doggie
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description doggie 2009-11-09 20:31:43 UTC
Hi folks,

Here is some example code:

# cat /proc/acpi/video/VGA/LCD/brightness
levels:  70 50 20 30 40 60 80 90 100
current: 70
# cat /sys/class/backlight/acpi_video0/brightness
0

# echo 50 > /proc/acpi/video/VGA/LCD/brightness
# cat /proc/acpi/video/VGA/LCD/brightness
levels:  70 50 20 30 40 60 80 90 100
current: 50
# cat /sys/class/backlight/acpi_video0/brightness
1

# echo 60 > /proc/acpi/video/VGA/LCD/brightness
# cat /proc/acpi/video/VGA/LCD/brightness
levels:  70 50 20 30 40 60 80 90 100
current: 60
# cat /sys/class/backlight/acpi_video0/brightness
5

As we see, the association looks like:
70  | 0
50  | 1
20  | 2
30  | 3
40  | 4
60  | 5
80  | 6
90  | 7
100 | 8

But it should be like:
20  | 0
30  | 1
40  | 2
50  | 3
...

My system is a MSI GT627. I'm running a AMD64-kernel.
I tested the issue with various 2.6.30-tuxonice and the 2.6.31-tuxonice sources.

Thanks in advance,
doggie
Comment 1 doggie 2009-11-12 00:00:27 UTC
Created attachment 209969 [details, diff]
Fix for unsorted values in /proc/acpi/video/.../brightness

for 2.6.30-tuxonice-r6
Comment 2 Wormo (RETIRED) gentoo-dev 2009-11-30 02:27:07 UTC
This issue doesn't seem specific to tuxonice, so I'm going to ask the kernel team to take a look and see if it makes sense to submit this to mainline linux-acpi list.
Comment 3 Mike Pagano gentoo-dev 2009-12-07 19:01:25 UTC
Is this your patch or did you find it somewhere?

Comment 4 doggie 2009-12-07 19:47:43 UTC
I made it myself.

Comment 5 Mike Pagano gentoo-dev 2009-12-09 00:18:37 UTC
Can you submit this upstream, please.  Possibly, posting to the linux-acpi list for comments might be a good start
Comment 6 doggie 2009-12-13 10:05:03 UTC
Sry, what do you mean by "upstream"?

I already emailed the maintainer of drivers/acpi/video.c, Zhang Rui.
Comment 7 George Kadianakis (RETIRED) gentoo-dev 2010-01-12 13:50:07 UTC
(In reply to comment #6)
> Sry, what do you mean by "upstream"?
> 
> I already emailed the maintainer of drivers/acpi/video.c, Zhang Rui.
> 

So, do we have any news on this one?
Did your patch get accepted?