Video Tearing with GeForce GT630M

Hello,
I’ve recently installed Linux Mint 19 Tara 64-bit, MATE 1.20.1.
I have the recommended Nvidia drivers 390.48-0ubuntu3.
While playing a video or scrolling down in Firefox, I see a tearing artifact in the upper half of the monitor. It really look like vsync is not active or maybe not fully active.

I tried to fix this issue, using the recommendations I’ve found on this website under this links:
[url]https://devtalk.nvidia.com/default/topic/1033104/linux/no-vsync-on-linux/[/url]
[url]https://devtalk.nvidia.com/default/topic/1029916/linux/video-tearing-with-geforce-gtx-1050/[/url]

I do have created a file in /etc/modprobe.d/ with the name 99-prime-sync.conf containing
“options nvidia_390_drm modeset=1”

but the screen tearing is still present, and I’m unable to run the command:
options nvidia_390_drm modeset=1
because of “options: command not found”

Please here a link with the log file.
[url]nvidia-bug-report.log.gz - Google Drive

Thank you very much.

In the logs you provided, the nvidia gpu was off. Please switch to Prime first
sudo prime-select nvidia

Tried to switch, but I get an answer:
Info: the NVIDIA profile is already set.

The screen tearing is still present, but it seems like the amount of the tearing was reduced, but it is still very visible in moving horizontally in scenes. I guess the changes I made following the threads from the links above helped with that.
I’ve also started a game to check which video adapter it is using, and it says OpenGL on Gt630M.

Please refer: Chapter 33. Direct Rendering Manager Kernel Modesetting (DRM KMS)

Please make sure that you’re switched to nvidia:
glxinfo | grep vendor
should return

server glx vendor string: NVIDIA Corporation
client glx vendor string: NVIDIA Corporation
OpenGL vendor string: NVIDIA Corporation

Then create a new nvidia-bug-report.log and attach that.

PS after changing modprobe.d settings, don’t forget to

sudo update-initramfs -u

and also try Chrome or Chromium, I get tearing in Firefox when I don’t in Chrome.

I have checked if I’m really using NVIDIA with glxinfo | grep vendor:
the result was:
jeanix@Jean-Lenovo-G580:~$ glxinfo | grep vendor
server glx vendor string: NVIDIA Corporation
client glx vendor string: NVIDIA Corporation
OpenGL vendor string: NVIDIA Corporation

In the directory /etc/modprobe.d/ I’ve created a file 99-prime-sync.conf containing
“options nvidia_390_drm modeset=1”

but I’m unable to run the command:
options nvidia_390_drm modeset=1
because of:
jeanix@Jean-Lenovo-G580:~$ nvidia-drm.modeset=1
nvidia-drm.modeset=1: command not found
and I guess that’s the reason why the command sudo update-initramfs -u don’t work.

I have also tried Chrome and the diagonal line while scrolling is also present. I wasn’t able to catch it with “PrintScreen”, but while fast scrolling, it seems that the line appear every time on the same place.

I have also updated the .log file.
[url]nvidia-bug-report.log.gz - Google Drive
I’m testing if the tearing is present using this video (present in firefox and in chrome):
[url]tearing test @29.97 fps (1080p) - YouTube
and also downloaded .mkv videos.

Ok, the logs were right this time.
On your system, you’ll either have to create the file
/etc/modprobe.d/99-prime-sync.conf containing

options nvidia-drm modeset=1

and run

sudo update-initramfs -u

afterwards and reboot.
Alternatively, insert a kernel parameter

nvidia-drm.modeset=1

https://askubuntu.com/questions/19486/how-do-i-add-a-kernel-boot-parameter

to test whether the module option is active, running

sudo cat /sys/module/nvidia_drm/parameters/modeset

should return ‘Y’

That fixed it, thanks a lot.
The problem was, I created a file in /etc/modprobe.d/99-prime-sync.conf containing

options nvidia_390_drm modeset=1

But than I changed the command to:

options nvidia-drm modeset=1

like listed in the message above an did the reboot. Now the screen tearing is fully gone.

sudo cat /sys/module/nvidia_drm/parameters/modeset

is indeed returning Y.

But the screen resolution went all down from 1366x768 to 1024x768.
Also, in the control panel as in the X Server Display Configuration are only 1360x768 and 1368x768 listed.
Starting any video or switching the browser to full-screen mode opens it only for the resolution 1024x768.

Is the any way to recover the native 1366x768 resolution?

nvidia-bug-report.log.gz (83 KB)

That’s really odd. Please create a new nvidia-bug-report.log and attach that to your post. Hovering the mouse over an existing post will reveal a paperclip icon.

Nvidia-bug-report.log added in the message above.

Please add the line

Option "IgnoreDisplayDevices" "CRT"

to the file
/usr/share/X11/xorg.conf.d/10-nvidia.conf, so it looks like this:

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    Option "IgnoreDisplayDevices" "CRT"
    ModulePath "/usr/lib/x86_64-linux-gnu/nvidia/xorg"
EndSection

If it doesn’t resolve the issue, please create a new nvidia-bug-report.log with that option active.

Added the line to /usr/share/X11/xorg.conf.d/10-nvidia.conf, saved and did a reboot.
The resolution hasn’t changed nor the 1366x768 resolution is present.

Please here the bug report.
nvidia-bug-report.log.gz (80.8 KB)

Odd. The problem is that the nvidia gpu detects a phantom vga monitor, happens sometimes, but the workaround of setting the option to ignore the crt doesn’t work. Might be a driver bug.
For another workaround, try running

xrandr --auto && xrandr --output VGA-0 --off

I guess that command fixed it.
Now in the Monitor Preferences panel I have a Laptop LVDS-1-1 monitor and right next to it Unknown VGA-0 monitor.
The resolution is 1366x768, 60Hz.
And in the X-Server-Display Configuration is the resolution set to Auto, CRT-0 OFF.

I have also booted Kodi media center from the Linux login screen, not Mate. The resolution there was also broken and was 1024x768. I have changed in the preferences the monitor to LVDS-1-1 and the resolution fixed itself, but the screen went all white and impossible to work with, a reboot fixed that.

Now is everithing allright.
The screen tearing is now fully gone.
Thanks a lot for the help. ^_^