Skip to content

FrameworkComputer/framework-win-argb-driver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Framework Windows ARGB Driver

This driver implements a HID device with support for the "Lighting And IlluminationPage" for the ARGB connector on the Framework Desktop, that is commonly used with an RGB fan.

Applications/Drivers that can interface with this type of HID device can control the connected LEDs. Additionally Windows has a "Dynamic Lighting" API that can be controlled via Windows settings and that third party applications can interact with.

Applications

Windows Dynamic Lighting

In Windows Settings => Personalization => Dynamic Lighting you can control the LEDs.

Applications:

References:

Configuration

When the driver loads, the Windows Dynamic Lighting interface (or any HID application) asks it about the LED configuration - how many and where in 3D space. This is so that they can know how to apply 2D or 3D animations to them.

By default the driver loads with an 8 LED configuration arranged in a circle of 20mm diameter. This matches the ARGB fan that Framework offers for the Framework Desktop.

To customize the configuration, set/edit the following registry entries. They are all under: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\ROOT\HIDCLASS\0000\Device Parameters (0000 might be 0001 or higher, edit the highest one)

After adding/changing the registry entries, you need to reboot the system to make sure the driver and the windows LampArray subsystem gets properly reinitialized.

Name Type Explanation
ReadFromRegistry DWORD If 1, the other values are read
LedCount DWORD How many LEDs in total
LedArrangement DWORD How the LEDs are arranged

LedArrangement can have the following values:

  • 0: Circular, layers of 8 (e.g. when 16 LEDs in total, two layers of 8 LEDs)
  • 1: Circular, single layer
  • 2: Linear (e.g. LED strip)
  • 3: Square Matrix (works best with a square number of LEDs)

For example to control just 4 LEDs on the fan:

sudo reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\ROOT\HIDCLASS\0000\Device Parameters" /v ReadFromRegistry /t REG_DWORD /d 1
sudo reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\ROOT\HIDCLASS\0000\Device Parameters" /v LedCount /t REG_DWORD /d 8
sudo reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\ROOT\HIDCLASS\0000\Device Parameters" /v LedArrangement /t REG_DWORD /d 0

Development

Build

Follow Microsoft's instructions to install Visual Studio, Windows SDK and WDK. I tried to install the SDK and WDK using winget but it either failed or couldn't get detected by Visual Studio.

Use Visual Studio 2022 Community Edition and build the project.

Install

# Software device right now
cp "C:\Program Files (x86)\Windows Kits\10\Tools\10.0.26100.0\x64\devcon.exe" .
sudo .\devcon install .\FrameworkArgb\x64\Debug\FrameworkArgb\FrameworkArgb.inf root\FrameworkArgb

# Soon with ACPI device in updated BIOS
sudo pnputil /add-driver .\FrameworkArgb\x64\Debug\FrameworkArgb\FrameworkArgb.inf /install

Logging

Logs can be captured and viewed by TraceView.

You can install it from the Windows SDK, launch as Admin and load FrameworkArgb.pdb.

To see logs from the EC driver, do the same with crosecbus.pdb.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors