Stuttering on Linux Mint, at the end of my wits

Had all sorts of trouble with Mint and switched to MX Linux, most problems solved.

2 Likes

First of all, did you try the appimage or flatpak versions I suggested on another thread? See if they are better for you.

Second, I highly suspect your issue is related to Nvidia drivers, for your hardware is powerful and I’ve never had any issues with powerful-enough hardware on Intel and AMD (tested on Mint, Ubuntu and Pop OS). Try a different version of the driver, newer or older, to see if it helps. But only after following the first advice.

2 Likes

Oh, I forgot you’re using a laptop. You could also try as a first step to make sure RetroArch is being launched with the discrete GPU, not the integrated one. I think Mint has that option if you right-click the app’s icon before loading it.

2 Likes

make sure you are using Cinnamon. It was the only one that supported smooth playback on Switchres. MATE and lxqt, though lighter in resources, were choppy

2 Likes

Thanks guys! Some great thoughts here. I’ve always been making 100% sure everything on my gaming laptops (this and its predecessor ;-)) runs on the dedicated Nvidia GPU, not the internal one. So that’s not the issue.

But @md2mcb, you’re making a really good point about the Flatpak or AppImage, I have to say I haven’t tried them yet. I remember a few years ago I tried the Flatpak and it was running fine, so I’m definitely gonna give that a go.

And yup, I’m on Cinnamon. Love that DE, it’s one of the main reasons I switched from Ubuntu to Mint in 2017 :slight_smile:

2 Likes

from you laptop specs here:

Refresh Rate: 240Hz, Adaptive-Sync,MUX Switch + Optimus

It could be an issue with the monitor. Does Gsync option appear in Nvidia settings? Also check this:

https://wiki.archlinux.org/title/Variable_refresh_rate

If you want to use G-SYNC and possibly Freesync on X11, only the G-SYNC/Freesync monitor must be connected.

On X11, multiple monitors in a single X display will break G-SYNC/Freesync, however, this problem does not exist on Wayland.
A secondary monitor set as copy/duplicate of the primary monitor does not break G-SYNC/Freesync on the primary monitor.
If on X11, if you want to use multiple monitors and still use G-SYNC/Freesync, you can create a new X display which only covers the G-SYNC/Freesync monitor and run games there.
1 Like

Okay, so I tried the Flatpak variant. 100% same behaviour.

Re. the monitor, there’s no information anywhere in nvidia-settings about GSYNC or any such feature. None of my external screens, whether in my living room or in my office, nor my wife’s old TV which I sometimes have connected, support any such features. So I always keep that feature disabled in RetroArch. I only enabled it once real quick for testing some time during the past days.

I think some time in September, I’ll get around to completely formatting my PC and installing the new Linux Mint 22, after which I’ll test this again. Also, I’ll see if I get around to setting up my RA install on my Win 11 partition again. Been a while since I’ve retro-gamed at all, so I’m currently doing this whole overhaul of my RA installs on both my partitions (Linux and Windows), during the course of which I discovered this stuttering problem in the first place.

Curious indeed, all this.

then it must be only adaptive sync compatible. It would also help if you tested a Wayland distribution to see if it is really a monitor issue. I tested Adventure Island 2 as well on Mint on a VGA monitor. With Switchres it has smooth motion. Without it there is some choppiness but not on the scale of the YT video. Notice also that the framerate of that game goes above 60 hz, fluctuating between 60 to 60.4. However on Windows 10 on a chipset Gsync monitor, framerate states stable at 60.12 and motion is as smooth as in Switchres. so perhaps it is game related and only solved via Switchres or VRR

Hmm, still thinking how to help you. From the likes of it, you’re using Mint 21.3. The default kernel is 5.15, whereas your RTX 3080 is a bit recent for it. Did you try updating your kernel through Mint’s update manager? IIRC, the newest there was 6.5. You could try it, and it’s easy to go back to the previous kernel if something goes wrong. Just make sure to do it through the update manager, as its designed to minimize failure.

Thanks, I really appreciate it. I’m on kernel 6.8.0-40-generic though.

I’ve taken a look into Switchres, so that’s a feature specifically designed to help RetroArch run with genuine CRT screens, right? I tried enabling it and it immediately turned off the screen that RA was on and crashed the PC, the OS froze and I could only still move the mouse. I needed to hard-reset the PC. So not touching that again…

it is only works for crt vga monitors as it reduces the resolution to 240p/120hz.

