Unexpected behaviour when using ddcutil-service
Extent421 opened this issue · 23 comments
Creating a new issue for this as a continuation of the discussion in #79, since it's not really related to the original PR
Have you configured vdu_controls to use the ddcutil-service (settings->dbus client enabled) or the the ddcutil command line? Perhaps there is a bug in one of these interfaces.
This actually ended up being quite revealing. I had been set to use ddcutil-service, and it looks like it's reading too many bytes. The detected capabilities for my screen are
Values:
0F: DisplayPort-1
11: HDMI-1
12: HDMI-2
and previously I was seeing a 4th value of F0F returned as the active input in the UI. I enabled a second screen so I could watch this main monitor switch while it was on another input and switching to HDMI-2 it actually returns as F12. So it looks like it's picking up a junk 3rd byte from the service.
I turned off the service and the UI seems to report everything just fine without the extra byte. Running getvcp from the commandline also returns the expected value
While having the service disabled I also noticed some other differences with screen detection. I also have an LG C1 TV, and a G27q connected to this machine.
In ddcutil mode vdu can see the G27q and detect its capabilities, and it cannot see the LG C1 at all.
With ddcutil-service mode it can detect both the C1 and the G27q but can't read either of their capabilities. When trying to remove these empty detections vdu also seems to get a bit confused when writing out its config files. Removing the G27q creates 2 config files, one named G27q_20_U63304DD.conf
and one named G27q_20.conf
The one with extra letters seems to be the "real" config file, but the Ignore VDU line seems to only get written into the plain config file, causing it to get re-detected the next time vdu starts despite the ignore config.
When in ddcutil mode vdu only creates the config files with extra suffix. So perhaps other values coming out of the service are getting corrupted somehow as well?
Creating a new issue for this as a continuation of the discussion in #79, since it's not really related to the original PR
Have you configured vdu_controls to use the ddcutil-service (settings->dbus client enabled) or the the ddcutil command line? Perhaps there is a bug in one of these interfaces.
This actually ended up being quite revealing. I had been set to use ddcutil-service, and it looks like it's reading too many bytes. The detected capabilities for my screen are
Values: 0F: DisplayPort-1 11: HDMI-1 12: HDMI-2
and previously I was seeing a 4th value of F0F returned as the active input in the UI. I enabled a second screen so I could watch this main monitor switch while it was on another input and switching to HDMI-2 it actually returns as F12. So it looks like it's picking up a junk 3rd byte from the service.
I turned off the service and the UI seems to report everything just fine without the extra byte. Running getvcp from the commandline also returns the expected value
Could be a conversion issue, or a byte alignment issue. It could be in the python or the C.
We can eliminate the python from the look by using busctl, for example: here I get the brightness (hex code 16) for display 1.
% busctl --user call com.ddcutil.DdcutilService /com/ddcutil/DdcutilObject com.ddcutil.DdcutilInterface GetVcp isyu "1" "" "16" "0"
qqsis 95 100 "current value = 95, max value = 100" 0 "OK"
Replace '1' with the number of the display and 16
with the hex code of the VCP code
While having the service disabled I also noticed some other differences with screen detection. I also have an LG C1 TV, and a G27q connected to this machine.
In ddcutil mode vdu can see the G27q and detect its capabilities, and it cannot see the LG C1 at all.
Lets compare:
busctl --user call com.ddcutil.DdcutilService /com/ddcutil/DdcutilObject com.ddcutil.DdcutilInterface Detect u "0" | sed 's/ 0 / 0\n / '
ddcutil detect
Unfortunately ddcutil doesn't use libddcutil, but I think they share code, plus they initialize a bit differently from each other. Plus ddcutil 2+ has had some teething issues. Which ddcutil are you using?
ddcutil --version
With ddcutil-service mode it can detect both the C1 and the G27q but can't read either of their capabilities. When trying to remove these empty detections vdu also seems to get a bit confused when writing out its config files. Removing the G27q creates 2 config files, one named
G27q_20_U63304DD.conf
and one namedG27q_20.conf
The one with extra letters seems to be the "real" config file, but the Ignore VDU line seems to only get written into the plain config file, causing it to get re-detected the next time vdu starts despite the ignore config.
The longer filename embeds the serial number. The short filename just embeds the model name. In theory you can delete the serial numbered file and use model file for all monitors of the same model (I've not tested that in quite some time).
running gives me this, and 75 is correct
busctl --user call com.ddcutil.DdcutilService /com/ddcutil/DdcutilObject com.ddcutil.DdcutilInterface GetVcp isyu "1" "" "16" "0"
qqsis 75 100 "current value = 75, max value = 100" 0 "OK"
trying to get feature 60, 0f is also right, but the int is giving f0f
busctl --user call com.ddcutil.DdcutilService /com/ddcutil/DdcutilObject com.ddcutil.DdcutilInterface GetVcp isyu "1" "" "96" "0"
qqsis 3855 14 "DisplayPort-1 (sl=0x0f)" 0 "OK"
busctl --user call com.ddcutil.DdcutilService /com/ddcutil/DdcutilObject com.ddcutil.DdcutilInterface Detect u "0" | sed 's/ 0 / 0\n / '
ia(iiisssqsu)is 2 2 1 0
0 "DEL" "AW3225QF" "66N0YZ3" 41542 "AP///////wAQrEaiU0pFMAUiAQS1Rih4OwMhr04+tSUNUFSlSwBxT4GAqcDRwAEBAQEBAQEBTdAAoPBwPoAwIDUAu4shAAAaAAAA/wA2Nk4wWVozCiAgICAgAAAA/ABBVzMyMjVRRgogICAgAAAA/Qww8P//6gEKICAgICAgAvg=" 809847379 2 0 0 "LEN" "G27q-20" "U63304DD" 26307 "AP///////wAwrsNmREQ0MC4eAQS1PCJ4O3jlrU9GqyYNUFS97wCBgJUAswDRwGFoYXxFaEV8Vl4AoKCgKVAwIDUAVVAhAAAeAAAA/wBVNjMzMDRERAogICAgAAAA/QAwpfr6QQEKICAgICAgAAAA/ABHMjdxLTIwCiAgICAgATw=" 808731716 0 "OK"
ddcutil detect
Device /dev/i2c-7 is not readable and writable. Error = EACCES(13): Permission denied
Devices possibly used for DDC/CI communication cannot be opened: /dev/i2c-7
See https://www.ddcutil.com/i2c_permissions
Invalid display
I2C bus: /dev/i2c-3
DRM connector: card1-HDMI-A-1
EDID synopsis:
Mfg id: GSM - Goldstar Company Ltd (LG)
Model: LG TV SSCR2
Product code: 49352 (0xc0c8)
Serial number:
Binary serial number: 16843009 (0x01010101)
Manufacture year: 2021, Week: 1
DDC communication failed
Display 1
I2C bus: /dev/i2c-4
DRM connector: card1-DP-2
EDID synopsis:
Mfg id: DEL - Dell Inc.
Model: AW3225QF
Product code: 41542 (0xa246)
Serial number: 66N0YZ3
Binary serial number: 809847379 (0x30454a53)
Manufacture year: 2024, Week: 5
VCP version: 2.1
Display 2
I2C bus: /dev/i2c-5
EDID synopsis:
Mfg id: LEN - Lenovo Group Limited
Model: G27q-20
Product code: 26307 (0x66c3)
Serial number: U63304DD
Binary serial number: 808731716 (0x30344444)
Manufacture year: 2020, Week: 46
VCP version: 2.2
ddcutil 1.4.1
busctl --user call com.ddcutil.DdcutilService /com/ddcutil/DdcutilObject com.ddcutil.DdcutilInterface Detect u "0"
ia(iiisssqsu)is 2 2 1 0 0 "DEL" "AW3225QF" "66N0YZ3" 41542 "AP///////wAQrEaiU0pFMAUiAQS1Rih4OwMhr04+tSUNUFSlSwBxT4GAqcDRwAEBAQEBAQEBTdAAoPBwPoAwIDUAu4shAAAaAAAA/wA2Nk4wWVozCiAgICAgAAAA/ABBVzMyMjVRRgogICAgAAAA/Qww8P//6gEKICAgICAgAvg=" 809847379 2 0 0 "LEN" "G27q-20" "U63304DD" 26307 "AP///////wAwrsNmREQ0MC4eAQS1PCJ4O3jlrU9GqyYNUFS97wCBgJUAswDRwGFoYXxFaEV8Vl4AoKCgKVAwIDUAVVAhAAAeAAAA/wBVNjMzMDRERAogICAgAAAA/QAwpfr6QQEKICAgICAgAAAA/ABHMjdxLTIwCiAgICAgATw=" 808731716 0 "OK"
We should also compare the capabilities reported:
busctl --user call com.ddcutil.DdcutilService /com/ddcutil/DdcutilObject com.ddcutil.DdcutilInterface GetCapabilitiesMetadata isu "1" "" "0"
Where '1' is the display/monitor number.
Versus:
ddcutil --display 1 capabilities
for some monitor where it gets the capabilities wrong.
is the older ddcutil a problem? 1.4.1 is the latest that's in suses repos
This is the screen that the service seemed to have trouble with
busctl --user call com.ddcutil.DdcutilService /com/ddcutil/DdcutilObject com.ddcutil.DdcutilInterface GetCapabilitiesMetadata isu "2" "" "0"
syya{ys}a{y(ssa{ys})}is "G27q-20" 2 2 7 1 "desc of 1" 2 "desc of 2" 3 "desc of 3" 7 "desc of 7" 12 "desc of 12" 227 "desc of 227" 243 "desc of 243" 33 2 "New control value" "" 0 4 "Restore factory defaults" "" 4 76 "" 49 "" 46 "" 48 "" 5 "Restore factory brightness/contrast defaults" "" 0 8 "Restore color defaults" "" 0 16 "Brightness" "" 0 18 "Contrast" "" 0 20 "Select color preset" "" 11 1 "sRGB" 1 "sRGB" 5 "6500 K" 5 "6500 K" 6 "7500 K" 6 "7500 K" 8 "9300 K" 8 "9300 K" 18 "" 11 "User 1" 11 "User 1" 22 "Video gain: Red" "" 0 24 "Video gain: Green" "" 0 26 "Video gain: Blue" "" 0 82 "Active control" "" 0 96 "Input Source" "" 4 17 "HDMI-1" 17 "HDMI-1" 15 "DisplayPort-1" 15 "DisplayPort-1" 134 "Display Scaling" "" 4 1 "No scaling" 1 "No scaling" 2 "Max image, no aspect ration distortion" 2 "Max image, no aspect ration distortion" 172 "Horizontal frequency" "" 0 174 "Vertical frequency" "" 0 178 "Flat panel sub-pixel layout" "" 0 182 "Display technology type" "" 0 198 "Application enable key" "" 17 2 "" 0 "" 151 "" 0 "" 144 "" 128 "" 0 "" 104 "" 0 "" 138 "" 128 "" 0 "" 92 "" 0 "" 84 "" 0 "" 0 "" 200 "Display controller type" "" 0 202 "OSD/Button Control" "" 0 204 "OSD Language" "" 8 2 "" 3 "" 4 "" 5 "" 6 "" 9 "" 10 "" 13 "" 214 "Power mode" "" 6 1 "DPM: On, DPMS: Off" 1 "DPM: On, DPMS: Off" 4 "DPM: Off, DPMS: Off" 4 "DPM: Off, DPMS: Off" 5 "Write only value to turn off display" 5 "Write only value to turn off display" 223 "VCP Version" "" 0 224 "Manufacturer Specific" "" 3 0 "" 1 "" 2 "" 234 "Manufacturer Specific" "" 2 0 "" 1 "" 235 "Manufacturer Specific" "" 2 0 "" 1 "" 236 "Manufacturer Specific" "" 6 0 "" 1 "" 255 "" 0 "" 2 "" 3 "" 246 "Manufacturer Specific" "" 1 7 "" 247 "Manufacturer Specific" "" 2 1 "" 2 "" 248 "Manufacturer Specific" "" 2 1 "" 2 "" 249 "Manufacturer Specific" "" 7 0 "" 1 "" 2 "" 3 "" 4 "" 5 "" 6 "" 250 "Manufacturer Specific" "" 4 16 "" 18 "" 234 "" 20 "" 253 "Manufacturer Specific" "" 0 0 "OK"
ddcutil -d 2 capabilities
Device /dev/i2c-7 is not readable and writable. Error = EACCES(13): Permission denied
Devices possibly used for DDC/CI communication cannot be opened: /dev/i2c-7
See https://www.ddcutil.com/i2c_permissions
Model: Lenovo G27q-20
MCCS version: 2.2
Commands:
Op Code: 01 (VCP Request)
Op Code: 02 (VCP Response)
Op Code: 03 (VCP Set)
Op Code: 07 (Timing Request)
Op Code: 0C (Save Settings)
Op Code: E3 (Capabilities Reply)
Op Code: F3 (Capabilities Request)
VCP Features:
Feature: 02 (New control value)
Feature: 04 (Restore factory defaults)
Values: 4C 31 2E 30 (interpretation unavailable)
Feature: 05 (Restore factory brightness/contrast defaults)
Feature: 08 (Restore color defaults)
Feature: 10 (Brightness)
Feature: 12 (Contrast)
Feature: 14 (Select color preset)
Values:
01: sRGB
05: 6500 K
06: 7500 K
08: 9300 K
12: Unrecognized value
0b: User 1
Feature: 16 (Video gain: Red)
Feature: 18 (Video gain: Green)
Feature: 1A (Video gain: Blue)
Feature: 52 (Active control)
Feature: 60 (Input Source)
Values:
11: HDMI-1
0f: DisplayPort-1
Feature: 86 (Display Scaling)
Values:
01: No scaling
02: Max image, no aspect ration distortion
Feature: AC (Horizontal frequency)
Feature: AE (Vertical frequency)
Feature: B2 (Flat panel sub-pixel layout)
Feature: B6 (Display technology type)
Feature: C6 (Application enable key)
Values: 02 00 97 00 90 80 00 68 00 8A 80 00 5C 00 54 00 00 (interpretation unavailable)
Feature: C8 (Display controller type)
Feature: CA (OSD/Button Control)
Feature: CC (OSD Language)
Values:
02: English
03: French
04: German
05: Italian
06: Japanese
09: Russian
0a: Spanish
0d: Chinese (simplified / Kantai)
Feature: D6 (Power mode)
Values:
01: DPM: On, DPMS: Off
04: DPM: Off, DPMS: Off
05: Write only value to turn off display
Feature: DF (VCP Version)
Feature: E0 (Manufacturer specific feature)
Values: 00 01 02 (interpretation unavailable)
Feature: EA (Manufacturer specific feature)
Values: 00 01 (interpretation unavailable)
Feature: EB (Manufacturer specific feature)
Values: 00 01 (interpretation unavailable)
Feature: EC (Manufacturer specific feature)
Values: 00 01 FF 00 02 03 (interpretation unavailable)
Feature: F6 (Manufacturer specific feature)
Values: 07 (interpretation unavailable)
Feature: F7 (Manufacturer specific feature)
Values: 01 02 (interpretation unavailable)
Feature: F8 (Manufacturer specific feature)
Values: 01 02 (interpretation unavailable)
Feature: F9 (Manufacturer specific feature)
Values: 00 01 02 03 04 05 06 (interpretation unavailable)
Feature: FA (Manufacturer specific feature)
Values: 10 12 EA 14 (interpretation unavailable)
Feature: FD (Manufacturer specific feature)
One display is listed as Invalid display
. I had the service ignore them. Is it not powered up?
ddcutil detect
Device /dev/i2c-7 is not readable and writable. Error = EACCES(13): Permission denied
Devices possibly used for DDC/CI communication cannot be opened: /dev/i2c-7
See https://www.ddcutil.com/i2c_permissions
Invalid display
I2C bus: /dev/i2c-3
DRM connector: card1-HDMI-A-1
EDID synopsis:
Mfg id: GSM - Goldstar Company Ltd (LG)
Model: LG TV SSCR2
Product code: 49352 (0xc0c8)
Serial number:
Binary serial number: 16843009 (0x01010101)
Manufacture year: 2021, Week: 1
DDC communication failed
ya that's the C1, it's turned off
is the older ddcutil a problem? 1.4.1 is the latest that's in suses repos
I generally stick with 1.4.1, but I test with 2.*. So 1.4.1 is fine (we may yet decide otherwise).
ya that's the C1, it's turned off
If you turn it on, the service will then handle it. I ignore invalid displays because they can't be controlled.
Dinner time, back later.
Even with the screen turned on and enabled ddcutil still can't talk to it. But that I'm not so worried about as long as the ignore is working
Oh, it's a LG TV SSCR2. I think some TVs don't implement DDC, it seems like this one at least identifies itself. I have a Samsung TV which isn't DDC visible, and a cheap no-name mini-panel monitor which isn't a TV, but is probably based on one, which is also invisible to DDC.
trying to get feature 60, 0f is also right, but the int is giving f0f
busctl --user call com.ddcutil.DdcutilService /com/ddcutil/DdcutilObject com.ddcutil.DdcutilInterface GetVcp isyu "1" "" "96" "0" qqsis 3855 14 "DisplayPort-1 (sl=0x0f)" 0 "OK"
It looks like the value sent by the service is correct, so perhaps the python is unmarshalling it incorrectly. Could be a byte to int conversion issue. Can you post:
ddcutil --display 1 detect
I'll poke around in the python side. I'm not sure what I'm looking for. I'll see if I can spot the issue or create a similar issue using my own displays.
is that correct? All I get is
detect does not support explicit display option
is that correct? All I get is
detect does not support explicit display option
Oops, sorry I meant:
ddcutil --display 1 capabilities
And it does look like the service is returning the wrong 2 byte value.
busctl --user call com.ddcutil.DdcutilService /com/ddcutil/DdcutilObject com.ddcutil.DdcutilInterface GetVcp isyu "1" "" "96" "0"
qqsis 3855 14 "DisplayPort-1 (sl=0x0f)" 0 "OK"
The 3855 is the decimal numeric value of the result, which should be 0f, but 3855 in hex is f0f. So something is marshalling the numeric value wrong on the server side. Normally a value should fit in a byte, perhaps the unused byte has not been initialized, or byte shuffling has gone wrong. At least this is a good clue.
screen 1 is the screen that is detected properly in both modes
screamer4L:/home/markm # ddcutil --display 1 capabilities
Model: AW3225QF
MCCS version: 2.1
Commands:
Op Code: 01 (VCP Request)
Op Code: 02 (VCP Response)
Op Code: 03 (VCP Set)
Op Code: 07 (Timing Request)
Op Code: 0C (Save Settings)
Op Code: E3 (Capabilities Reply)
Op Code: F3 (Capabilities Request)
VCP Features:
Feature: 02 (New control value)
Feature: 04 (Restore factory defaults)
Feature: 05 (Restore factory brightness/contrast defaults)
Feature: 08 (Restore color defaults)
Feature: 10 (Brightness)
Feature: 12 (Contrast)
Feature: 14 (Select color preset)
Values:
01: sRGB
05: 6500 K
08: 9300 K
0b: User 1
0c: User 2
Feature: 16 (Video gain: Red)
Feature: 18 (Video gain: Green)
Feature: 1A (Video gain: Blue)
Feature: 52 (Active control)
Feature: 60 (Input Source)
Values:
0f: DisplayPort-1
11: HDMI-1
12: HDMI-2
Feature: 87 (Sharpness)
Feature: AC (Horizontal frequency)
Feature: AE (Vertical frequency)
Feature: B2 (Flat panel sub-pixel layout)
Feature: B6 (Display technology type)
Feature: C6 (Application enable key)
Feature: C8 (Display controller type)
Feature: C9 (Display firmware level)
Feature: CA (OSD)
Feature: CC (OSD Language)
Values:
02: English
03: French
04: German
06: Japanese
09: Russian
0a: Spanish
0d: Chinese (simplified / Kantai)
0e: Portuguese (Brazil)
Feature: D6 (Power mode)
Values:
01: DPM: On, DPMS: Off
04: DPM: Off, DPMS: Off
05: Write only value to turn off display
Feature: DC (Display Mode)
Values:
00: Standard/Default mode
03: Movie
Feature: DF (VCP Version)
Feature: E0 (Manufacturer specific feature)
Feature: E1 (Manufacturer specific feature)
Feature: E2 (Manufacturer specific feature)
Values: 00 04 0E 12 0B 1B 14 1E 1F 20 21 22 2F 23 24 27 3A (interpretation unavailable)
Feature: E3 (Manufacturer specific feature)
Feature: E4 (Manufacturer specific feature)
Feature: E5 (Manufacturer specific feature)
Feature: E8 (Manufacturer specific feature)
Feature: E9 (Manufacturer specific feature)
Values: 00 01 02 21 22 24 29 2A 2D 2E (interpretation unavailable)
Feature: EA (Manufacturer specific feature)
Feature: EC (Manufacturer specific feature)
Values: 01 02 04 06 (interpretation unavailable)
Feature: F0 (Manufacturer specific feature)
Values: 00 05 06 0A 0D 0E 0F 10 11 13 31 32 34 36 (interpretation unavailable)
Feature: F1 (Manufacturer specific feature)
Feature: F2 (Manufacturer specific feature)
Feature: F4 (Manufacturer specific feature)
Values: 10 11 12 13 14 15 16 17 30 31 32 33 40 41 42 43 44 45 46 A1 A2 A3 (interpretation unavailable)
Feature: F5 (Manufacturer specific feature)
Values: 1D (interpretation unavailable)
Feature: FE (Manufacturer specific feature)
Feature: FD (Manufacturer specific feature)
Screen 2 is only detected fully with ddcutil
ddcutil --display 2 capabilities
Model: Lenovo G27q-20
MCCS version: 2.2
Commands:
Op Code: 01 (VCP Request)
Op Code: 02 (VCP Response)
Op Code: 03 (VCP Set)
Op Code: 07 (Timing Request)
Op Code: 0C (Save Settings)
Op Code: E3 (Capabilities Reply)
Op Code: F3 (Capabilities Request)
VCP Features:
Feature: 02 (New control value)
Feature: 04 (Restore factory defaults)
Values: 4C 31 2E 30 (interpretation unavailable)
Feature: 05 (Restore factory brightness/contrast defaults)
Feature: 08 (Restore color defaults)
Feature: 10 (Brightness)
Feature: 12 (Contrast)
Feature: 14 (Select color preset)
Values:
01: sRGB
05: 6500 K
06: 7500 K
08: 9300 K
12: Unrecognized value
0b: User 1
Feature: 16 (Video gain: Red)
Feature: 18 (Video gain: Green)
Feature: 1A (Video gain: Blue)
Feature: 52 (Active control)
Feature: 60 (Input Source)
Values:
11: HDMI-1
0f: DisplayPort-1
Feature: 86 (Display Scaling)
Values:
01: No scaling
02: Max image, no aspect ration distortion
Feature: AC (Horizontal frequency)
Feature: AE (Vertical frequency)
Feature: B2 (Flat panel sub-pixel layout)
Feature: B6 (Display technology type)
Feature: C6 (Application enable key)
Values: 02 00 97 00 90 80 00 68 00 8A 80 00 5C 00 54 00 00 (interpretation unavailable)
Feature: C8 (Display controller type)
Feature: CA (OSD/Button Control)
Feature: CC (OSD Language)
Values:
02: English
03: French
04: German
05: Italian
06: Japanese
09: Russian
0a: Spanish
0d: Chinese (simplified / Kantai)
Feature: D6 (Power mode)
Values:
01: DPM: On, DPMS: Off
04: DPM: Off, DPMS: Off
05: Write only value to turn off display
Feature: DF (VCP Version)
Feature: E0 (Manufacturer specific feature)
Values: 00 01 02 (interpretation unavailable)
Feature: EA (Manufacturer specific feature)
Values: 00 01 (interpretation unavailable)
Feature: EB (Manufacturer specific feature)
Values: 00 01 (interpretation unavailable)
Feature: EC (Manufacturer specific feature)
Values: 00 01 FF 00 02 03 (interpretation unavailable)
Feature: F6 (Manufacturer specific feature)
Values: 07 (interpretation unavailable)
Feature: F7 (Manufacturer specific feature)
Values: 01 02 (interpretation unavailable)
Feature: F8 (Manufacturer specific feature)
Values: 01 02 (interpretation unavailable)
Feature: F9 (Manufacturer specific feature)
Values: 00 01 02 03 04 05 06 (interpretation unavailable)
Feature: FA (Manufacturer specific feature)
Values: 10 12 EA 14 (interpretation unavailable)
Feature: FD (Manufacturer specific feature)
It looks to me that libddcutil is using metadata to decide to throw away the high-byte and only output the low-byte (sl=0f). I'm combining both bytes, which assumes the high-byte will be zero if it's not relevant, I guess that's not always true for all monitors.
I'll try to reverse engineer what libddcutil does, or if I get desperate and the info is not available to me, I might cheat and covert the formatted value back into a numeric value.
is the second field it returns the maximum value? Could you just mask the raw with that?
is the second field it returns the maximum value? Could you just mask the raw with that?
I could, but it's also a two byte field, so I need to know whether the high byte needs to be included. In this case it seems like the high byte has a good value, so I could get away with it.
However, I think I've reverse engineered how ddcutil obtains the necessary metadata to decide which bytes are significant. It's a bit simpler for the service than for ddcutil - Sanford Rockowitz, ddcutil author, suggested I could ignore some kinds of values, because although they're in the standard, all manufacturers avoided using any of the more complex ones (at least on all monitors encountered to date).
Anyway I have some ddcutil-service code working which I'll look over in the morning to make sure I've not forgotten to free stuff.
I've raised this as issue ddcutil-service issue 21
I just pushed the changes to ddcutil-service, the changes are pretty straight forward and safe enough. If they cause any issues I'll deal with it later.
testing with the new service and I'm not seeing any garbage values anymore, but it is still not detecting capabilities on the G27q, that's the screen 2 in the previous logs. Though if it has no trouble talking to it if I generate the config file using ddcutil and then switch to the service after that's been saved.
I'm moved the G27q issue to a new issue on ddcutil-service: digitaltrails/ddcutil-service#22
Let's keep this vdu_controls issue focused on the one-byte/two-byte issue which. Although resolved for this issue, is now a more complicated situation because rejecting the high-byte breaks interaction with another VDU in #85.