Author Topic: Screen tearing with video on Lenovo thinkpad x230 i5 with intel hd 4000 (SOLVED)  (Read 7587 times)

Offline moomin

  • Newly Subscribed
  • *
  • Posts: 7
  • Karma: -1
  • New Forum User
    • View Profile
  • Peppermint version(s): 6
Hello, I am completely new to linux, but have been so frustrated with windows, I decided to give Linux a try. After some online research, I thought I would try Peppermint OS. So far my experience has been very positive. Everything has been working well. The only issue I am having is screen tearing when playing videos online, either with Youtube or any other video site.  I was also getting this problem with games, but if I disable desktop effects under the Peppermint Control Center, that stops most of the screen tearing in games.

However the problem still persists online with videos. It is most noticeable when viewing full screen, but doesn't matter if the video is standard or hd (mp4 or webm or flash). I have tried with both Chromium and Firefox browsers and tried disabling and enabling hardware acceleration, but it doesn't make any difference. The laptop has 8GB ram, a 2nd generation i5 processor clocked at 2.6ghz and an integrated intel hd4000 gpu.

Any help would be much appreciated for this. On windows 7, I had the option to enable vsync for the intel card, but can't find any settings for this here. It is really frustrating as it completely ruins the experience of watching videos online.

« Last Edit: July 15, 2015, 05:50:18 am by moomin »

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26452
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Dunno if this will help but the vsync setting is at

menu > Preferences > Peppermint Control Center > Desktop Effects (tab)

now put a tick in "Synchronize drawing to vertical blank"



If that doesn't help, you might also want to try disabling some of the other desktop effects (tick boxes), or disabling them altogether (remove tick from "Enable desktop effects").
« Last Edit: July 11, 2015, 12:44:18 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline moomin

  • Newly Subscribed
  • *
  • Posts: 7
  • Karma: -1
  • New Forum User
    • View Profile
  • Peppermint version(s): 6
Hi thanks for the suggestions. Unfortunately they didn't fix the problem. I have since tried Zorin os and elementary os and there is no screen tearing with either of these two distros. Am not sure the reason for this, but I had the same problem with Windows 7 so peppermint is not alone. Some issue with intel drivers I guess.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26452
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Which versions of Zorin and Elementary ?
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline scifidude79

  • Hero
  • *****
  • Posts: 4029
  • Karma: 870
    • View Profile
  • Peppermint version(s): Peppermint 9
Yeah, Intel video is pretty terrible.  I have a motherboard with a built in Intel X4500 GPU.  It didn't do well for games or much of anything in Windows or Linux.  I put up with that for a few months before buying an Nvidia card.

Offline moomin

  • Newly Subscribed
  • *
  • Posts: 7
  • Karma: -1
  • New Forum User
    • View Profile
  • Peppermint version(s): 6
