Metamodes not being applied in-game on GTX550 Ti

Hello everyone,

My display’s native resolution is 1920x1080, and I’m trying to use metamodes to get games that use a lower resolution to display a centered and unscaled image (i.e. with black bars around it).

I’m using the nvidia-settings tool to set metamodes, with the ViewPortOut option set to the resolution of the game, they switch fine while I’m on the desktop, but once I go in-game they are ignored and the image goes back to fill the entire screen.

What’s weird about this is that sometimes it does work, and others the metamode I set is ignored, like I described. Also when this happens, when I play around with the in-game resolutions, some resolutions are stretched to fill the entire screen, while others are not.

Could anyone help me make sense of what’s going on?

My distro is Manjaro.

Thanks in advance.

You will also have to set the ViewPortIn to the resolution of the game, meaning lowering the desktop resolution. Otherwise, you’re just scaling down a 1920x1080 resolution and center that.
Might work:
nvidia-settings --assign CurrentMetaMode=“nvidia-autoselect +0+0 { ViewPortIn=1024x768+0+0, ViewPortOut=1024x768+448+156 }”

About the scaled resolutions: depends on monitor and game.
Edit: typo in command line

Thank you for the help, that works!

I’ve got a final question though: how can I configure the driver to always use that metamode for a certain resolution? Because right now I have to set it manually before starting the game and after closing the game I have to set the old metamode again.

It might work to put it in the screen section of your xorg.conf

Option "MetaModes" "DFP-0: nvidia-autoselect +0+0 { ViewPortIn=1024x768+0+0, ViewPortOut=1024x768+448+156 }"

Didn’t work…

I’ve been reading some of the documentation and other posts but I still don’t understand how metamodes can be automatically assigned for some resolutions… nvidia-autoselect, from what I read is just a kind of “alias” for your screens’ native resolution. So how is the metamode selected? Is it based on matching the ViewPort attributes with the program resolution?

If you find a way, tell me;)
The whole MetaModes stuff isn’t really well documented, you can only deduct from the rare examples that are given in the driver’s README. It just tells the application has to support the VidMode extension of the Xserver to select the metamode from the xorg.conf. Not helpful.
Just make some scripts containing the nvidia-settings command lines to set the correct mode and change the starter of the game to run e.g.
metamode-borders.sh && application && metamode-normal.sh
Stupid, but works.

Well, I’ve been looking at the documentation and threads on the subject for quite some time, so I guess it’s good to know it’s not just me and the documentation does suck xD

I don’t understand why nvidia won’t do anything about it though.