Hey all. I am currently running an OS which doesn't have native support for the Thinkpad T450S' brightness control keys (but has support for UEFI booting, go figure) and was hoping to see if rEFInd could potentially support those controls or any other method to change the brightness while in the menu. I've read mixed messages on what a UEFI boot manager is capable of so I'd appreciate some input on whether I'm thinking wishfully or not.
Cheers
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Keep in mind that rEFInd is an EFI application. That is, EFI is to rEFInd as the OS (and/or X environment) is to most programs. rEFInd relies on the EFI for file I/O, graphics, etc. With this in mind, the feature you want would have to be something that's either provided by the EFI or that could be implemented via low-level hacking of the hardware. I don't know of any EFI system call to adjust the brightness of the display. (Such a feature might exist and I might be unaware of it, though. I did just do a search through the UEFI 2.8 specification and found no mention of the word "brightness" or any obvious option related to this in the section on the display API.) The second path would result in a highly hardware-specific feature, and could easily wreak havoc with video displays (perhaps even after the OS has booted) if done incorrectly. Thus, in the absence of new information, I don't believe this functionality can be implemented.
Note that the above refers to support in rEFInd. If your goal is to get your OS to support the keys, support in rEFInd would be useless (unless the setting you choose in rEFInd were to carry over to the OS). Support for changing the screen brightness within the OS must be implemented in the OS. I recommend you ask about this on a forum dedicated to your OS, or perhaps to your hardware (Lenovo or whoever makes the computer's video chipset).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
EFI doesn't run while an OS is running (except some code for nvram and some other stuff in runtime services).
Maybe brightness control is an ACPI DSDT/SSDT thing. An EFI boot loader such as Clover or OpenCore that run in EFI can override or add DSDT/SSDT. The brightness control keys could trigger some ACPI event that executes some code in the DSDT/SSDT.
Clover and OpenCore are usually used to run macOS on unsupported Macs but I believe at least OpenCore will do DSDT/SSDT modifications for other OSs. Anyway, if you can get the brightness controls working in macOS then it might work for other OSs or you can at least discover what's missing. https://www.tonymacx86.com/threads/guide-patching-dsdt-ssdt-for-laptop-backlight-control.152659/
It's possible the code is in DSDT/SSDT but works only for Windows and not the OS you want. In that case the DSDT may have code that checks the OS. That should be easy to find. Clover (and maybe OpenCore?) has methods to save the DSDT/SSDT tables to the EFI partition so they can be examined (disassembled with the iasl command or with an app like MacIASL.app which uses the iasl command).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey all. I am currently running an OS which doesn't have native support for the Thinkpad T450S' brightness control keys (but has support for UEFI booting, go figure) and was hoping to see if rEFInd could potentially support those controls or any other method to change the brightness while in the menu. I've read mixed messages on what a UEFI boot manager is capable of so I'd appreciate some input on whether I'm thinking wishfully or not.
Cheers
Keep in mind that rEFInd is an EFI application. That is, EFI is to rEFInd as the OS (and/or X environment) is to most programs. rEFInd relies on the EFI for file I/O, graphics, etc. With this in mind, the feature you want would have to be something that's either provided by the EFI or that could be implemented via low-level hacking of the hardware. I don't know of any EFI system call to adjust the brightness of the display. (Such a feature might exist and I might be unaware of it, though. I did just do a search through the UEFI 2.8 specification and found no mention of the word "brightness" or any obvious option related to this in the section on the display API.) The second path would result in a highly hardware-specific feature, and could easily wreak havoc with video displays (perhaps even after the OS has booted) if done incorrectly. Thus, in the absence of new information, I don't believe this functionality can be implemented.
Note that the above refers to support in rEFInd. If your goal is to get your OS to support the keys, support in rEFInd would be useless (unless the setting you choose in rEFInd were to carry over to the OS). Support for changing the screen brightness within the OS must be implemented in the OS. I recommend you ask about this on a forum dedicated to your OS, or perhaps to your hardware (Lenovo or whoever makes the computer's video chipset).
EFI doesn't run while an OS is running (except some code for nvram and some other stuff in runtime services).
Maybe brightness control is an ACPI DSDT/SSDT thing. An EFI boot loader such as Clover or OpenCore that run in EFI can override or add DSDT/SSDT. The brightness control keys could trigger some ACPI event that executes some code in the DSDT/SSDT.
Clover and OpenCore are usually used to run macOS on unsupported Macs but I believe at least OpenCore will do DSDT/SSDT modifications for other OSs. Anyway, if you can get the brightness controls working in macOS then it might work for other OSs or you can at least discover what's missing. https://www.tonymacx86.com/threads/guide-patching-dsdt-ssdt-for-laptop-backlight-control.152659/
My one experience with this starts at https://www.tonymacx86.com/threads/guide-patching-dsdt-ssdt-for-laptop-backlight-control.152659/post-1529255
It's possible the code is in DSDT/SSDT but works only for Windows and not the OS you want. In that case the DSDT may have code that checks the OS. That should be easy to find. Clover (and maybe OpenCore?) has methods to save the DSDT/SSDT tables to the EFI partition so they can be examined (disassembled with the iasl command or with an app like MacIASL.app which uses the iasl command).