Nvidia Prime Screen Tearing

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
mlangston31

Nvidia Prime Screen Tearing

Post by mlangston31 »

Alright so I know there have been many posts about this issue here before, but none of them seem to work for me whatsoever.

I have screen tearing while using the nvidia option for prime. Pretty much every game I run has horizontal tearing in the top half of the screen. Using the vsync option in game settings do not work as well. The posts I have looked at talk about enabling vsync or Sync to Vblank in nvidia-settings. I don't know if there is something wrong with my settings but I have no options for those. When using Intel graphics I have no tearing.

Picture of my Nvidia-Settings: https://i.imgur.com/UlDJB4s.png

My Specs:
Linux Mint 17 64bit with Cinnamon as my DE
Sager NP-8268 laptop with i7-4810mq and Nvidia 860m hybrid graphics
Nvidia 340.24 drivers from the xedgers PPA(Used the 331 drivers as well with the same problems), I also have nvidia-prime installed

Inxi -F output:
Card-1: Intel 4th Gen Core Processor Integrated Graphics Controller
Card-2: NVIDIA GK104M [GeForce GTX 860M]
X.Org: 1.15.1 driver: nvidia Resolution: 1920x1080@60.0hz
GLX Renderer: GeForce GTX 860M/PCIe/SSE2 GLX Version: 4.4.0 NVIDIA 340.24
Things I have tried:
Installing Openbox with Compton and using that
manually adding the settings to my xorg.conf
Setting powermizer setting to Performance mode
Using Vsync settings in the games
Using Bumblebee, but I didn't like the performance

I apologize if this is some easy fix I just overlooked and any help is really appreciated.
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.
PatH57

Re: Nvidia Prime Screen Tearing

Post by PatH57 »

Hi,

drivers are the latest, the only things I could suggest is to check the version of Mesa and update the kernel.
mlangston31

Re: Nvidia Prime Screen Tearing

Post by mlangston31 »

Alright so I am using the 3.13.0-24-generic kernel, and when I enter glxinfo | grep "OpenGL version" I get
OpenGL version string: 4.4.0 NVIDIA 340.24
Is that what you mean about checking mesa? or is that not it?
PatH57

Re: Nvidia Prime Screen Tearing

Post by PatH57 »

mesa is the "driver" for opengl (still a lot of games use it)
you need to install mesa through package manager

http://www.wikihow.com/Install-Mesa-%28 ... Linux-Mint
mlangston31

Re: Nvidia Prime Screen Tearing

Post by mlangston31 »

I tried to follow what the website told, and Installed all the packages it said to install but I feel like I'm missing or forgetting something. Sorry about confusion, I'm just trying to get a grasp on it.
PatH57

Re: Nvidia Prime Screen Tearing

Post by PatH57 »

well if the tearing is still there appart a kernel upgrade I don't see what else we can do...
mlangston31

Re: Nvidia Prime Screen Tearing

Post by mlangston31 »

Alright Ill try upgrading my kernel now, which one would you suggest? im running 3.13 at the moment.
PatH57

Re: Nvidia Prime Screen Tearing

Post by PatH57 »

stay within the 3.13 range I think the latest is 3.13.11
https://www.google.fr/search?q=install+ ... gws_rd=ssl
mlangston31

Re: Nvidia Prime Screen Tearing

Post by mlangston31 »

Kernel update does not seem to fix it either.
I guess the only options I have is to use windows, integrated graphics, or just wait and hope this problem is ever fixed.

One thing that still confuses me though, is I have no xvideo or vsync options in nvidia-settings while everyone else seems to have them. Is it just because I am using hybrid graphics?
PatH57

Re: Nvidia Prime Screen Tearing

Post by PatH57 »

hybrid was a good idea it just is difficult to get it working. The first I had was on vista and only 7 month later came a driver that fixed the issues I had, I did try to run Mint17 but had to do too many "tweaks" to get something decent. For the time being Mint13 works fine and when I buy a new one I will check Mint17 again.
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: Nvidia Prime Screen Tearing

Post by roblm »

mlangston31 wrote:The posts I have looked at talk about enabling vsync or Sync to Vblank in nvidia-settings. I don't know if there is something wrong with my settings but I have no options for those.
This is the third time I've seen in a topic on this forum where a section of the Nvidia Settings utility is missing, after installing an Nvidia driver through the distribution's package manager. I haven't seen this yet when the driver is downloaded from Nvidia's website. You could look in the hidden file “.nvidia-settings-rc”, which is in your “/home/user-name” folder, and look for this line:
0/SyncToVBlank=1

If it's not there, then try adding it. Also check for this line:
0/AllowFlipping=1

You can also try adding this section to the “xorg.conf” file, below the Screen section:

Code: Select all

Section "Extensions"
     Option "Composite" "Disable"
EndSection
Open the “xorg.conf” file by typing this command in the Terminal:
gksudo gedit /etc/X11/xorg.conf

Save the file and reboot. You can also try adding this line to the Device section:
Option "TripleBuffer" "True"

The section will then look something like this:

Code: Select all

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    BoardName      "GeForce 210"
    Option "TripleBuffer" "True"
EndSection
Also, check this topic:
http://forums.linuxmint.com/viewtopic.p ... 8&t=172364

Screen tearing is a frustrating problem which appears to me to be worse in Mint 17. The most promising solution may be Nvidia's G-Sync technology that will be used in newer monitors. I've seen one from Asus that will be released in August. It's a lot more expensive and I've read that you'll also need a GPU that supports this technology.
Last edited by roblm on Mon Jul 28, 2014 5:13 pm, edited 1 time in total.
mlangston31

Re: Nvidia Prime Screen Tearing

Post by mlangston31 »

