daitj / gnome-display-brightness-ddcutil

Display brightness slider for gnome shell using ddcutil backend
GNU General Public License v3.0
294 stars 36 forks source link

Feature: DDC VCP 6B #152

Open adaschma opened 5 days ago

adaschma commented 5 days ago

On the Fujitsu B19-7 LED (and probably others) the brightness controls on the monitor control the "VCP Feature 6B (Backlight Level: White)". While "VCP Feature 10 (Brightness)" exists, changing it looks ugly and destroys the contrast and is best left unchanged at 50.

This pull request creates a list of the VCP IDs with currently two items that control the brightness. When getting the current and max brightness of the display it tries the VPC IDs in sequential order and saves the first not giving an ERR in the display object. Other ddcutil calls that before this pull request used the "VCP Feature 10 (Brightness)" now use the VPC ID stored in the display object.

daitj commented 5 days ago

There might be some other efficient way to check this, what is your output of

ddcutil capabilities --bus BUS_NUMBER

if 6B is a supported feature I suppose it should always work

adaschma commented 5 days ago

Yes, 6B is a supported feature. I had considered asking the monitor for capabilities. But that would be just as many additional calls as this in the worst case (1 more) and one more in the best case (1 instead of 0). At least I didn't find anywhere the extension currently asks for the supported features.

daitj commented 4 days ago

Yeah I agree with you, some extra calls will happen to the error prone devices which might return ERR on both 10 and 6B VCP request. I will do a test if everything is smooth, since everything is happening asynchronosly it shouldnt slow down other stuff.