Bug 486149 - Option to set FreeSync (VRR) mode has disappeared
Summary: Option to set FreeSync (VRR) mode has disappeared
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (other bugs)
Version First Reported In: 6.0.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 489012 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-04-26 11:09 UTC by Mufeed Ali
Modified: 2024-07-11 12:36 UTC (History)
4 users (show)

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


Attachments
My display configuration view right now (50.92 KB, image/png)
2024-04-26 11:09 UTC, Mufeed Ali
Details
drm_info output (166.78 KB, text/plain)
2024-04-26 21:02 UTC, Mufeed Ali
Details
`kscreen -o` output (824 bytes, text/plain)
2024-04-27 05:40 UTC, Mufeed Ali
Details
Updated drm_info (166.79 KB, text/plain)
2024-04-27 14:22 UTC, Mufeed Ali
Details
updated kscreen -o output (824 bytes, text/plain)
2024-04-27 14:23 UTC, Mufeed Ali
Details
drm_info output when option is available (166.79 KB, text/plain)
2024-04-27 14:33 UTC, Mufeed Ali
Details
kscreen output when working (824 bytes, text/plain)
2024-04-27 14:34 UTC, Mufeed Ali
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mufeed Ali 2024-04-26 11:09:22 UTC
Created attachment 168916 [details]
My display configuration view right now

SUMMARY
The option in 'Display Configuration' to set Freesync to "Automatic", "Always" and "Off" have completely disappeared for me. I don't know why or since when, but it was definitely present until at least after 6.0.1.

STEPS TO REPRODUCE
1. Open System Settings
2. Navigate to Display Configuration

OBSERVED RESULT
Note that there is no option to control VRR.

EXPECTED RESULT
Option in 'Display Configuration' to set Freesync to "Automatic", "Always" and "Off"

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux latest rolling
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0 
Qt Version: 6.7.0

ADDITIONAL INFORMATION
I actually dont know if VRR itself is working currently. How would I reliably test that?
Comment 1 Zamundaaa 2024-04-26 13:05:50 UTC
Please attach the output of drm_info
Comment 2 Mufeed Ali 2024-04-26 21:02:57 UTC
Created attachment 168932 [details]
drm_info output

I've added the drm_info output here
Comment 3 Zamundaaa 2024-04-26 21:06:41 UTC
okay, the driver reports it as supported. Please attach the output of
> kscreen-doctor -o
as well, maybe it's just a bug in the GUI?
Comment 4 Mufeed Ali 2024-04-27 05:40:50 UTC
Created attachment 168939 [details]
`kscreen -o` output

Looks like you're right. VRR is showing up as "Automatic" here. I also feel like it's working considering that it looked fine when I played Firewatch but that wasn't a lot of time and I don't really know what to look for when it comes to evidence on the contrary.
Comment 5 Mufeed Ali 2024-04-27 05:46:26 UTC
Okay, sorry for the false alert but the `kscreen -o` output was on this boot and I hadn't checked the system settings app yet. The Adaptive Sync option is back... I have no idea what's going on.
Comment 6 Mufeed Ali 2024-04-27 14:22:55 UTC
Created attachment 168945 [details]
Updated drm_info

Rebooted from windows just now and it's not working again.
Comment 7 Mufeed Ali 2024-04-27 14:23:39 UTC
Created attachment 168946 [details]
updated kscreen -o output

