Screen flicker and tearing Linux Mint Cinnamon

Screen flicker and tearing Linux Mint Cinnamon

Do you have screen flicker, blinking, artefacts or tearing using Linux Mint Cinnamon? If so this article will show the steps which can identify and resolve the problem. This is the setup which has screen flicker:

  • Linux Mint 19.3
  • NVIDIA GP104 [GeForce GTX 1080]
  • Cinnamon
  • Dual monitor setup
    • Display port and HDMI

From time to time I can notice flicker and tearing. Most of the times the problems are triggered by event:

  • starting Firefox, Chrome
  • Popup from application
  • Overlapping windows
  • etc

The flicker can start by a single window and later to move on desktop background.

Step #1: Install and test MATE desktop

In order to verify where is the problem you can start by adding MATE Desktop which is known for better performance and a bit more stable than Cinnamon. In order to add MATE on existing Linux Mint Cinnamon you can follow next steps:

  • start terminal by
    CTRL + ALT + T

  • type: sudo apt-get install mint-meta-mate

    • followed by your password
  • Logout from your current account

  • On the login screen select MATE (click on the circle icon)

  • Login once MATE is selected

If the flicker disappear than most probably the issues are related to Cinnamon. You can try to fix cinnamon issues by checking next steps or continue using MATE. The benefits of MATE are:

  • better performance - which is perfect for older or weaker machines
  • faster load
  • more stable

The disadvantages of MATE:

  • you will be missing the beautiful interface and some nice features.
  • you will need to setup everything from the beginning
    • for example keyshortcuts for split of windows and changing monitors

Step #2: Check/Update drivers/kernels

The second step which I usually do in order to verify display problems is to check and update the graphic drivers. The reason for this is the following: corrupted drivers very often lead to unexpected behavior like: screen blinking and artefacts. Checking drivers is done by:

  • Menu
  • Administration
  • Drivers
  • Select the recommended driver or test with older one

linux-mint_nvidia_drivers

Another possible change is about Linux kernels. Some kernels can introduce regression. In such case you can revert to older working version by using Timeshift.

For more information you can check:

Step #3: Check for problematic Desklets/Applets

Some Desklets/Applets might cause problems to Cinnamon. In order to check for such you can open Desklets(right click on your Desktop / Add Desklets). No you can check for question mark in bubble - next to some desklets. If you point the quote you can read:

This desklet contains function calls that could potentially cause Cinnamon to crash or freeze.

As you can notice from the picture below:

linux_mint_cinnamon_flicker

My advice is to not use those desklets if you have problems. In my experience the windows which cover such desklets might cause flicker or view problems to the windows. Also moving of such desklets it's problematic sometimes.

It's similar for applets. You can start Applets by right click on the panel / Applets.

Step #3: Reset/Restart Cinnamon settings

Please keep in mind that this can change all settings applied on your panel! So it's good idea to have back up or to be ready to do them again.

There are two ways to restore the Cinnamon settings. The first one is by using the GUI and it's really simple one:

  • Right Click Panel
  • Troubleshoot
  • Restore all settings to default
    • You can also restart Cinnamon if needed

If you like to use terminal:

  • Open terminal - CTRL + ALT + T
  • Type: gsettings reset-recursively org.cinnamon
  • Press Enter

One more option for cinnamon restart is: CTRL + ALT + ESC

You might also try to login in Software Rendering mode (on the login screen) in order to check flicker.

Step #4: Check/Change your cable and/or video card

I was working on Ubuntu 18.04 which had artefacts and tearing on the picture. I've tried many solutions described on the web:

  • updating to latest drivers
  • switch from NVidia to Nouveau driver
  • changing nomodeset

After a day of unsuccessful experiments - I decided to check the cable. The cable was cheap VGA cable which was plugged in wrong way. After changing the cable - all was fine. But I learned one more lesson:

before to modify/update software be sure that you've test several alternatives: another monitor, computer, cable, OS etc

Step #5: Check/Change refresh rate

I was surprised to find out that refresh rate for my Dell 27 inch monitor is 59.95. This is what is shown by command xrandr:

DP-4 connected 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm
   2560x1440     59.95*+
   2048x1080     60.00    24.00  
   1920x1080     60.00    59.94    50.00 

