rockowitz/ddcui

Blue gain fails verification on second attempt

Opened this issue · 5 comments

haarp commented

Hello,

using ddcui 0.0.6 and ddcutil-0.9.8 on a Dell U3818DW here. Feature 0x1a (Blue gain), and only this feature, seems to be screwy. I can change this feature once: ddcui and the monitor will accept the new value. When I change it again afterwards: The monitor accepts the new value, but ddcui complains:

Expected value: 100 (0x64), Reported value: 99 (0x63)
(0x7f7364d2d700 VcpThread::setvcp) Starting. feature_code=0x1a. sl=0x64, writeOnly=false
(0x7f7364d2d700 VcpThread::setvcp) ddca_get_nontable_vcp_value() after ddca_set_non_table_vcp_value():
(0x7f7364d2d700 VcpThread::setvcp)   opcode: 0x1a, requested sl=0x64, mh=0x00, ml=0x64, sh=0x00, sl=0x63
(0x7f7364d2d700 VcpThread::rpt_verify_error) featureCode=0x1a, expectedValue=0x64, observedValue=0x63
(0x7f7364d2d700 VcpThread::setvcp) Calling _baseModel->modelVcpValueUpdate()
(0x7f73705d8780 MainWindow::showSerialMsgBox) Starting.
(0x7f73705d8780 FeaturesScrollAreaView::onUIValueChanged) New value matches model value, Suppressing.

and resets the value in the UI back to 99, while the real value now is 100. This bug persists for further attempts at changing this value.

However, if I now change another value, (e.g. Green gain), then I can successfully change Blue gain, but only once, before this bug returns.

Weird, huh? Is this a bug in the monitor firmware or in ddcutil/ddcui?

Cheers!

haarp commented

It actually isn't an off-by-one error, I just used 99 and 100 as an example. This issue also presents itself when toggling between e.g. 60 and 100.

haarp commented

Cheers, those notes sounds familiar. Looks like DDC is hell of a mess of poorly implemented specs.

Manual tests with ddcutil seem to work fine, unlike doing the same with ddcui. The monitor consistently returns the correct value when switching back and forth.

> ddcutil -b 9 setvcp 1a 100; ddcutil -b 9 getvcp 1a
VCP code 0x1a (Video gain: Blue              ): current value =   100, max value =   100
> ddcutil -b 9 setvcp 1a 90; ddcutil -b 9 getvcp 1a
VCP code 0x1a (Video gain: Blue              ): current value =    90, max value =   100

This needs around two seconds to run tho, so I suspect that either the additional delay gives the monitor time to propagate the correct value, or that ddcutil does someone additional scanning/initialization that makes the monitor return to sanity.