Screen flicker and tearing

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
principalmoo

Screen flicker and tearing

Post by principalmoo »

Hello everyone,

I'm completely new to Linux and Linux Mint. I installed Linux Mint after remembering how much I hate Windows 10 (I have been using Apple for the longest time) and everything is going well except for one problem: the top of my screen will flicker/tear every few seconds and it is quite distracting. I have tried this with multiple distros and it does the same thing, but it does not do this in Windows 10. I am hoping to fix this problem with Linux Mint because I really like the distro.

I read the information on the "how to get help" link and I am posting here (instead of the graphics card forum) because a friend stated that this could be anything, even a power problem (I tried using the laptop on battery power only and the problem still occurred).

Here is the information about my computer:
System: Host: moo-VivoBook-14-ASUS-Laptop-X407MA-X407MA Kernel: 4.15.0-20-generic x86_64
bits: 64 gcc: 7.3.0
Desktop: Cinnamon 3.8.9 (Gtk 3.22.30-1ubuntu1)
Distro: Linux Mint 19 Tara
Machine: Device: laptop System: ASUSTeK product: VivoBook 14_ASUS Laptop X407MA_X407MA v: 1.0 serial: N/A
Mobo: ASUSTeK model: X407MA v: 1.0 serial: N/A
UEFI: American Megatrends v: X407MA.204 date: 03/07/2018
Battery BAT0: charge: 28.4 Wh 84.6% condition: 33.6/33.2 Wh (101%)
model: ASUSTeK ASUS status: Charging
CPU: Dual core Intel Celeron N4000 (-MCP-) arch: N/A cache: 4096 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 4377
clock speeds: max: 2600 MHz 1: 922 MHz 2: 1110 MHz
Graphics: Card: Intel Device 3185 bus-ID: 00:02.0
Display Server: x11 (X.Org 1.19.6 )
drivers: modesetting (unloaded: fbdev,vesa)
Resolution: 1366x768@60.00hz
OpenGL: renderer: Mesa DRI Intel UHD Graphics 600 (Geminilake 2x6)
version: 4.5 Mesa 18.0.5 Direct Render: Yes
Audio: Card Intel Device 3198 driver: snd_hda_intel bus-ID: 00:0e.0
Sound: Advanced Linux Sound Architecture v: k4.15.0-20-generic
Network: Card: Realtek RTL8723BE PCIe Wireless Network Adapter
driver: rtl8723be port: e000 bus-ID: 01:00.0
IF: wlo1 state: up mac: <filter>
Drives: HDD Total Size: 120.0GB (13.2% used)
ID-1: /dev/sda model: KINGSTON_SA400S3 size: 120.0GB
Partition: ID-1: / size: 110G used: 15G (15%) fs: ext4 dev: /dev/sda2
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors: System Temperatures: cpu: 46.0C mobo: N/A
Fan Speeds (in rpm): cpu: N/A
Info: Processes: 197 Uptime: 1:39 Memory: 1362.4/3768.4MB
Init: systemd runlevel: 5 Gcc sys: 7.3.0
Client: Shell (bash 4.4.191) inxi: 2.3.56
The desktop environment that I am using is Cinnamon, but I have had this problem with Gnome, MATE, XFCE, LXDE and KDE.

Here is a picture of what is happening:
IMG_0916.jpg
Thank you very much in advance for any help that you can provide!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
snowflake

Re: Screen flicker and tearing

Post by snowflake »

Hi
I fixed the tearing in many distros before by editing, creating if doesnt exist the file /etc/X11/xorg.conf.d/20-intel.conf

Code: Select all

xed /etc/X11/xorg.conf.d/20-intel.conf
or any text editor

paste in:

Code: Select all

Section "Device"
    Identifier "Intel Graphics"
    Driver "intel"
    Option "TearFree" "true"
EndSection
save, reboot

Good luck
principalmoo

Re: Screen flicker and tearing

Post by principalmoo »

Hi snowflake,

Thank you for responding to my post and for being helpful. Unfortunately, I have already tried this but it did not really work. It worked for about a day before it started tearing again.
snowflake wrote: Thu Sep 13, 2018 9:16 am Hi
I fixed the tearing in many distros before by editing, creating if doesnt exist the file /etc/X11/xorg.conf.d/20-intel.conf