Tested on Elementary OS Freya and Zorin Os9 core and lite. Also Linux Mint (latest) - cinnamon build.  No screen tear on these distros. I do get screen tear on Windows 7 (with the latest intel hd4000 drivers - but not funnily enough if I force the XP drivers to install (but that then breaks aero). I also get screen tear on the latest Lubuntu  and Q4OS. Of all these builds I like Peppermint and Q4Os best but they both give me screen tear with online videos.

Offline scifidude79

  • Hero
  • *****
  • Posts: 4029
  • Karma: 870
    • View Profile
  • Peppermint version(s): Peppermint 9
That's really odd, because Elementary Freya and Zorin 9 are both based on Ubuntu 14.04, the same version of Ubuntu that Peppermint 5 & 6 are based off of.  They should have the same drivers.  It could be a kernel issue or something else that they have installed that Peppermint doesn't.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26452
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Would you like to drop back to the 14.04 kernel (3.13) and xorg stack as used in Peppermint 5, and presumably Zorin 9 and Freya, as opposed to the ones from 14.04.2 (3.16) as used in Peppermint 6 ?

If so, can you confirm whether (or not) you know how to use the Shift key at bootup to access the GRUB mneu, and how to boot a particular kernel from the list ?
« Last Edit: July 14, 2015, 09:10:04 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline moomin

  • Newly Subscribed
  • *
  • Posts: 7
  • Karma: -1
  • New Forum User
    • View Profile
  • Peppermint version(s): 6
Hi no am not sure how to do that. Do I need t download an earlier version (peppermint 5)?

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26452
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
No...

Try this

turn OFF your PC

turn ON your PC and as soon as the screen comes to life hit and hold the Shift key .. you should be presented with a screen similar to this
(obviously it'll mention Peppermint rather than Ubuntu)


Can you confirm you're able to get to that screen, then use the UP/DOWN arrow keys to select the "Advanced" menu item .. then hit enter .. then in the next submenu select the top item with a name like

Peppermint GNU/Linux, with Linux 3.16.0-43-generic

but does NOT end with "(recovery mode)"

then hit enter to boot it



I need you to confirm you can do this because when we go back to the earlier kernel, you'll need to manually select it the first time .. then we can remove the newer kernel.
« Last Edit: July 14, 2015, 01:36:45 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline WallyA

  • Jr. Member
  • **
  • Posts: 37
  • Karma: 15
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 5
This is an issue w/ Intel graphics across most distros .  I had a post a while back regarding my problems w/ video tearing on P5 w/ Intel graphics on multiple machines. 

One factor not mentioned yet is the compositing manager in use.  My experience so far is that Ubuntu w/ Unity desktop is the only distro that doesn't have tearing problems stock w/ Intel graphics (if my memory isn't failing me). 

On several distro's I have been able to rectify the issue by enabling the TearFree option for the driver in /usr/share/X11/xorg.conf.d/.   (This option is disabled by default).  This is accomplished by adding a file named 20-intel.conf to the /usr/share/X11/xorg.conf.d/ (you will need root access).   The contents of the file are as follows:

Code: [Select]
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "AccelMethod" "sna"
Option "TearFree" "true"
EndSection

The AccelMethod line may not be necessary as it should default to that setting, but most "guides" recommend it.  If you search the web for "Linux Intel graphics enable TearFree" you will run across some detailed instructions.  Note that on some distros the X11 config files are located in /etc/X11/xorg.conf.d/, and sometimes the recommended file name is 10-intel.conf (I don't think the 10 or 20 matters as long as you aren't replicating the name of another conf file in the folder).

This method has worked for me on a couple of different versions of Ubuntu Mate as well as my current top choice Ubuntu Gnome 15.04.  I was also able to eventually fix the problem on my P5 install using a combination of enabling TearFree and disabling desktop effects.  I am pretty convinced that this fix did not work on P5 initially, so maybe it was after something updated?

Edited to add please disregard the paragraph below, I was incorrect - the problem was specific to a couple of my systems, not an issue w/ P6

All of that talk to get to my experience w/ P6 and Intel graphics.  So far I have not had any luck using this method of enabling TearFree w/ P6 and Intel graphics - and it isn't that TearFree doesn't fix the problem in P6, it is that enabling it doesn't really enable it.  It seems that something may be different regarding the video driver in P6 as well?  (if tear free is really enabled it will show up in /var/log/Xorg.0.log)

Another potential fix for P6 is to install the Compton compositing manager.  I have tried that on P6 as well, but I haven't been able to make that fix the tearing issue either (so far). 
« Last Edit: July 22, 2015, 11:29:54 am by WallyA »

Offline moomin

  • Newly Subscribed
  • *
  • Posts: 7
  • Karma: -1
  • New Forum User
    • View Profile
  • Peppermint version(s): 6
I was able to boot the older kernel. Screen tearing still persists though.  Will try the tear free option as well and see if that makes a difference.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26452
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
You CANNOT have "booted the earlier kernel" .. we haven't installed it yet.
(I just wanted you to confirm you'd know how to select it once we did install it)

If you've made any changes concerning the "TearFree" option .. UNDO them before continuing below.



To install the 3.13 kernel and xorg stack (as used in Peppermint 5)

OK, open a terminal and run these commands in sequence:
(as they're quite long commands, it'd  be best to copy/paste them one at a time into your terminal, and run them .. make SURE you get the whole command as they scroll off the page to the right)
Code: [Select]
sudo apt-get remove --purge linux-generic-lts-utopic xserver-xorg-lts-utopic libgl1-mesa-glx-lts-utopic libegl1-mesa-drivers-lts-utopicthen:
Code: [Select]
sudo apt-get install --reinstall --install-recommends linux-generic xserver-xorg libgl1-mesa-glx libegl1-mesa-drivers xserver-xorg-input-allthen:
Code: [Select]
sudo apt-get install xserver-xorg-video-neomagic xserver-xorg-video-vesa xserver-xorg-input-evdev xserver-xorg-video-vmware xserver-xorg-video-mach64 xserver-xorg-video-radeon xserver-xorg-video-tdfx xserver-xorg-video-fbdev libgl1-mesa-glx xorg xserver-xorg-video-intel libgbm1 xserver-xorg-video-mga libegl1-mesa-drivers libxatracker2 libgles1-mesa xserver-xorg-video-sisusb xserver-xorg-core xserver-xorg-video-modesetting xserver-xorg-video-cirrus xserver-xorg-video-ati xserver-xorg-input-synaptics libgl1-mesa-dri libwayland-egl1-mesa xserver-xorg-input-all xserver-xorg-input-mouse libgles2-mesa xserver-xorg-video-savage xserver-xorg-video-trident xserver-xorg-video-siliconmotion libegl1-mesa xserver-xorg xserver-xorg-input-vmmouse xserver-xorg-video-r128 libglapi-mesa xserver-xorg-video-nouveau libopenvg1-mesa xserver-xorg-input-wacom linux-generic xserver-xorg-video-openchrome xserver-xorg-video-allOnce that command completes and leaves you back at a $ prompt, REBOOT

But during the boot, hit and hold the Shift key to access the GRUB menu.

Now you need to make SURE you boot the 3.13 kernel, not the 3.16 kernel


Once you've done that, come back here and post the output from:
Code: [Select]
uname -aso I can confirm you're booted into the 3.13 kernel before we continue (as we'renot quite done yet, but I NEED to confirm you're booted into the 3.13 kernel before the next stage).

Also post the output from:
Code: [Select]
dpkg -l | grep lts-utopicand
Code: [Select]
dpkg -l | grep 3.16
« Last Edit: July 15, 2015, 02:14:10 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline moomin

  • Newly Subscribed
  • *
  • Posts: 7
  • Karma: -1
  • New Forum User
    • View Profile
  • Peppermint version(s): 6
Sorry what I meant is that I decided to install peppermint 5, as had only been testing 6, so hadn't really installed much on it. As you said this uses the older kernel, but am still getting screen tearing on online videos (when fullscreen) and games, so I wanted to try the intel conf fix that WallyA suggested, but not sure how to do that.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26452
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
If someone's taking the time to respond it'd be good manners to not change tack in the middle without warning them so they don't waste their time....

OK in Peppermint FIVE

Open a terminal and run:
Code: [Select]
sudo gedit /usr/share/X11/xorg.conf.d/20-intel.confwhen a BLANK file opens, make it read:-
Code: [Select]
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "AccelMethod" "sna"
Option "TearFree" "true"
EndSection
SAVE the file and exit gedit.

In the menu  go to
menu > Preferences > Peppermint Control Center > Desktop Effects (tab)

and remove the tick from "Enable Desktop Effects"

REBOOT



To UNDO (in case of problems)
Code: [Select]
sudo rm -v /usr/share/X11/xorg.conf.d/20-intel.confand reboot.
« Last Edit: July 15, 2015, 02:28:14 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec