rockowitz / ddcutil

Control monitor settings using DDC/CI and USB
http://www.ddcutil.com
GNU General Public License v2.0
935 stars 38 forks source link

System cannot enter S0ix sleep after running ddcutil detect #429

Open fanzhuyifan opened 2 months ago

fanzhuyifan commented 2 months ago

On my ASUS ROG Zephyrus G16, I cannot enter S0ix sleep after running ddcutil detect. Running arch linux with ddcutil 2.1.4. Also tested on ddcutil 2.0.0-release and 2.1.5-dev, and the issue exists on all.

Steps to reproduce:

Other information

This happens both with and without setting the nvidia driver options in https://www.ddcutil.com/nvidia/.

Useful logs

Output of sudo ddcutil interrogate --verbose: ddcutil-interrogate.txt Output of ddcutil detect: ddcutil-detect.txt Output of S0ixSelftestTool after running ddcutil detect (failed entry into s0ix): 20240611-15-32-s0ix-output.log Output of S0ixSelftestTool before running ddcutil detect (successful entry into s0ix): 20240611-15-39-s0ix-output.log

System information

Operating System: Arch Linux KDE Plasma Version: 6.1.80 KDE Frameworks Version: 6.4.0 Qt Version: 6.7.1 Kernel Version: 6.9.3-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 20 × 13th Gen Intel® Core™ i9-13900H Memory: 15.2 GiB of RAM Graphics Processor: Mesa Intel® Graphics Manufacturer: ASUSTeK COMPUTER INC. Product Name: ROG Zephyrus G16 GU603VV_GU603VV System Version: 1.0

rockowitz commented 2 months ago

This Plasma merge request might be relevant to you: https://invent.kde.org/plasma/powerdevil/-/merge_requests/379

fanzhuyifan commented 2 months ago

This Plasma merge request might be relevant to you: https://invent.kde.org/plasma/powerdevil/-/merge_requests/379

Thanks! I am actually the author of that MR 😂

rockowitz commented 2 months ago

Once you've completely disabled powerdevil's use of libddcutil by using your patch, does running ddcutil detect still block entry to SI0x sleep?

fanzhuyifan commented 2 months ago

Once you've completely disabled powerdevil's use of libddcutil by using your patch, does running ddcutil detect still block entry to SI0x sleep?

Yes -- I verified that on a virtual console without entering any graphics environment. In fact powerdevil's use of libddcutil also blocked entry to S0ix sleep, and that's why I submitted the patch.

rockowitz commented 2 months ago

Let's try disabling parts of the initialization code using options --skip-ddc-checks and/or --bus with getvcp 10.

fanzhuyifan commented 2 months ago

Below are the commands I ran and the corresponding outputs. s0ix did not work after running any of them.

I restarted after running each command, and verified that s0ix works before running the commands. Then, I ran the command and verified that s0ix does not work.

fanzhuyifan commented 1 week ago

Did some testing with gdb breakpoints, and I narrowed down the first point of failure to be after the call to i2c_get_parsed_edid_by_fd.