Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DDCA_EVENT_DPMS_AWAKE sent shortly after DDCA_EVENT_DPMS_ASLEEP #470

Open
wojnilowicz opened this issue Nov 12, 2024 · 6 comments
Open

DDCA_EVENT_DPMS_AWAKE sent shortly after DDCA_EVENT_DPMS_ASLEEP #470

wojnilowicz opened this issue Nov 12, 2024 · 6 comments

Comments

@wojnilowicz
Copy link

My external screen goes to sleep correctly, but soon, after it displays "stand by" message by itself, it wakes up. It happens in KDE Plasma 6.

My display is a single Lenovo P24h-2L connected through HDMI to my laptop. I have ddcutil 2.1.2 and using nouveau on a NV50 era hardware. I can provide more details, if requested.

I described the issue in details in a KDE bug #495746. I'm reporting it also here because I see that DDCA_EVENT_DPMS events come from ddcutil. I'm not sure, if it's a bug in ddcutil or KDE, so feel free to close immediately.

@rockowitz
Copy link
Owner

rockowitz commented Nov 18, 2024

If you can, please build from branch 2.1.5-dev and retry. Having ddcutil report sleep/wake events as they happen proved problematic and has been removed from the API. So the KDE will not emit a message in this regard that causes the monitor to wake.

@wojnilowicz
Copy link
Author

Indeed, using 2.1.5-dev at cae9f52 fixes my issue. Thanks.

Any particular commit that fixed it?

I think this can be closed anyway.

@wojnilowicz
Copy link
Author

wojnilowicz commented Nov 20, 2024

I just discovered that I cannot have both:

  1. display dimming
  2. display sleep

enabled at the same time, because the same issue returns even with 2.1.5-dev.

Here is what happens:

  1. no my activity for 30 s
  2. my display dims to 80%
  3. no my activity for another 30 s
  4. my display goes to sleep
  5. not more than five seconds passes
  6. my display wakes up dimmed to 80%

Could it be also attributed to ddcutil?
In any case, I'm attaching the output of journalctl -b --user-unit plasma-powerdevil
powerdevil.txt

@rockowitz
Copy link
Owner

Looking at the journalctl output, I don't see any messages generated by libddcutil. The only messages are from powerdevil. (The [DDCUtilDisplay] lines are from powerdevil.) I don't see how libddcutil could be causing the system to wake up, but it's hard to prove a negative in an environment as complex as this.

Therefore, I have added option --disable-watch-displays to branch 2.1.5-dev. This is a libddcutil only option, and needs to be specified in the [libddcutil] section of the ddcutilrc configuration file. It completely prevents the display change watch thread from running. When this option is set API function ddca_start_watch_displays() will fail with status DDCRC_INVALID_OPERATION.

@wojnilowicz
Copy link
Author

It works as expected on today's 2.1.5-dev. Thanks again.

Will you make --disable-watch-displays enabled by default?

@rockowitz
Copy link
Owner

Option --disable-watch-displays will not be enabled by default. It is intended as workaround for a bug whose cause is unclear, and to help diagnose the locus of the problem. It completely overrides the ability of PowerDevil to request that libddcutil watch for and report display connection changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants