Closed Hekzory closed 1 year ago
First, please run ddcutil interrogate and send the output. That preempts lots of back and forth on basic questions.
The most obvious suspect is an error in the new code to workaround a bug in the way the nvidia driver is coded. Some options to experiment with: --use-file-io, --use-ioctl-io. Any effect?
The fact that communication with the LG monitor succeeds, but with error recovery, suggests that the problem is happening at the I2C level. Let's look at the communication layer in detail. Execute ddcutil detect --verbose --ddc --trcfile i2c_strategy_dispatcher.c --trcfile i2c_execute.c. Does using option --sleep-multiplier with a value greater than 1, e.g. --sleep-multiplier 2, have any effect?
Are you using the Special Nvidia Driver Settings?
@fionnb has reported what appears to be a similar regression as an additional comment on issue #273.
Please submit long output as files of some sort, e.g. as attachments, instead of inline.
Thank you for your help in diagnosing this situation. I'd like to quickly resolve the problem. The cutoffs for including ddcutil release 1.4 in the upcoming Debian release (bookworm) and in Ubuntu 23.04 are less than a month away.
Quick update from my side: Problem is with an LG monitor too. But X11 here and vanilla intel-mesa. So probably not an issue with the GFX drivers. Will gather debug data tomorrow and send another update.
OK, so here are the outputs: Quickly looking at them, it looks like appending --sleep-multiplier 2 for the last command actually seems to improve the situation, resulting in "Invalid display" header to disappear for them and become just "Display 1", "Display 2", "Display 3", after that i tried ddcutil setvcp 10 for all 3 monitors with --sleep-multiplier 2 and all of them worked. However, is there an option to change that setting by default in config or as an environment variable?
What I'm seeing is corrupt DDC data packets, which is resolved by longer waits between I2C read and write operations. Why this effect only appears with release 1.4.0 is unclear. I'll likely get back to you with additional tests.
A default value for --sleep-multiplier can be set using a Configuration File.
I suggest experimenting to see if a sleep multiplier value less than 2, e.g. 1.5, works for you. Options --ddc and --stats can be helpful in that they'll show the extent that errors are recovered using retry.
Well, after playing with parameters I got that it's pretty unstable if sleep value is <=0.3, so I chose 0.5, which is quite stable for me(no errors after many retries). Changing config worked.
However, sadly, changing config resolved issue with cli only, but not with powerdevil-ddcutil, which uses ddcutil to help with automating lowering brightness when AFK on KDE. I think powerdevil ignores/overrides config parameters, so I'll stay on 1.3.0 for now
@copysiper I'm a bit confused here. Your original post indicated that ddcutil failed on release 1.4.0, and it turned out that increasing sleep time using --sleep-multiplier 2 resolved the problem. There's no indication that you by default were using a sleep multiplier value other than 1. If a value of 2 succeeds but 1 fails, it makes no sense for .5 to work. Can you clarify?
Re powerdevil, it uses shared library libddcutil, not command line program ddcutil. To pass options to the shared library, use the [libddcutil] section of configuration file ddcutilrc.
Actually, for me it behaves like if --sleep-multiplier 0 is set by default if nothing specified in arguments or config, so when i add --sleep-multiplier 1 in config or arguments it starts working too
The default sleep-multiplier value was being set to 0, not 1, in certain circumstances. This has been fixed in branch 1.4.1-dev. Please build from that branch and verify that both command line ddcutil and shared library libddcutil (called by PowerDevil) are both working properly without explicit --sleep-multiplier. (Depending on your configuration, you may have to perform some additional steps to ensure that the new version of libddcutil is used. There should be messages in the system log indicating which version of libddcutil is being used.)
Ok, so i cleared the config and updated my package to 1.4.1 (https://github.com/rockowitz/ddcutil/commit/0dec3a4e9714e2f8ee4b93ed629c00ea10979d82), ddcutil cli definitely works, sleep multiplier now behaves like if it is 1 by default, no errors appear when changing brightness on any display. powerdevil is able to manage brightness correctly too, here is the log of the correct version of the lib being initialized:
libddcutil[3749]: Initializing. ddcutil version 1.4.1
libddcutil[3749]: Library initialization complete.
It looks like the issue is resolved now, thank you for such fast support!
Hello, and thanks for supporting on this.
I'm seeing similar issues after upgrading from 1.3 to 1.4, and the mentioned parameter for sleep-multiplier does help:
--sleep-multiplier 2
➜ dago@dago-pc-amd64 ~ sudo ddcutil detect
Display 1
I2C bus: /dev/i2c-1
DRM connector: card0-HDMI-A-1
EDID synopsis:
Mfg id: DEL - Dell Inc.
Model: DELL U2715H
Product code: 53351 (0xd067)
Serial number: GH85D7CM0T8S
Binary serial number: 810825811 (0x30543853)
Manufacture year: 2017, Week: 51
VCP version: Detection failed
Display 2
I2C bus: /dev/i2c-3
DRM connector: card0-DP-1
EDID synopsis:
Mfg id: DEL - Dell Inc.
Model: DELL U2715H
Product code: 53349 (0xd065)
Serial number: GH85D81801PL
Binary serial number: 808538188 (0x3031504c)
Manufacture year: 2018, Week: 2
VCP version: 2.1
➜ dago@dago-pc-amd64 ~ sudo ddcutil detect --sleep-multiplier 2
Display 1
I2C bus: /dev/i2c-1
DRM connector: card0-HDMI-A-1
EDID synopsis:
Mfg id: DEL - Dell Inc.
Model: DELL U2715H
Product code: 53351 (0xd067)
Serial number: GH85D7CM0T8S
Binary serial number: 810825811 (0x30543853)
Manufacture year: 2017, Week: 51
VCP version: 2.1
Display 2
I2C bus: /dev/i2c-3
DRM connector: card0-DP-1
EDID synopsis:
Mfg id: DEL - Dell Inc.
Model: DELL U2715H
Product code: 53349 (0xd065)
Serial number: GH85D81801PL
Binary serial number: 808538188 (0x3031504c)
Manufacture year: 2018, Week: 2
VCP version: 2.1
I confirm that the "Verification failed" issue has gone away with 1.4.1-dev
My setup: 3 monitors, before the update i could control monitor brightness on any of them. Now it works only on the primary.
I'm running Wayland+Kde+Nvidia Propietary drivers (which is known to be a bad combo, but worked on a previous version of ddcutil, right?)
Here's the output of ddcutil detect -v on 1.3.0: Even though it says something about errors at first few lines, it actually works.
Here's the output after switching to 1.4.0: Even though no error lines at start of the output, now actual displays wont response to brightness commands
When trying to change brightness on previously working displays it either says
Display not found
or
I hope that info helps, I am ready to provide more if you need something else, thanks in advance!