Screen Brightness
Screen Brightness
Hello world!
What would be the easiest way to control screen brightness? If its using ACPI (which I really don't want to do just yet) then I need to know how to do it without ASL because I don't have that implemented AT ALL quite yet.
Any help is appreciated.
~osmiumusa
What would be the easiest way to control screen brightness? If its using ACPI (which I really don't want to do just yet) then I need to know how to do it without ASL because I don't have that implemented AT ALL quite yet.
Any help is appreciated.
~osmiumusa
Re: Screen Brightness
Use the controls on your monitor to take care of it.
Re: Screen Brightness
No. Like on a LCD screen of a laptop. I want to dim the screen after a period of inactivity. I want this function written right into the kernel, but I don't know how to do it.
Re: Screen Brightness
How about using ASL compiler from http://www.acpi.info/toolkit.htm to turn the ASL into AML byte code,
and use that AML directly in your code?
I believe LCD brightness is controlled with ACPI _BCM (Brightness Control Method).
and use that AML directly in your code?
I believe LCD brightness is controlled with ACPI _BCM (Brightness Control Method).
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
Re: Screen Brightness
Sometimes it's implemented by the laptop's EC and can be controlled using a Fn key combo, no OS intervention required, not always however.osmiumusa wrote:No. Like on a LCD screen of a laptop. I want to dim the screen after a period of inactivity. I want this function written right into the kernel, but I don't know how to do it.
ACPI is the only "standard" method of controlling brightness, the publicly available specification has more information about this.. start on page 695, "ACPI Extensions for Display adapters". Indeed it appears an AML interpreter may be necessary.
Re: Screen Brightness
One ACPI Implementation with a license that allows it to be used in both closed and open-source projects is ACPICA (http://www.acpica.org/).
I believe several major operating systems use this to implement ACPI so it is pretty good.
I believe several major operating systems use this to implement ACPI so it is pretty good.
Re: Screen Brightness
In the "ACPI Shutdown" thread somewhere on this forum (linked from the wiki page about shutdowns), the author shows that you can control acpi by finding the specific values in objects in acpi memory? How do find the _BCL object using "C-acpi", or how do I find out where it is? Is there any documentation about where this is? I currently don't have the time to implement acpica, even though it looks very helpful. I don't think you, but can you do it with APM? Just wondering...
Thank you
Thank you
Re: Screen Brightness
You need to deal with ASL and AML to do it properly. The only reason that little shutdown hack can work is because there's currently a standardized proceedure for invoking a shutdown on a ACPI based computer (you write a specific value to a specific port). Virtually anything else that depends on AML can implement customized methods that could invoke multiple interactions with multiple buses and registers. That's pretty much the entire purpose of AML to begin with. That said, it's important to keep in mind that the shutdown hack described is just that, a hack. There's nothing that prevents a motherboard from having a signature identical to that of the shutdown object stored in a random buffer somewhere that's declared before the shutdown object itself. You basically need an AML interpreter to safely interact with anything in the AML, and that includes all the methods described in the ACPI specification.
Reserved for OEM use.
Re: Screen Brightness
Last ditch effort before the realization of the inevitability of implementing ACPICA...
Using a program like iASL, can I write a program that controls screen brightness in ASL, and have it churn out ASM or C source code? I only ask because I haven't gotten iASL to work from the examples in the ACPI documentation.
The two reasons why I'm so reluctant to integrate a whole ACPI layer is because it would add size to the kernel and suck speed from its quick loading time.
osmiumusa
Using a program like iASL, can I write a program that controls screen brightness in ASL, and have it churn out ASM or C source code? I only ask because I haven't gotten iASL to work from the examples in the ACPI documentation.
The two reasons why I'm so reluctant to integrate a whole ACPI layer is because it would add size to the kernel and suck speed from its quick loading time.
osmiumusa
- Owen
- Member
- Posts: 1700
- Joined: Fri Jun 13, 2008 3:21 pm
- Location: Cambridge, United Kingdom
- Contact:
Re: Screen Brightness
iASL is for compiling ASL source code to AML bytecode. It is primarily a tool for motherboard developers (and motherboard AML reverse engineers)
Sorry, but there is no way to do this but use an AML interpreter.
Sorry, but there is no way to do this but use an AML interpreter.