Code: Select all

xed /etc/X11/xorg.conf.d/20-intel.conf
or any text editor

paste in:

Code: Select all

Section "Device"
    Identifier "Intel Graphics"
    Driver "intel"
    Option "TearFree" "true"
EndSection
save, reboot

Good luck
Hoser Rob
Level 20
Level 20
Posts: 11796
Joined: Sat Dec 15, 2012 8:57 am

Re: Screen flicker and tearing

Post by Hoser Rob »

That's a very new Intel card and very new hardware can be difficult in Linux. Saw a hint here ...

https://forum.kodi.tv/showthread.php?ti ... pid2732594

... so I'd go into update manager and select kernels. Try installing something from the 16 series. Someone else may have better, more specific info.
For every complex problem there is an answer that is clear, simple, and wrong - H. L. Mencken
gm10

Re: Screen flicker and tearing

Post by gm10 »

Hoser Rob wrote: Thu Sep 13, 2018 10:12 am That's a very new Intel card and very new hardware can be difficult in Linux. Saw a hint here ...

https://forum.kodi.tv/showthread.php?ti ... pid2732594

... so I'd go into update manager and select kernels. Try installing something from the 16 series. Someone else may have better, more specific info.
Well, Cinnamon's compositor is known to have tearing. See https://blog.linuxmint.com/?p=3620 including the workaround there.

If you're not married to Cinnamon then other desktop environments give you the free choice of the compositor to use, if any. Personally I find compton reliably eliminates all tearing.

However, trying a more recent kernel certainly is an idea, too. The most recent series is 4.18, you can install it running this in a terminal window:

Code: Select all

printf 'deb http://archive.ubuntu.com/ubuntu/ cosmic main\n' | sudo tee /etc/apt/sources.list.d/cosmic.list
followed by:

Code: Select all

printf "Package: *\nPin: release a=cosmic\nPin-Priority: 400" | sudo tee /etc/apt/preferences.d/cosmic.pref
apt update
apt install linux-image-generic/cosmic
Last edited by gm10 on Sun Sep 16, 2018 4:00 am, edited 2 times in total.
Lord Boltar

Re: Screen flicker and tearing

Post by Lord Boltar »

Latest kernel is below I added -get this to the end of line so you know which 4 files to grab

http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.18.7/

Build for amd64 succeeded (see BUILD.LOG.amd64):
linux-headers-4.18.7-041807_4.18.7-041807.201809090930_all.deb - get this
linux-headers-4.18.7-041807-generic_4.18.7-041807.201809090930_amd64.deb - get this
linux-headers-4.18.7-041807-lowlatency_4.18.7-041807.201809090930_amd64.deb
linux-image-unsigned-4.18.7-041807-generic_4.18.7-041807.201809090930_amd64.deb - get this
linux-image-unsigned-4.18.7-041807-lowlatency_4.18.7-041807.201809090930_amd64.deb
linux-modules-4.18.7-041807-generic_4.18.7-041807.201809090930_amd64.deb - get this
linux-modules-4.18.7-041807-lowlatency_4.18.7-041807.201809090930_amd64.deb

once all 4 files are in a folder open the terminal there where you saved the 4 files and run the below command - make sure now other deb files are in the download folder only the 4 you downloaded

sudo dpkg -i *.deb

after it has installed reboot then see if the tearing is gone - you can then verify the running kernel by opening the terminal and type in uname -r

If it does not work you can always get rid of the new kernel - to do that when your computer starts to boot up hold down the shift key this will bring up the menu select the advanced option and select the old kernel to boot up once booted up you can use your synaptic package manager and search for 4.18.7 and remove the 4 entries.
gm10

Re: Screen flicker and tearing

Post by gm10 »

Don't do that. Since we have official Ubuntu 4.18 kernels there's no good reason to use mainline kernels instead.
principalmoo

Re: Screen flicker and tearing

Post by principalmoo »

gm10 wrote: Thu Sep 13, 2018 10:33 am However, trying a more recent kernel certainly is an idea, too. Themost recent series is 4.18, you can install it running this in a terminal window:

