Turning on the Lenovo Thinkpad Keyboard backlight with a script
Lenovo (Backlight) Friday, 02 June 2023 by paul

On my new Lenovo Thinkpad the backlight cannot be turned on automatically and required the keyboard shortcut (Fn + Spacebar) used every time it is started or resumed. This is a pain as my previous laptop allowed the backlight to be enabled permanently.

After not finding any Lenovo method of enabling the backlight permanently I found it can be done via a PowerShell script. The script is based on Cariffo1994’s work at: https://www.reddit.com/r/thinkpad/comments/odqwsl/keyboard_backlight_enabled_on_startup_or_wake/

# Turn on lenovo thinkpad keyboard backlight 

[string]$path = 'C:\ProgramData\Lenovo\ImController\Plugins\ThinkKeyboardPlugin\x86\';
[int]$level = 2; # Backlight level: 0 - Off, 1 - Dim, 2 - On

[string]$core = $path + 'Keyboard_Core.dll';
[string]$contract = $path + 'Contract_Keyboard.dll';

Add-Type -Path $core;
Add-Type -Path $contract;

[Keyboard_Core.KeyboardControl]$control = New-Object -TypeName 'Keyboard_Core.KeyboardControl';
$control.SetKeyboardBackLightStatus($level, $null);

The script needs to be executed using x86 PowerShell (does not work in 64-bit PowerShell). Test from command line (set-execution policy may have to be run to allow the script to execute).

Create a scheduled task. Triggered on events startup and workstation unlock.

Command line: %SystemRoot%\SysWOW64\WindowsPowerShell\v1.0\powershell.exe

Arguments: -File path\scriptname

Conditions: Disable option start only when on AC power



Add Comment
No Comments.