Solve Cinnamon brightness flicker with FreeSync

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
DPM
Level 4
Level 4
Posts: 432
Joined: Thu Sep 24, 2020 9:21 am

Solve Cinnamon brightness flicker with FreeSync

Post by DPM »

You have a FreeSync monitor with variable refresh rate and get intermittent brightness flicker in Cinnamon? Especially when opening the start menu? And it goes away once you disable FreeSync?

Make a new file /usr/share/drirc.d/10-mesa-defaults.conf with the following content, successfully tested in Mint 21 Cinnamon with AMD RX 6650 XT:

Code: Select all

<?xml version="1.0" standalone="yes"?>
<!--

============================================
Application bugs worked around in this file:
============================================

* Cinnamon DE not suited for VRR.

Place file as:
/usr/share/drirc.d/10-mesa-defaults.conf

-->

<!DOCTYPE driconf [
   <!ELEMENT driconf      (device+)>
   <!ELEMENT device       (application | engine)+>
   <!ATTLIST device       driver CDATA #IMPLIED
                          device CDATA #IMPLIED>
   <!ELEMENT application  (option+)>
   <!ATTLIST application  name CDATA #REQUIRED
                          executable CDATA #IMPLIED
                          executable_regexp CDATA #IMPLIED
                          sha1 CDATA #IMPLIED
                          application_name_match CDATA #IMPLIED
                          application_versions CDATA #IMPLIED>
   <!ELEMENT engine       (option+)>

   <!-- engine_name_match: A regexp matching the engine name -->
   <!-- engine_versions: A version in range format
             (version 1 to 4 : "1:4") -->

   <!ATTLIST engine       engine_name_match CDATA #REQUIRED
                          engine_versions CDATA #IMPLIED>

   <!ELEMENT option       EMPTY>
   <!ATTLIST option       name CDATA #REQUIRED
                          value CDATA #REQUIRED>
]>

<driconf>
    <!-- Please always enable app-specific workarounds for all drivers and
         screens. -->
    <device>
        <application name="cinnamon" executable="cinnamon">
            <option name="adaptive_sync" value="false" />
        </application>
    </device>
    <!-- vmwgfx doesn't like full buffer swaps and can't sync to vertical retraces.-->
    <device driver="vmwgfx">
        <application name="cinnamon" executable="cinnamon">
            <option name="glx_extension_override" value="-GLX_EXT_buffer_age -GLX_OML_sync_control -GLX_SGI_video_sync" />
        </application>
    </device>
</driconf>
Source: upstream bugfix merge https://gitlab.freedesktop.org/mesa/mes ... ests/19619 that has yet to land in Mint. This disables variable refresh rate while being in Cinnamon, but not in games. Testing with the Unigine Superposition benchmark showed that the variable refresh rate is active in-game.

In order to even have FreeSync enabled in the first place, provided that you have an AMD GPU and a FreeSync capable monitor, make a new file /usr/share/X11/xorg.conf.d/20-amdgpu.conf with the following content, successfully tested in Mint 21 Cinnamon with AMD RX 6650 XT:

Code: Select all

Section "Device"
    Identifier "AMDgpu"
    Driver "amdgpu"
    Option "TearFree" "on"
    Option "VariableRefresh" "true"
    Option "DRI" "3"
    Option "AccelMethod" "glamor"
EndSection
Post Reply

Return to “Tutorials”