Fix off-by-one error in i2c_smbus packet handling for Nvidia GPUs under Linux
This merge request addresses a bug in the Nvidia proprietary Linux driver, where I2C SMBus packets are mishandled, resulting in incorrect color values being displayed for the LED controller on certain ASUS TUF RTX 4090 GPUs. (Most likely other Nvidia cards as well, more testers needed!)
Under Linux, the Red channel is misinterpreted as the Blue channel due to an off-by-one error in the packet structure. This patch adjusts the packet length and shifts the color values correctly. Users can opt-in to this fix by setting "NvidiaLinuxPatch":"usePatch": true in OpenRGB.json. Setting this back to false will revert operation back to normal.
Problem: Incorrect color rendering for RGB values.
Solution: Modify I2C packet structure by adjusting the length and shifting color values.
Testing: Tested on two ASUS TUF RTX 4090 cards using OpenRGB under Pop!_OS 22.04 LTS.
Change Log:
Modified: i2c_smbus_linux.h, i2c_smbus_linux.cpp
Changes: Adjusted packet length and mode when sending specific I2C packets to Nvidia GPUs to correct an off-by-one error.
Link to the issue: Nvidia Bug #41