Bug 463172 - Adaptive Sync unavailable if display connected after boot
Summary: Adaptive Sync unavailable if display connected after boot
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (other bugs)
Version First Reported In: 5.26.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-17 23:45 UTC by illode
Modified: 2022-12-18 20:00 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.26.5
Sentry Crash Report:


Attachments
Adaptive Sync setting in question (123.64 KB, image/png)
2022-12-17 23:45 UTC, illode
Details
Output of drm_info when Adaptive Sync option is missing (108.90 KB, text/plain)
2022-12-18 02:30 UTC, illode
Details

Note You need to log in before you can comment on or make changes to this bug.
Description illode 2022-12-17 23:45:32 UTC
Created attachment 154657 [details]
Adaptive Sync setting in question

SUMMARY
This seems like two separate issues, but the second one needs the first one so I put them together:
1. Monitors need to be connected at boot in order to have the Adaptive Sync setting in Display Configuration
2. A monitor set to "Always" or "Automatically" use adaptive sync will be set to "Never" if kwin doesn't detect Adaptive Sync, meaning it has to be manually re-enabled after kwin can detect it again.


STEPS TO REPRODUCE
1. Set Adaptive Sync to "Always" or "Automatic" for target monitor
2. Disconnect monitor
3. Reboot
4. After boot, connect monitor
5. Adaptive sync option will be missing
6. Reboot
7. Adaptive sync will be set to "Never"

OBSERVED RESULT
"Adaptive Sync" setting missing from Display Configuration, the gets set to "Never"

EXPECTED RESULT
Adaptive Sync can changed and the setting persists

SOFTWARE/OS VERSIONS
Kernel: Linux illode 6.0.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 08 Dec 2022 11:03:38 +0000 x86_64 GNU/Linux
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7

ADDITIONAL INFORMATION
* I have early KMS setup as described in the Arch Wiki instructions
* GPU: 6900xt, open source drivers (amdgpu).
* Both monitors are using Displayport, one has a Displayport <-> USB-C Adaptor
* I didn't test x11
Comment 1 Zamundaaa 2022-12-18 01:56:51 UTC
Please attach the output of drm_info (https://gitlab.freedesktop.org/emersion/drm_info) when the setting isn't available. Most likely you're experiencing https://gitlab.freedesktop.org/drm/amd/-/issues/2182
Comment 2 illode 2022-12-18 02:30:31 UTC
Created attachment 154659 [details]
Output of drm_info when Adaptive Sync option is missing

Here's with the setting missing for 1 of the 3 monitors I have. It should be connector 2, which has vrr_capable = 1. kscreen-doctor -o reports incapable, though.
Comment 3 Bug Janitor Service 2022-12-18 17:30:06 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3335
Comment 4 Zamundaaa 2022-12-18 18:34:16 UTC
Git commit b95c93517b9c56fd6b19bd254d10ea8a3d14b3df by Xaver Hugl.
Committed on 18/12/2022 at 17:29.
Pushed by vladz into branch 'master'.

backends/drm: fix VRR detection

The pending value always retains the value initially read and is not updated
when the driver changes the property value.
FIXED-IN: 5.26.5

M  +2    -4    src/backends/drm/drm_connector.cpp

https://invent.kde.org/plasma/kwin/commit/b95c93517b9c56fd6b19bd254d10ea8a3d14b3df
Comment 5 Zamundaaa 2022-12-18 20:00:00 UTC
Git commit 5cea93a4ef607866a1d9d3ea4790ec64d02e1d89 by Xaver Hugl.
Committed on 18/12/2022 at 19:22.
Pushed by zamundaaa into branch 'Plasma/5.26'.

backends/drm: fix VRR detection

The pending value always retains the value initially read and is not updated
when the driver changes the property value.
FIXED-IN: 5.26.5
(cherry picked from commit b95c93517b9c56fd6b19bd254d10ea8a3d14b3df)

M  +2    -4    src/backends/drm/drm_object_connector.cpp

https://invent.kde.org/plasma/kwin/commit/5cea93a4ef607866a1d9d3ea4790ec64d02e1d89