Bug 9278 - Unable to write the value "100" to brightness proc entry
Summary: Unable to write the value "100" to brightness proc entry
Status: CLOSED PATCH_ALREADY_AVAILABLE
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Video (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Zhang Rui
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-02 06:21 UTC by Danny Baumann
Modified: 2007-12-03 22:47 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.23
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
Adjust buffer size so that "100" can be written (1008 bytes, patch)
2007-11-02 06:22 UTC, Danny Baumann
Details | Diff

Description Danny Baumann 2007-11-02 06:21:24 UTC
Most recent kernel where this bug did not occur: none
Distribution: Fedora 8
Problem Description:

Currently, one can't write the value "100" to /proc/acpi/video/.../LCD/brightness. This is rejected because the buffer is too small - while 4 bytes are written (100 + NULL byte), the space is only sufficient for 3 bytes.
Comment 1 Danny Baumann 2007-11-02 06:22:15 UTC
Created attachment 13374 [details]
Adjust buffer size so that "100" can be written

This patch increases the buffer size so that the value "100" can be written successfully.
Comment 2 Zhang Rui 2007-11-05 00:16:40 UTC
Oops, no one tried this before? :p
I'm sure you can use "/sys/class/backlight/.../" to set your brightness level correctly, right?
Comment 3 Zhang Rui 2007-11-05 00:17:41 UTC
Mark this bug as PATCH_ALREADY_AVAILABLE.

But as the proc I/F is deprecated by the new sys I/F, and there has been already an alternative for acpi video brightness control. Not sure this will be merged or not. :)
Comment 4 Danny Baumann 2007-11-05 00:36:43 UTC
(In reply to comment #3)
> Mark this bug as PATCH_ALREADY_AVAILABLE.
> 
> But as the proc I/F is deprecated by the new sys I/F, and there has been
> already an alternative for acpi video brightness control. Not sure this will
> be
> merged or not. :)

Well, when will the procfs support be dropped completely? If it's in 2.6.24, I'm completely fine with that. If later, I think it should be working correctly as long as it's included ;)
> 
Comment 5 Len Brown 2007-11-18 22:55:59 UTC
c88c5786d3df51ccfa4e2d111fc9c8fc0f5b2797
(ACPI: Video: Increase buffer size for writes to brightness proc file.)
applied to acpi tree
Comment 6 Len Brown 2007-12-03 22:47:53 UTC
shipped in linux-2.6.24-rc4
closed

Note You need to log in before you can comment on or make changes to this bug.