Ill get right to the point: I have a laptop (Aspire 5750G) that I run dual screen on (the built in display and a Samsung SyncMaster 2043BW). Im running ubuntu 14.04 (installed yesterday) on a nvidia GT 540M with the nvidia-331 driver with nvidia-prime installed. I have also tried other proprietary nvidia drivers from the repository with same results.

I've been busting my head in the CCSM and nvidia-settings trying to solve a dubious tearing issue:

If I have the nvidia driver disabled everything works smoothly, however when I activate it I notice tearing happening at the edges of windows as I drag them around, and also lag. I keep thinking it`s a Vertical Sync issue and I broke X over 30 times trying to fix it, so I decided to finally ask for help.

What is to be noted is that I also had the unknown display issue (mentioned here), and that my nvidia-settings GUI does not detect any displays.

I have Sync to VBlanc active in both CCSM and nvidia-settings, but disabling it has no impact. I have Detect Refresh Rate set in CCSM and it`s now at 50, but it doesn't make any difference if I set it manually, and I can't seem to find a place to set this in the nvidia-settings.

Let's give you some data to work with:

xrandr

Screen 0: minimum 8 x 8, current 3046 x 1050, maximum 16384 x 16384
LVDS-0 disconnected primary (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
LVDS1 connected 1366x768+1680+218 344mm x 194mm
   1366x768       60.0*+
   1360x768       59.8     60.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 connected 1680x1050+0+0 459mm x 296mm
   1680x1050      59.9*+
   1280x1024      75.0     60.0  
   1280x960       60.0  
   1152x864       75.0  
   1024x768       75.1     70.1     60.0  
   832x624        74.6  
   800x600        72.2     75.0     60.3     56.2  
   640x480        75.0     72.8     66.7     60.0  
   720x400        70.1  
HDMI1 disconnected
DP1 disconnected
VIRTUAL1 disconnected

xorg.conf

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"
EndSection

Section "Device"
    Identifier "intel"
    Driver "intel"
    BusID "PCI:0@0:2:0"
    Option "AccelMethod" "SNA"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1@0:0:0"
    Option "ConstrainCursor" "off"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration" "on"
    Option "IgnoreDisplayDevices" "CRT"
EndSection

gpu-manager.conf - I have disabled it because it kept overwriting xorg.conf

#start on (starting lightdm
#          or starting kdm
#          or starting xdm
#          or starting lxdm)
task
exec gpu-manager --log /var/log/gpu-manager.log

List of things I would like to achieve:

  1. set monitors so that nvidia-settings detects them (in the hope that it would then give me more options to fiddle with)

  2. set vsync using the nvidia driver to see if that eliminates the tearing

  3. if none of the above work: figure out what exactly is causing the tearing

Kind regards,

Alex.

share|improve this question
    
Sorry for reviving old thread, I've heard that there are experimental NVIDIA patches that bring synchronization to optimus graphics (new nvidia driver + patched Xorg, new libdrm). No longer have optimus laptop to test it on, but I guess there might finally be official "support" for this. – AoeAoe Apr 4 '16 at 18:44

Try the nvidia binary package. The easiest way is to open driver manager select your version hit appy. You may have success like myself using xorg-edgers ppa. Hope this helps. I have a Asus 560gtx and it works well with nvidia control panel. You may have to fidget with nv settings. I have 2 tvs a 32" lg and my main is a Vizio razor led. Running Linux Mint 17 (Ubuntu 14) Good luck

share|improve this answer

According to https://devtalk.nvidia.com/default/topic/957814/linux/prime-and-prime-synchronization/, the NVIDIA 370.23 beta driver release supports "PRIME Synchronization", which should resolve the tearing.

From the article, first, some background:

PRIME is a collection of features in the Linux kernel, X server, and various drivers to enable GPU offloading with multi-GPU configurations under Linux. It was initially conceived to allow one GPU to display output rendered by another GPU, such as in laptops with both a discrete GPU and an integrated GPU (e.g., NVIDIA Optimus-enabled laptops).

Next, the root of the tearing problem:

Up until recently, the Linux kernel and X server lacked the required functionality to allow the dGPU and iGPU drivers to communicate and synchronize the copy with the scanout. Because of this limitation, there was virtually nothing any one driver could do to provide the necessary synchronization; it required improvements to the greater ecosystem.

Finally, recent developments and caveats:

Over the past many months, I've been working to implement and upstream the necessary improvements to the X server and iGPU kernel and userspace drivers so that we could leverage them from within our driver. Finally, they have landed (http://www.phoronix.com/scan.php?page=news_item&px=Xorg-PRIME-Sync-Double-Buffer). Unfortunately, the changes required breaking the binary interface (ABI) between the X server and its drivers, so it may be a while before it propagates to mainstream distros.

The article also lists the requirements for PRIME Synchronization, which are:

  • Linux kernel 4.5 or higher
  • An X server with ABI 23 or higher (as yet officially unreleased)
  • Compatible drivers

and several configuration steps to enable PRIME Synchronization.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.