Built ACPICA while looking into a different problem and have some basic questions on it:
Power button:
I registered a fixed event handler for this event, and it works once in Qemu, but subsequet presses no longer triggers SCI or my handler.
Do I need to do something in the handler for it to be called again? I saw that AcpiEvFixedEventDispatch() already clears the status bit.
It doesn't work at all on real hardware, pressing power button doesn't trigger either SCI or the handler. Is it required that a power botton is always wired to trigger this fixed event or the vendors can become creative and do something else?
Brightness control:
In the spec there is a section on "Extensions for Display Adapters". But ACPICA didn't print any of those method names (such as _BCL) during initialization.
Didn't find much about backlight in ACPICA's documents either. Could folks with experience of this help give some pointers on where to look?
Also wondering whether this is a commonly supported and used interface to change brightness on laptops? Or is it like the "protected mode VBE interface", that is not supported by most devices thus a device specific GPU driver is needed for brightness control in most cases once ACPI is enabled?
basic ACPI questions (power button, brightness control)
Re: basic ACPI questions (power button, brightness control)
Well, I can tell you that my laptop does implement _BCL and _BCM, and they appear to work at least at a glance.
Carpe diem!
Re: basic ACPI questions (power button, brightness control)
Hmm... while writing a Intel HD Graphics driver I've seen a lot of paragraphs about brightness control. It seems straight forward and I think you don't even need ACPI.xeyes wrote: thus a device specific GPU driver is needed for brightness control in most cases once ACPI is enabled?
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
Re: basic ACPI questions (power button, brightness control)
Consider yourself luckynullplan wrote:Well, I can tell you that my laptop does implement _BCL and _BCM, and they appear to work at least at a glance.
Tried 3 laptops and ACPI brightness control works only on 1 out of the 3 under Linux.
I got the only supported one half working before looking at its AML code. _BCM works for some levels, but _BCL always return a fake list of 102 items, values from 0 to 100, many of which don't do anything when given to _BCM.
Can't figure out why, I dumped the tables and found out that the logic inside _BCL is similar to
Code: Select all
if (win8 or later)
return fake list of 102 items levels
else
return real list of supported levels
Thus, the current situation is :
1. You lie to FW, claiming that you are Windows, for AML to work well
2. FW also lie to Windows (fake or real), claiming that it supports 100 levels in its _BCL return value, knowing that Windows doesn't use _BCM
Maybe ACPI brightness control isn't exactly another VBE 3.0 PM interface yet, but it seems to be quickly on its way to become one.
On the other hand, the power button events work much better on laptops that don't support _BCM, do both work on yours?
Thanks! Good to hear that it might not be too difficult to do this from the GPU side.Octacone wrote:Hmm... while writing a Intel HD Graphics driver I've seen a lot of paragraphs about brightness control. It seems straight forward and I think you don't even need ACPI.xeyes wrote: thus a device specific GPU driver is needed for brightness control in most cases once ACPI is enabled?
Probably not a good idea to start writing graphics driver because a timer interrupt was lost though, so maybe later.