Updated kscreen output and drm_info output as well
Comment 8 Mufeed Ali 2024-04-27 14:26:47 UTC
Is drm_info a dependency for this feature?
Comment 9 Mufeed Ali 2024-04-27 14:33:57 UTC
Created attachment 168948 [details]
drm_info output when option is available
Comment 10 Mufeed Ali 2024-04-27 14:34:17 UTC
Created attachment 168949 [details]
kscreen output when working
Comment 11 Mufeed Ali 2024-04-27 14:35:18 UTC
I've added output for when it works and when it doesnt work. I've tried rebooting multiple times now. It seems to work on some boots but not on others. Is this a driver bug?
Comment 12 Zamundaaa 2024-04-27 15:22:56 UTC
(In reply to Mufeed Ali from comment #8)
> Is drm_info a dependency for this feature?
no

(In reply to Mufeed Ali from comment #11)
> I've added output for when it works and when it doesnt work. I've tried
> rebooting multiple times now. It seems to work on some boots but not on
> others. Is this a driver bug?
The driver says the display is capable of adaptive sync in both cases. The only way I think this could happen is if the driver first tells KWin there's no vrr support, but then changes the property later. That's something I can easily fix in KWin though
Comment 13 Mufeed Ali 2024-04-28 09:24:25 UTC
But the driver probably shouldn't be reporting a lack of VRR support in the first place right? Should I try to report that to mesa?

Also, if I set it to "Automatic" on a boot where the option appears, would that still apply to a boot where the option isn't present (considering that the driver does in fact still support it)?
Comment 14 Zamundaaa 2024-05-03 14:41:02 UTC
> But the driver probably shouldn't be reporting a lack of VRR support in the first place right?
Maybe, we'd have to confirm my theory first. Would you be willing to patch KWin to get that information?

> Also, if I set it to "Automatic" on a boot where the option appears, would that still apply to a boot where the option isn't present (considering that the driver does in fact still support it)?
No, if KWin thinks adaptive sync isn't supported, it won't try to use it.
Comment 15 JLV 2024-05-04 19:32:13 UTC
I have the same issue with my laptop. A 7840HS with a 120Hz freesync screen. In plasma 5, VRR option was showed all the time, but with the newer version it has been disappeared. It shows only at 10% times. I throught that it was a missing package or hardware issue but I already have a windows to go external ssd and freesync is detected and enabled all of the time.
Comment 16 Bug Janitor Service 2024-05-07 22:29:08 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5703
Comment 17 Mufeed Ali 2024-06-01 10:34:15 UTC
> Would you be willing to patch KWin to get that information?

Sorry for the delay in getting back to you, but i can do that
Comment 18 Mufeed Ali 2024-06-01 21:20:58 UTC
I also just wanted to confirm this. It does switch from "vrr_capable = 0" to "vrr_capable = 1" at some point post-boot. This doesn't seem to be the case with my Fedora Silverblue setup though, so might be some issue with my arch setup
Comment 19 Mufeed Ali 2024-06-02 05:57:03 UTC
My issue is related to power management somehow. Switching the Power Profile to anything (even Power Save) consistently gets the state to "vrr_capable: 1" immediately.
Comment 20 Mufeed Ali 2024-06-02 06:22:04 UTC
I am so sorry... What I said above isn't true... Turns out it's me plugging in power into the laptop that triggered the vrr_capable to 1. But booting with power plugged in doesn't set it to 1.
Comment 21 Mufeed Ali 2024-06-02 06:44:16 UTC
Okay, the real fix was a lot simpler and the reason might also be simple. I set SDDM to use Wayland (https://wiki.archlinux.org/title/SDDM#Wayland) and synced the settings from Plasma to SDDM once. This seems to have completely fixed the issue. I think the reason it wasn't working could be (completely a guess) that SDDM used X11 and I don't have FreeSync configured on X11. I'm not sure. But it works now! SDDM on Wayland is pretty nice btw.
Comment 22 Mufeed Ali 2024-06-21 08:31:27 UTC
After a good amount of time, I can confirm that making SDDM use Wayland did in fact fix the issue for me and I haven't faced it since my last comment here.
Comment 23 JLV 2024-06-22 13:26:09 UTC
(In reply to Mufeed Ali from comment #22)
> After a good amount of time, I can confirm that making SDDM use Wayland did
> in fact fix the issue for me and I haven't faced it since my last comment
> here.

I can confirm too. I followed the instructions and now I have access to VRR all of the time. I don't know if this changes will be included in the future by default installations.
Comment 24 Zamundaaa 2024-06-24 17:02:15 UTC
Git commit 4453ce7eef3145b76e119becd751085dec913c3d by Xaver Hugl.
Committed on 24/06/2024 at 16:47.
Pushed by zamundaaa into branch 'master'.

backends/drm: update output properties after they're created too

Otherwise we might miss some changes that come without a hotplug event,
like adaptive sync becoming available after the output has been initialized

M  +0    -13   src/backends/drm/drm_connector.cpp
M  +11   -8    src/backends/drm/drm_gpu.cpp
M  +63   -51   src/backends/drm/drm_output.cpp
M  +4    -1    src/backends/drm/drm_output.h
M  +4    -0    src/core/output.cpp

https://invent.kde.org/plasma/kwin/-/commit/4453ce7eef3145b76e119becd751085dec913c3d
Comment 25 Zamundaaa 2024-06-24 17:05:06 UTC
(In reply to JLV from comment #23)
> I don't know if this changes will be included in the future by default installations.
Currently that's up to the distro; Fedora for example already configures it to be that way by default. We should probably put it into our packaging recommendations too though
Comment 26 Zamundaaa 2024-07-10 16:20:56 UTC
*** Bug 489012 has been marked as a duplicate of this bug. ***
Comment 27 Zamundaaa 2024-07-11 12:36:48 UTC
Git commit 28e8d4da159763e19962a98a3a13a8d5b6927970 by Xaver Hugl.
Committed on 11/07/2024 at 12:28.
Pushed by zamundaaa into branch 'Plasma/6.1'.

backends/drm: update output properties after they're created too

Otherwise we might miss some changes that come without a hotplug event,
like adaptive sync becoming available after the output has been initialized

M  +0    -13   src/backends/drm/drm_connector.cpp
M  +11   -8    src/backends/drm/drm_gpu.cpp
M  +63   -51   src/backends/drm/drm_output.cpp
M  +4    -1    src/backends/drm/drm_output.h
M  +4    -0    src/core/output.cpp

https://invent.kde.org/plasma/kwin/-/commit/28e8d4da159763e19962a98a3a13a8d5b6927970