Code: Select all

sudo printf 'deb http://archive.ubuntu.com/ubuntu/ cosmic main restricted multiverse universe\n' > /etc/apt/sources.list.d/cosmic.list
Hello gm10. Thanks for your helpful post!

I tried this command and the message comes back as "permission denied." Is there something else that I should put into terminal?
gm10

Re: Screen flicker and tearing

Post by gm10 »

principalmoo wrote: Thu Sep 13, 2018 11:40 am
gm10 wrote: Thu Sep 13, 2018 10:33 am However, trying a more recent kernel certainly is an idea, too. The most recent series is 4.18, you can install it running this in a terminal window:

Code: Select all

sudo printf 'deb http://archive.ubuntu.com/ubuntu/ cosmic main restricted multiverse universe\n' > /etc/apt/sources.list.d/cosmic.list
Hello gm10. Thanks for your helpful post!

I tried this command and the message comes back as "permission denied." Is there something else that I should put into terminal?
No, the command is fine. Did you copy & paste it correctly? In case of doubt just try again. Otherwise: It tries to get elevated privileges via the sudo command - is the user you tried this on not part of the sudo group? You need to do this while logged in to a user that has permissions to install software and such. If this is the default user account that was created when you installed the system it should have those rights.
principalmoo

Re: Screen flicker and tearing

Post by principalmoo »

gm10 wrote: Thu Sep 13, 2018 11:45 am
principalmoo wrote: Thu Sep 13, 2018 11:40 am
gm10 wrote: Thu Sep 13, 2018 10:33 am However, trying a more recent kernel certainly is an idea, too. The most recent series is 4.18, you can install it running this in a terminal window:

Code: Select all

sudo printf 'deb http://archive.ubuntu.com/ubuntu/ cosmic main restricted multiverse universe\n' > /etc/apt/sources.list.d/cosmic.list
Hello gm10. Thanks for your helpful post!

I tried this command and the message comes back as "permission denied." Is there something else that I should put into terminal?
No, the command is fine. Did you copy & paste it correctly? In case of doubt just try again. Otherwise: It tries to get elevated privileges via the sudo command - is the user you tried this on not part of the sudo group? You need to do this while logged in to a user that has permissions to install software and such. If this is the default user account that was created when you installed the system it should have those rights.
I did copy and pasted it correctly. I rebooted and it worked after rebooting. I'm now using kernal 4.18.7, but the tearing is still occurring.
gm10

Re: Screen flicker and tearing

Post by gm10 »

I didn't really expect it to, that's why it wasn't my first recommendation, but it probably won't hurt to have the more recent kernel with that hardware of yours.

As I said, the tearing is a Cinnamon thing, you can try the workaround in the blog post I linked or you can try a different desktop environment. Or wait for Cinnamon 4.0 (hopefully with Mint 19.1) which is meant to fix this.
principalmoo

Re: Screen flicker and tearing

Post by principalmoo »

snowflake wrote: Thu Sep 13, 2018 9:16 am Hi
I fixed the tearing in many distros before by editing, creating if doesnt exist the file /etc/X11/xorg.conf.d/20-intel.conf

Code: Select all

xed /etc/X11/xorg.conf.d/20-intel.conf
I tried this again, but when I enter this information, it says "Could not find the file /etc/X11/xorg.conf.d/20-intel.conf."
principalmoo

Re: Screen flicker and tearing

Post by principalmoo »

gm10 wrote: Thu Sep 13, 2018 12:13 pm I didn't really expect it to, that's why it wasn't my first recommendation, but it probably won't hurt to have the more recent kernel with that hardware of yours.

As I said, the tearing is a Cinnamon thing, you can try the workaround in the blog post I linked or you can try a different desktop environment. Or wait for Cinnamon 4.0 (hopefully with Mint 19.1) which is meant to fix this.
I really appreciate your help, gm10. I'll try another desktop environment.
gm10

Re: Screen flicker and tearing

Post by gm10 »

principalmoo wrote: Thu Sep 13, 2018 12:16 pm
snowflake wrote: Thu Sep 13, 2018 9:16 am Hi
I fixed the tearing in many distros before by editing, creating if doesnt exist the file /etc/X11/xorg.conf.d/20-intel.conf

