Closed CorvetteCole closed 1 year ago
Hey there, haven't looked yet since it's still a bit away for Fedora but I'll likely start soon. Update you on what I find.
I've been playing around with it a bit, I'd be happy to collaborate where needed. Will let you know if I make any progress on my end as well!
Holding off on moving Silverblue to 38 on my PC until the COPR is updated, patiently waiting of course :) Thanks for your efforts!
+1 :)
Hoping to have this fixed by tomorrow night, I'll let you all know where this lands. Sorry for the long delay, busy time of year for me
I've rebased them on 44.1
-edit-
unfortunately doesn't seem to work. tried to launch dota (vk) and tf2 (gl) on vrr enabled monitor and it kicks me back to login or causes session to die
https://gist.github.com/GloriousEggroll/e73ca01ad337816ac89d741e68efa888
-edit 2-
there's a chunk i forgot to add here but i cant get it to work properly and its 4 am:
diff --git a/src/backends/native/meta-renderer-view-native.c b/src/backends/native/meta-renderer-view-native.c
index 0d7d279e5..83f4d9acf 100644
--- a/src/backends/native/meta-renderer-view-native.c
+++ b/src/backends/native/meta-renderer-view-native.c
@@ -186,12 +186,17 @@ meta_renderer_view_native_dispose (GObject *object)
static void
meta_renderer_view_native_class_init (MetaRendererViewNativeClass *klass)
{
- ClutterStageViewClass *stage_view_class = CLUTTER_STAGE_VIEW_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ ClutterStageViewClass *clutter_stage_view_class = CLUTTER_STAGE_VIEW_CLASS (klass);
- stage_view_class->new_frame = meta_renderer_view_native_new_frame;
+ object_class->dispose = meta_renderer_view_native_dispose;
+ clutter_stage_view_class->schedule_actor_update = meta_renderer_view_native_schedule_actor_update;
+
}
static void
meta_renderer_view_native_init (MetaRendererViewNative *view_native)
{
+ view_native->frame_sync_mode_update_queued = TRUE;
+ view_native->frame_sync_mode = META_FRAME_SYNC_MODE_INIT;
}
--
2.40.0
-edit 3-
Unfortunately can't figure it out. Due to changes introduced by:
https://github.com/GNOME/mutter/commit/7b634df37980b6b2dd624b51932663ba363776e0
which is part of:
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2855
It's broken in a nontrivial way, or at least in a way I don't understand how to fix.
@GloriousEggroll Same boat as you, trying to work through it. Thanks for the write up!
Same problems I was running in to! Seems this one may take a little bit to work out.
The MR has been rebased on main
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1154#note_1776106
Christmas in July!
Very good to hear, and very weird timing. I literally just went looking yesterday through all the issues and pull requests and whatnot to try find if there was any new info.
Now all I need is for the AUR package to get updated and I can finally stop feeling like having a high refresh rate monitor is almost a detriment in games. Thanks for all your hard work.
Ive already got everything up and running on N38, here's the relevant patches rebased, they should apply cleanly on top of the latest fedora 38 mutter and gnome-control-center packages:
As noted in the PR you will also want two other things:
(1) Cursor movement is stuttery even the refresh rate is high – AMD has a kernel/firmware bug that results in stuttery cursor movement when VRR is enabled. It is very apparent in VRRTest in my case.
Upstream bug report (thanks [@Zamundaaa](https://github.com/Zamundaaa)): https://gitlab.freedesktop.org/drm/amd/-/issues/2186
For testing purposes, there are two ways to work around this issue (each with its own downsides):
Disable the use hardware cursor – set the MUTTER_DEBUG_DISABLE_HW_CURSORS=1 environment variable.
Disable the use of the atomic KMS API – set the MUTTER_DEBUG_FORCE_KMS_MODE=simple environment variable.
In N38 we set MUTTER_DEBUG_FORCE_KMS_MODE=simple
in /etc/profile
(2) You'll want Xwayland 23.1.2 or higher.
rawhide already has this so I just grabbed it and recompiled it for N38: https://kojipkgs.fedoraproject.org//packages/xorg-x11-server-Xwayland/23.1.2/1.fc39/src/xorg-x11-server-Xwayland-23.1.2-1.fc39.src.rpm
Regarding this portion from the MR:
VRR now requires the variable-refresh-rate experimental feature to enabled. To enable it, use the the following command and then restart your session (log out and back in):
$ gsettings set org.gnome.mutter experimental-features "['variable-refresh-rate']"
In the patchset I attached this is already set by default in enable-vrr-setting.patch
Patch apply order for mutter:
3080.patch 3085.patch 1154.patch enable-vrr-setting.patch
Additional note:
In the original patchset vrr is disabled for i915 due to incompatibility with older kernels. Since we are strictly using this for fedora, and since i would assume we also want the new Arc GPUs to have vrr, I removed this snippet from the patchset:
diff --git a/data/61-mutter.rules b/data/61-mutter.rules
index 9262b152b9..898c640217 100644
--- a/data/61-mutter.rules
+++ b/data/61-mutter.rules
@@ -1,3 +1,4 @@
+DRIVERS=="i915", SUBSYSTEM=="drm", TAG+="mutter-device-disable-vrr"
DRIVERS=="i915", SUBSYSTEM=="drm", ATTRS{vendor}=="0x8086", ATTRS{device}=="0x1602", TAG+="mutter-device-disable-kms-modifiers"
DRIVERS=="i915", SUBSYSTEM=="drm", ATTRS{vendor}=="0x8086", ATTRS{device}=="0x1606", TAG+="mutter-device-disable-kms-modifiers"
DRIVERS=="i915", SUBSYSTEM=="drm", ATTRS{vendor}=="0x8086", ATTRS{device}=="0x160a", TAG+="mutter-device-disable-kms-modifiers"
@GloriousEggroll Can't thank you enough, these patches are now live and building on Copr as I type this. I've updated the instructions with the needed environment variable and extra package as well.
Applying 1154 (VRR) now conflicts with 1441 (triple buffering).
@road2react triple buffering has -never- been compatible with the vrr patchset. you always had to choose one or the other (as far as I've always been aware/done)
So I've been using VRR MR on my PC for quite a while now and only had issues with video playback on firefox and capped games. Something is not working nice below 90 Hz for me, but If a cap game's framerate by launching in a gamescope instance, then VRR works fine at, let's say, 60 fps.
But I digress. I noticed a pretty big issue and I think that I should inform of it in the gitlab MR. Basically, when there's no fullscreen content, the VRR protocol is completely disabled! That worked fine with my monitor and I never noticed it but my TV goes dark for few seconds to "switch" the modes. It happens even when I change the volume and a pop-up appears on screen. The VRR is disabled, and enabled again when it goes away. As you can imagine, it's basically unusable in this state.
Is anyone able to confirm my findings?
Hi, I maintain the mutter-vrr AUR package. I've began attempting to rebase on 44, and it seems it will take a little work. Curious if you've had a chance to poke at it yet