Lots of stuttering and frame delays on RTX 2060 (Mobile)

I have an MSI GE75 Raider 8SE laptop I bought the other day, I am using Manjaro on it. It has a 144hz screen.

I noticed that in some games I get stuttering so insane the games are rendered unplayable. After messing around I managed to find that it is related to VSync. (And sometimes disabling vsync in linux applications can be harder than it should be…)

A reliable way to reproduce the problem, with some performance statistics and everything is to run a video in mpv with these settings: mpv --video-sync=display-resample --hwdec=auto

To be thorough, in my case I’ve been using a 720p video encoded with HEVC/x265. In MPV press I for statistic information, with the video-sync option on, you will get the number of delayed frames listed as the video progresses. For me these quickly jump into the hundreds.

Since I have a 144hz screen, I tried setting it to 60hz to limit vsync to 60fps, sadly this did not solve the issue, only slightly reduce it.

I also have a desktop with a 980-Ti, I know the 2060 (even on laptop) is supposed to be roughly the same or better than a 980-Ti according to benchmarks. I have been using these settings (and then some) on that desktop with a 4k@60 display and zero issues on any videos. Considering 4k@60 is at least as difficult to render as 1080p@144hz; I’m certain the laptop shouldn’t be having any sort of issues with my config.

As for games, I’ve tried CS:GO as an example. The game runs great with Vsync off at 200+fps (often going to 250+) if I turn on Vsync (triple buffered, double buffered is even worse btw) however, it’ll average only 100fps, and it will be a stuttery and all around unplayable mess.

I also tried minecraft (yes, lol) with default settings, it was a stuttery and unplayable mess. I changed it from vsync to frame limited, and although I don’t know the fps numbers I’d get in the unmodded game with that steting, with a bunch of shaders (real performance hogs) I get somewhere between 100-130fps average. I also tried setting the framerate limit to 60 and it was fine, just as long as vsync was off.

In both games however there was quite a lot of ‘microstuttering’ with Vsync off. Not bad enough to have any significant impact on gameplay, but enough that you notice it.

The card behaves more or less the same on both bumblebee/primusrun and optimus-manager (works like Prime)

So, I’m not entirely sure what to make of this, is it a driver or hardware issue? I haven’t had the chance to test the system on windows yet, because I don’t own a copy atm.
nvidia-bug-report.log.gz (1.15 MB)

Please run nvidia-bug-report.sh as root and attach the resulting .gz file to your post. Hovering the mouse over an existing post of yours will reveal a paperclip icon.
[url]https://devtalk.nvidia.com/default/topic/1043347/announcements/attaching-files-to-forum-topics-posts/[/url]

Done.

There are some config files that don’t seem to interfere now but they may at some time, better remove them:
/etc/X11/xorg.conf.d/10-optimus-manager.conf
/etc/X11/xorg.conf.d/90-mhwd.conf
The important config is done in
/usr/share/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf
so if you want to add some options to the nvidia driver, better create an additional file in /etc/X11/xorg.conf.d with an “OutputClass” directive.

Regarding your issue, I could not find anything in the logs, maybe try disabling prime sync
xrandr --output eDP-1-1 --set “PRIME Synchronization” “0”
and check if all issues are gone. This of course has the same effect as disabling vsync.
Which DE are you running?

I am running XFCE;

It would probably be a bad idea to remove 90-mhwd.conf since it is provided by manjaro. Here is the full output of all the files.

$ cat /usr/share/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf

Section "OutputClass"
    Identifier "intel"
    MatchDriver "i915"
    Driver "modesetting"
EndSection

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "PrimaryGPU" "yes"
    Option "AllowEmptyInitialConfiguration"
    ModulePath "/usr/lib/nvidia/xorg"
    ModulePath "/usr/lib/xorg/modules"
EndSection

$ cat /etc/X11/xorg.conf.d/10-optimus-manager.conf

Section "Module"
	Load "modesetting"
EndSection

Section "Device"
	Identifier "nvidia"
	Driver "nvidia"
	BusID "01:00:0"
	Option "AllowEmptyInitialConfiguration"
	Option "Coolbits" "28"
	Option "DRI" "3"
EndSection

$ cat /etc/X11/xorg.conf.d/90-mhwd.conf

##
## Generated by mhwd - Manjaro Hardware Detection
##

Section "Device"
    Identifier  "Device0"
    Driver      "intel"
    Option      "AccelMethod" "sna"
	Option      "DRI"    "true"
EndSection

Section "DRI"
        Group  "video"
        Mode   0666
EndSection

Section "Extensions"
    Option "Composite" "Enable"
    Option "RENDER"    "Enable"
EndSection

Section "InputClass"
    Identifier          "Keyboard Defaults"
    MatchIsKeyboard        "yes"
    Option              "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

With PRIME Synchronization off MPV does not stutter anymore, but it also fails to do motion smoothing/interpolation properly, e.g. the video-sync=display-resample setting is not working properly. This is a less than desirable result, but mpv was playing the video at over 2000fps lol.

I tried some games where I failed to disable vsync before, and yes, this setting does solve the issue of not being able to disable vsync (just like minecraft and CS:GO though, there is still the issue of microstuttering prevalent in those games, in fact it feels even more prevalent than it did in CS:GO and Minecraft, but the games are playable now)

This command will surely save me a lot of grief, but it doesn’t really solve the problem completely. It is an ok workaround though.

Are you using the xfwm compositor? If so, please check if turning compositing off changes anything.
The first config file is necessary but the second and third are crap.

Holy shit, that solved everything, because of all the microstuttering my 144hz display felt like a 60hz one most of the time even when gaming at over 144fps, but after disabling the compositor and re-enabling prime synchronization, everything was perfect. Enabling VSync in-game also did not cause any problems whatsoever anymore. I’ll see about removing my extra configs.

The mystery has been solved, thanks a lot for your help :D