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.