The same is visible when I start NVidia X Server program. All this can be seen under Linux Mint Cinnamon.

More interesting is that if I check the refresh rate under MATE I have 60. So this might explain why picture is more stable and much better under MATE(no flicker).

Step #6: Check for application which might impact display

There is cinnamon applet: Redshift applet which has two main goals:

  • red filter
  • adjusting brightness level depending on the time

This applet will increase the brightness during the day and change it to low during the night. I really enjoy the applet and see significant change if it's disabled.

I notice that this applet improve the flicker and make it a bit less visible. I guess that there might be other application which affect the picture.

For example some websites like: https://askubuntu.com/ (opened with Firefox or Chrome) cause almost immediately flicker. The flicker start first only for the browser and later I can see it on the Desktop itself.

If I open the same website in MATE this problem is not present. There's not flicker for the same website on the HDMI monitor 24' but only on the DP 27'.

Bonus: Helpful commands and files

xrandr

It is a simple command-line tool to interact with the X Window, which allows for live (re)configuration of the X server.

  • It can be used to change refresh rate or resolution by: xrandr -s 1440x900
  • In case of more monitors you can follow next steps:
    • check available monitors and options with xrandr
    • select resolution and monitor
    • run command like:
      • xrandr --output DP-2-1 --mode 2560x1440
      • xrandr --output DP-0 --mode 2560x1440 --rate 144.00

inxi -CGMS

This command will list hardware information for your system. You can use with with different parameters like:

  • inxi -CGMS
  • inxi -Fx

Example for: inxi -CGMS

System:    Host: vanx-machine Kernel: 5.3.0-40-generic x86_64 bits: 64 Desktop: Cinnamon 4.4.8 Distro: Linux Mint 19.3 Tricia 
Machine:   Type: Desktop Mobo: Micro-Star model: B350 PC MATE (MS-7A34) v: 2.0 serial: <root required> 
           UEFI: American Megatrends v: A.A0 date: 01/26/2018 
CPU:       Topology: 8-Core model: AMD Ryzen 7 1700 bits: 64 type: MT MCP L2 cache: 4096 KiB 
           Speed: 1377 MHz min/max: 1550/3000 MHz Core speeds (MHz): 1: 1377 2: 1374 3: 1377 4: 1374 5: 1377 6: 1366 7: 1377 
           8: 1375 9: 1377 10: 1374 11: 1377 12: 1377 13: 1377 14: 1377 15: 1377 16: 1377 
Graphics:  Device-1: NVIDIA GP104 [GeForce GTX 1080] driver: nvidia v: 435.21 
           Display: x11 server: X.Org 1.19.6 driver: nvidia resolution: 1920x1080~60Hz, 2560x1440~60Hz 
           OpenGL: renderer: GeForce GTX 1080/PCIe/SSE2 v: 4.6.0 NVIDIA 435.21 

/var/log/Xorg.0.log

Xorg logs can bring interesting information or errors. In order to check them use:

nano /var/log/Xorg.0.log

Sample Xorg logs:

[    36.618] (II) Module libinput: vendor="X.Org Foundation"
[    36.618]    compiled for 1.19.6, module version = 0.27.1
[    36.618]    Module class: X.Org XInput Driver
[    36.618]    ABI class: X.Org XInput driver, version 24.1
[    36.618] (II) Using input driver 'libinput' for 'Power Button'
[    36.618] (**) Power Button: always reports core events
[    36.618] (**) Option "Device" "/dev/input/event1"
[    36.618] (**) Option "_source" "server/udev"
[    36.618] (II) event1  - Power Button: is tagged by udev as: Keyboard
[    36.618] (II) event1  - Power Button: device is a keyboard
[    36.618] (II) event1  - Power Button: device removed
[    36.652] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input1/event1"
[    36.652] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 6)

~/.config/monitors.xml

Check monitor configuration for Linux Mint. There you can find information like: available monitors, refresh rate, resolution, is it primary or not, available output connectors etc. You can check it by:

nano ~/.config/monitors.xml

/etc/X11/xorg.conf

This is the main Xorg configuration but some Linux Distros (like mint) override it. Also it depends on the drivers which are installed.

Share Tweet Send
0 Comments
Loading...