Code: Select all

xed /etc/X11/xorg.conf.d/20-intel.conf
I tried this again, but when I enter this information, it says "Could not find the file /etc/X11/xorg.conf.d/20-intel.conf."
Do it like this:

Code: Select all

sudo nano /usr/share/X11/xorg.conf.d/20-intel.conf
and then paste his contents in:

Code: Select all

Section "Device"
    Identifier "Intel Graphics"
    Driver "intel"
    Option "TearFree" "true"
EndSection
Ctrl+S to save, Ctrl+X to exit. Reboot to see if it works. I don't know, never tried that parameter, it comes with quite a few drawbacks apparently, but in case it fixes your problem that may be worth it.
DAMIEN1307

Re: Screen flicker and tearing

Post by DAMIEN1307 »

almost every intel graphics ive worked with including three of my own have always seemed to have some level of screen tearing...ive listed below what i have used to fix this issue and thus far has worked everytime...just be aware DO NOT use these instructions on any other type of graphics such as amd, nvidia etc...this is only for intel...DAMIEN

Open a terminal and run these commands in sequence:

Code: Select all

sudo apt-get install mesa-utils
then

Code: Select all

sudo mkdir -v /etc/X11/xorg.conf.d
then

Code: Select all

echo -e 'Section "Device"\n Identifier "Intel Graphics"\n Driver "Intel"\n Option "AccelMethod" "sna"\n Option "TearFree" "true"\nEndSection' | sudo tee /etc/X11/xorg.conf.d/20-intel.conf
now REBOOT to pick up the changes. <-- It's IMPORTANT that you reboot to apply the changes


To UNDO

Open a terminal and run:

sudo rm -v /etc/X11/xorg.conf.d/20-intel.conf

and REBOOT.
gm10

Re: Screen flicker and tearing

Post by gm10 »

I am using intel graphics and I got no tearing without that parameter, using compton but other compositors work as well.

Also no need to create
/etc/X11/xorg.conf.d/
when you can just use
/usr/share/X11/xorg.conf.d/
(see the instructions I already gave him)

mesa-utils is pre-installed.
principalmoo

Re: Screen flicker and tearing

Post by principalmoo »

Hi everyone,

I appreciate everyone's help so far.

I installed Linux MATE and:
  • Updated kernel to 4.18.7
  • Tried the different desktop settings (Compton does seem to work the best, but there is still flickering)
  • Created the Tear Free file
Unfortunately, the flicker remains...
gm10

Re: Screen flicker and tearing

Post by gm10 »

I don't know how compton interacts with that tear free driver flag, I have a feeling they might conflict. So try without the flag.

Compton also has a ton of options you can tweak, see compton -h or for an easier but slightly outdated read here: https://github.com/chjj/compton/blob/ma ... 1.asciidoc
You can likely google a few sample configuration files that may help.
principalmoo

Re: Screen flicker and tearing

Post by principalmoo »

gm10 wrote: Fri Sep 14, 2018 7:27 am I don't know how compton interacts with that tear free driver flag, I have a feeling they might conflict. So try without the flag.

Compton also has a ton of options you can tweak, see compton -h or for an easier but slightly outdated read here: https://github.com/chjj/compton/blob/ma ... 1.asciidoc
You can likely google a few sample configuration files that may help.
Thanks for your help gm10. I'm going to look into this this weekend!
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Screen flicker and tearing

Post by catweazel »

gm10 wrote: Thu Sep 13, 2018 10:33 am However, trying a more recent kernel certainly is an idea, too. The most recent series is 4.18, you can install it running this in a terminal window:

Code: Select all

sudo printf 'deb http://archive.ubuntu.com/ubuntu/ cosmic main restricted multiverse universe\n' > /etc/apt/sources.list.d/cosmic.list
followed by:

Code: Select all

sudo printf "Package: *\nPin: release a=cosmic\nPin-Priority: 400" > /etc/apt/preferences.d/cosmic.pref
apt update
apt install linux-image-generic/cosmic
How would 18.3 (xenial) go with that, using a cosmic repo to get Ubuntu kernels?
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Locked

Return to “Beginner Questions”