Alright so I tried everything you suggested.
Adding the settings to the ~/.nvidia-settings-rc file would be ereased whenever I ran nvidia-settings. I got an error when launching nvidia-settings when I had 0/AllowFlipping=1 in the config. After I exit nvidia-settings and look at nvidia-settings-rc again those two lines are gone.

The xorg.conf tweaks, adding
Section "Extensions"
Option "Composite" "Disable"
EndSection
actually broke my Xserver for some reason and the triplebuffer didn't help it either.

I also looked at the forum post you linked, I believe I tried adding the lines to /etc/environment before which did not work either. They also suggested disabling cinnamon 2.x unredirect which didn't fix it either.

My next thought would be to try and install the drivers from nvidia directly but I assume that would cause a bunch more problems.

Thanks for trying to help though :)
PatH57

Re: Nvidia Prime Screen Tearing

Post by PatH57 »

also ubuntu 14.04 and Mint 17 don't have a xorg.conf file......you would have to create one
http://askubuntu.com/questions/455873/x ... ghtdm-conf
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: Nvidia Prime Screen Tearing

Post by roblm »

mlangston31 wrote:The xorg.conf tweaks, adding
Section "Extensions"
Option "Composite" "Disable"
EndSection
actually broke my Xserver for some reason and the triplebuffer didn't help it either.
I've read several posts in other forums where that method helped. Any time the xorg.conf file is edited, there is a chance of startup
problems after rebooting, so I usually include instructions on how to recover from it in recovery mode. I totally forgot to include those
instructions.
mlangston31 wrote:My next thought would be to try and install the drivers from nvidia directly but I assume that would cause a
bunch more problems.

I don't think that will work. The driver will be the same but other files in the package may be a little different. However, it would be
interesting if someone could test this with Mint 17. I don't have a laptop with Optimus technology. If you have a backup image of your
Mint installation, then you might want to test it.
EDITED: If anyone attempts this, then the option "--no-opengl-files" should be added to the end of the ".run" file. For example:

Code: Select all

NVIDIA-Linux-x86-319.49.run --no-opengl-files
From your result and the result from another topic I was involved in, it appears that if a configuration option isn't listed in the Nvidia
Settings utility, then it can't be added to it's configuration file.

I've read where other users claim significantly less or no tearing when using a monitor with a higher refresh rate such as 120 or 144 Hz,
instead of 60 Hz.

You may want to try the method of configuring the two video drivers in the article in the link below, which come from the
“NVIDIA Accelerated Linux Graphics Driver README and Installation Guide”:
http://us.download.nvidia.com/XFree86/L ... ndr14.html

From the posts I've read on this forum and other forums from users that have tested both Bumblebee and Nvidia-Prime, most recommend
using Bumblebee for now, for a more stable system, cooler laptop and longer battery life.
Last edited by roblm on Fri Aug 08, 2014 8:23 pm, edited 1 time in total.
mlangston31

Re: Nvidia Prime Screen Tearing

Post by mlangston31 »

Well I installed bumblebee, then fixed bumblebee then when I got it working fps was terrible. So i searched some more and started using this command vblank_mode=0 optirun -b primus %command% and i am now getting great performance with no tearing at all. For some reason having vblank enabled gives me like 20 fps but without it all my games are smooth. I guess this is what i'll use until a better alternative comes around.

One thing I am wanting to know is how bumblebee saves power. Does it cut off the video card when I am not using it? I noticed in the config that it has a setting that does this
# Card power state at exit. Set to false if the card shoud be ON when Bumblebee
# server exits.
TurnCardOffAtExit=false
Ideally I would like the card to be cut off at start, then get turned on when I use the command I talked about above and when I am done using the program the card cuts off again. I saw a post that did something like this I think but keeping the card off when you shutdown can cause problems so Ideally i would like it to be turned back on at startup. Is this possible or am I just hoping for too much?
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: Nvidia Prime Screen Tearing

Post by roblm »

The article in the link below may answer your questions:
http://www.webupd8.org/2012/11/primus-b ... -less.html

It states that using Bumblebee with Primus “Only uses/starts secondary GPU for OpenGL parts of applications - everything else remains
on your main GPU (power savings)”.

Does using the command "vblank_mode=0 primusrun" give you more FPS than the command you're using?
mlangston31

Re: Nvidia Prime Screen Tearing

Post by mlangston31 »

Alright so upon further inspection using vblank_mode=0 optirun -b primus %command% gives me a small amount of tearing. no where near using nvidia prime. using this instead works absolutely perfectly optirun -b primus %command%. As for using what you suggested I did not really notice a difference in fps. I only tested it in civ 5 at the moment which is where I was getting tearing the most.
Donnylink

Re: Nvidia Prime Screen Tearing

Post by Donnylink »

I would suggest looking at my post and workaround with bumblebee

http://forums.linuxmint.com/viewtopic.php?f=59&t=171752

I know that if you want nvidia to run it all your out of luck for now I think. maybe the nvidia chip just can't access the display directly on some laptops. just adjust the bumblebee conf with your nvidia drivers. I am still using the drivers that linux mint 17 suggested to me in the driver manager.

good luck :)
mlangston31

Re: Nvidia Prime Screen Tearing

Post by mlangston31 »

I actually followed that to install bumblebee haha. Thanks for that guide really helped me get it setup. It seems strange though that primusrun runs perfectly for some games like World of Warcraft, but for games like Civilization 5 I got bad fps unless I used optirun -b primus %command%. I guess I just have to test a bit and figure which command gives me the best performance on a per game basis. I will just plan to stick with bumblebee for awhile. Would there be any performance gain with upgrading to nvidia-340 via the xorg edgers ppa? Or just stick with 331 right now since its working.

Thanks everyone :)
Locked

Return to “Hardware Support”