Maui Forums
Screen Tearing - Printable Version

+- Maui Forums (https://forums.mauilinux.org)
+-- Forum: Maui Support (https://forums.mauilinux.org/forumdisplay.php?fid=74)
+--- Forum: Plasma Desktop (https://forums.mauilinux.org/forumdisplay.php?fid=84)
+--- Thread: Screen Tearing (/showthread.php?tid=24037)

Pages: 1 2 3 4


Screen Tearing - sputnik_tr_02 - 18th October 2016

Hi guys. I have a laptop with optimus graphics (Nvidia gtx 860m and integrated intel gpu). My problem is when I use nvidia graphics I have terrible screen tearing. I am using 370.28 drivers. I know this issue is not related to this very distro but I have tried every tutorial that I could find but no solutions so far and I was wondering if anyone here have some suggestions. Since it is a gaming laptop I am using it as a desktop replacement so I don't want to mess with bumblebee, using nvidia alone is my main goal. Anyway I hope someone have an idea. Cheers.


RE: Screen Tearing - AJSlye - 18th October 2016

Screen tearing is usually caused by vsync settings.
For the Intel part (plasma desktop) set this to the correct opengl mode and use full screen rendering for Tearing Prevention (VSync) in the compositor settings.
For nvidia you'll need to use the Nvida control center as root and with optirun:
Code:
optirun nvidia-settings

remember in order to use the nvidia chip applications need to be launched with either optirun or primusrun, the latter being the preferred method.
Code:
primusrun firefox

References:
http://bumblebee-project.org/
https://wiki.ubuntu.com/Bumblebee

Also did you follow these instructions to install bumblebee:
http://www.webupd8.org/2016/08/how-to-install-and-configure-bumblebee.html
Note: Not using these instructions can result in no xorg desktop loading (black screen)


RE: Screen Tearing - sputnik_tr_02 - 18th October 2016

(18th October 2016, 16:41)AJSlye Wrote: Screen tearing is usually caused by vsync settings.
For the Intel part (plasma desktop) set this to the correct opengl mode and use full screen rendering for Tearing Prevention (VSync) in the compositor settings.
For nvidia you'll need to use the Nvida control center as root and with optirun:

Code:
optirun nvidia-settings

remember in order to use the nvidia chip applications need to be launched with either optirun or primusrun, the latter being the preferred method.

Code:
primusrun firefox

References:
http://bumblebee-project.org/
https://wiki.ubuntu.com/Bumblebee

Also did you follow these instructions to install bumblebee:
http://www.webupd8.org/2016/08/how-to-install-and-configure-bumblebee.html
Note: Not using these instructions can result in no xorg desktop loading (black screen)
Sorry for my bad English, I think my original post wasn't clear enough. I did not install bumblebee, I was trying to say that I don't want to install bumblebee. Because I don't want to break my system. I also heard that bumblebee could hurt graphics performance in games. My intention is to use Nvidia only.


RE: Screen Tearing - AJSlye - 18th October 2016

In that case you have two options:
1: Change the setting in the firmware (Bios or UEFI) to discreet graphics only and install only the Nvidia driver (no Bumblebee).
2: Install Nvidia driver and Nvidia prime (without Bumblebee) and set the prime tab in the Nvidia Control Center (nvidia-settings) to Nvidia instead of intel.

Nvidia prime can only use one GPU at a time for the entire system (desktop and apps)
Bumblebee lets you use one GPU for desktop and apps (usually intel), and only call on the other one (usually nvidia) for selected apps (aka 3d games, etc.)


RE: Screen Tearing - rocky7x - 19th October 2016

For screen tearing with Nvidia, try to create a file in /etc/profile.d/ with following content:

Code:
export KWIN_TRIPLE_BUFFER=1

Let the file name be for example kwin_triple_buffer.sh

When you restart, the KWin triple buffer should be turned on explicitly and screen tearing should disappear.

Also be sure to check System Settings->Workspace behavior->Compositor-> set Tearing prevention to Full screen repaints.


RE: Screen Tearing - sputnik_tr_02 - 19th October 2016

(19th October 2016, 10:26)rocky7x Wrote: For screen tearing with Nvidia, try to create a file in /etc/profile.d/ with following content:


Code:
export KWIN_TRIPLE_BUFFER=1

Let the file name be for example kwin_triple_buffer.sh

When you restart, the KWin triple buffer should be turned on explicitly and screen tearing should disappear.

Also be sure to check System Settings->Workspace behavior->Compositor-> set Tearing prevention to Full screen repaints.

Thanks for the advice. I will try that and report back. Yesterday I installed Bumblebee and gave it a shot but it is too problematic. Most of the games I tried either didn't work or performed really bad. You basically need to search the web for every single game to find a fix or workaround. Then I realized using prime profiles is less trouble, yes you need to log out and log back in to switch video cards but as I said it's a better option. Today I am planning to fresh install Maui and will try your advice.


RE: Screen Tearing - rocky7x - 19th October 2016

Just regarding bumblebee, since 16.04 it is not compatible with Ubuntu anymore and is basically broken. We need to wait for the 4.0 release in order to expect anything usable. With 14.04 I played a lot of games via bumblebee and all worked without a problem, even for example Unigine engine tests etc. Without any tweaking or tuning and with a very good performance, comparable to Nvidia Prime (I have Nvidia 850M). So if bumblebee is a needed use case, I would recommend going back to 14.04 (at least until bumblebee 4.0 is released).


RE: Screen Tearing - sputnik_tr_02 - 19th October 2016

(19th October 2016, 12:37)rocky7x Wrote: Just regarding bumblebee, since 16.04 it is not compatible with Ubuntu anymore and is basically broken. We need to wait for the 4.0 release in order to expect anything usable. With 14.04 I played a lot of games via bumblebee and all worked without a problem, even for example Unigine engine tests etc. Without any tweaking or tuning and with a very good performance, comparable to Nvidia Prime (I have Nvidia 850M). So if bumblebee is a needed use case, I would recommend going back to 14.04 (at least until bumblebee 4.0 is released).

Well that Kwin script also did not work. I don't know why nothing works, you seem to have very similar laptop. I tried lots of distros and different DE's ( like Cinnamon, KDE, Mate etc ) nothing fixed. I tried other methods, editing xorg.conf, different KWin scripts. I think hardware companies are the ones to blame like Nvidia and AMD they really deserve a middle finger. Anyway I think I have to switch to Nvidia just for gamin and use intel for anything else. Because tearing is unbearable when browsing the web, scrolling, moving windows around and stuff. The problem is that games still suffer from tearing even in game vsync does not work on Nvidia. Thanks anyway!


RE: Screen Tearing - rocky7x - 19th October 2016

Then try to add this:

Code:
__GL_YIELD="USLEEP"
KWIN_TRIPLE_BUFFER=0
KWIN_USE_BUFFER_AGE=0

to
Code:
/etc/environment

But remove the shell script you created earlier with KWIN triple buffer. Then restart. And of course in Compositor settings use Full screen repaints.

Btw, I have Haswell intel laptop with that Nvidia 850M card, worked quite well with bumblebee in Netrunner 14, but since Ubuntu 16.04 broke bumblebee, I've been using Intel for all stuff, except gaming...


RE: Screen Tearing - sputnik_tr_02 - 19th October 2016

Tried it, unfortunately that did not work also. Mine is Haswell too i7 4700 MQ and GTX 860m.