That’s how I understood it as well. Thanks for confirming!

Dang, I can only suggest you to make a live USB from another distro and make a quick, non-permanent, test. You could try Pop OS 22.04 (Nvidia version) or Ubuntu 24.04, test the appimage/flatpak/snap version and see how those distros handle your problem.

try running the Mesen Linux version and see if there is any difference with enabling and disabling integer fps mode in video options

https://www.mesen.ca/docs/configuration/video.html

Enable integer FPS mode : Under normal conditions, the NTSC NES runs at 60.1 fps. When playing a 60hz LCD, this causes a lot of dropped frames. This option slows down the emulation by a tiny amount to produce 60 frames per second instead, which reduces the number of dropped frames.

Thanks for the further suggestions! In Mesen standalone, I get the same kind of stuttering whether I have integer FPS mode enabled or not.

So I updated to Nvidia driver 555.58.02 and then experimented more with an external screen connected and not connected. It turns out that when I have no external screen connected, I get pretty smooth scrolling on the internal 240 Hz screen. There’s still a bunch of stuttering here and there, but it’s much better than with an external screen connected.

My external screen (well the one I’m trying with atm) is a 60Hz 1920x1080 screen and once it’s connected, scrolling gets choppy on both screens. Even if I turn the internal screen off through Mint’s display settings, it’s still choppy.

So it looks like this is really not a RetroArch issue, but Mint (or the Linux Nvidia drivers) crap the bed once an external screen is connected. I’m wondering if perhaps it has to do with the screens having different refresh rates.

I’ve noticed that even on Windows 10 in the past with multiple laptops. One had an Intel IGP (Core-i5 5200U), the other had an AMD GPU (Radeon 6750/6770M) and an Intel CPU (Core-i5 2500M) with Hybrid graphics.

Things only worked full speed when I used single display mode in either case.

I had to set whichever display I wanted to use to be the primary display in Windows and either shut down and restart or reboot for RetroArch to run full speed on whichever one I chose.

1 Like

On Mint I always disable the laptop screen in order to play on VGA monitor. I do not have issue with dropped frames even on Switchres with 2 monitors, but it really messes the desktop every time I exit Retroarch. I am using Nvidia 550 drivers. Tried updating to 555 but whenever I used suspend mode and tried to resume, the whole system would freeze and I had to restart.

1 Like

That’s what confuses the hell out of me. If I disable the internal screen, I’d expect the sync issues to go away - I mean, the internal screen is simply off. Still, choppy performance on the external screen.

How do you disable it? My internal screen is a PRIME display, so nvidia-settings tells me it can’t control it. I need to set up the screen using Mint’s Display settings, which is where I turn it off.

use lxrandr. It makes the switch process much easier. I notice that Retroarch with Switchres will often default back to two screens even when I disable it…

https://community.linuxmint.com/software/view/lxrandr

So I finally found a solution (well, it’s not perfect but I’m happy with it):

It turns out that if I enable the internal screen (it’s a PRIME screen and it never has any screen tearing anyway) and set it to 60 Hz (not the default 240), then enable Composition Pipeline on the external one, I get smooth video - since that way, both screens operate at the exact same frequency.

If I turn the internal screen off, the system defaults it back to 240 Hz, which then causes stuttering on the external screen even though the internal one is off. ChatGPT suggested I chain two xrandr commands, the first setting the internal screen to 60 Hz and the second one turning it off, but that’s not working. It always gets reverted to 240. It’s bonkers because it’s off anyway, but that’s the way it is.

So I made myself this script:

#!/bin/bash

# Configure the displays using xrandr
xrandr --output eDP-1-1 --mode 2560x1440 --rate 60 --scale 1.5x1.5
xrandr --output HDMI-0 --mode 3840x2160 --rate 60 --scale 1.75x1.75 --right-of eDP-1-1 --primary

# Enable Nvidia's composition pipeline on HDMI-0
nvidia-settings --assign "CurrentMetaMode=HDMI-0: nvidia-auto-select +3424+0 

In fact, it turns out if I just configure the screens the way I want them through Mint’s Display settings, the config sticks beautifully across reboots and all I need to do is run the nvidia-settings command after login for the composition pipeline.

I’ve been using this solution for many years now anyway, with different scripts for the different setups I have in different rooms. So, as a workaround, I’m fine with having the internal screen on and plucking the occasional stray window off it. So be it.

3 Likes