How can I get GPU scaling to work?

I’m trying to make GPU scaling work, so that all resolutions will be upscaled to 1920x1080. On Windows, I can simply click a checkbox for that. On Linux, there’s no such setting in nvidia-settings.

So I’ve read the documentation of the latest available driver:

Appendix B. X Config Options

There, it mentions:

Option “FlatPanelProperties” “Scaling = Centered”

So I’ve put that in the “Device” section. But it doesn’t do anything.

Can anybody help with this? Where am I supposed to write this setting? I’m using 313.09 on Gentoo Linux x86-64.

It seems that flat panel scaling using such config option no longer supported in new driver versions. See “ViewPortIn” and “ViewPortOut” attributes. But I think it was BIG MISTAKE to remove generic config option. I know that ViewPort configuration is more flexible but most of users don’t need fine grained control, they just want to set save proportions or scale to panel dimensions.

Newer drivers have an IncludeImplicitMetaModes option that provides this functionality. It generates MetaModes for a bunch of “common” resolutions, and you can specify more with the ExtraResolutions attribute. You can get a list of these metamodes by running “xrandr --q1” and switch between them with the "xrandr -s " option.

You can also achieve a similar effect using RandR 1.2 requests by using the --scale option (or once xrandr 1.3.6 is release, the --scale-from option) or by doing like Vandalf said and using the ViewPortIn / ViewPortOut metamode attributes.

Edit: the forum software is losing the end of my URL link, so here’s the complete thing:
[url]Appendix B. X Config Options

OK, my xorg.conf now looks like this:

Section "Device"
    Identifier "NVidia GeForce GTX 560 Ti"
    Driver  "nvidia"
    Option  "TripleBuffer"     "True"
    Option  "NoLogo"           "True"
    Option  "UseEdidDpi"       "False"
    Option  "DPI"              "96 x 96"
    Option  "ModeValidation"   "AllowNon60HzDFPModes"
    Option  "Coolbits"         "4"
    Option  "RegistryDwords"   "PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerDefault=0x2; PowerMizerDefaultAC=0x2"
    Option "IncludeImplicitMetaModes" "DisplayDevice = DFP-0, ExtraResolutions = ( 1280x800, 640x400, 320x200 ), Scaling=Centered"
EndSection

But it doesn’t work :-/ No scaling is done when I switch resolution. xrandr says:

$ xrandr --q1
 SZ:    Pixels          Physical       Refresh                                                                                                                       
*0   1920 x 1080   ( 508mm x 285mm )  *50                                                                                                                            
 1   1680 x 1050   ( 444mm x 277mm )   51                                                                                                                            
 2   1600 x 1200   ( 423mm x 317mm )   52                                                                                                                            
 3   1440 x 900    ( 381mm x 238mm )   53                                                                                                                            
 4   1280 x 1024   ( 338mm x 270mm )   54                                                                                                                            
 5   1280 x 960    ( 338mm x 254mm )   55                                                                                                                            
 6   1280 x 800    ( 338mm x 211mm )   56                                                                                                                            
 7   1024 x 768    ( 270mm x 203mm )   57                                                                                                                            
 8    800 x 600    ( 211mm x 158mm )   58   59                                                                                                                       
 9    640 x 480    ( 169mm x 127mm )   60                                                                                                                            
 10  1280 x 720    ( 338mm x 190mm )   61                                                                                                                            
 11   640 x 400    ( 169mm x 105mm )   62                                                                                                                            
 12   320 x 200    (  84mm x  52mm )   63

(It also reports the refresh rate wrong. It says 50, but actually the monitor is running at 60Hz.)

How exactly did you switch between them?

The “refresh rate” of 50, 51, etc. is there to make the metamodes unique when reported via RandR 1.0, which only had width, height, and refresh rate fields for its “modes”. There’s a FAQ entry about that:
http://http.download.nvidia.com/XFree86/Linux-x86/313.09/README/faq.html#WhyIsTheRefreshdcf0a

I start a game in Crossover and it switches the resolution on its own.

Okay. What do you mean by “no scaling is done”? You requested Scaling=Centered, so you should be getting an unscaled image with a black border.

I don’t get a black border. What happens instead is that the monitor switches to the resolution requested by the game (I can tell by its OSD). On Windows, if I have the GPU scaling checkbox active, the monitor never switches resolution. It always stays at 1920x1080.

1 Like

I still don’t know whether this is supposed to work exactly how I’m doing it, or whether the configuration syntax I use is wrong. Or if this should be considered a bug.

It’s possible that the Crossover’s version of Wine is using RandR 1.2 to override your metamodes. Can you please provide the output of “nvidia-settings -q CurrentMetaMode” in the bad case?

Wine recently added code to use RandR 1.2 when it’s available, and that code is very simplistic and doesn’t provide any options to configure scaling. Even more recently, a commit was added to make it use RandR 1.1 when it detects the NVIDIA driver, which should make your implicit metamodes take effect. You could try using a very recent build of Wine that contains that change.

OK, I’m not going to bother with this. If there isn’t a setting that tells the driver to always use GPU scaling, regardless of RandR and whatnot, then it’s too cumbersome for me.

I’ll stick with playing the games under Windows for now. I hope that nvidia-settings will introduce a global setting for this, just like in Windows.

Hi,

Replying to old thread since Google brought me here while looking for a way to scale resolutions with the GPU, and also because I noticed it was not solved for OP - and there’s a slim case my post will.

However, I got it working with:

Option "IncludeImplicitMetaModes" "DisplayDevice = HDMI-0, Scaling=Aspect-Scaled, UseModePool = false"

I’m not sure this will help the OP; I’d guess it is either a wrong displaydevice (in my case “DisplayDevice = HDMI-0”), OR (just guessing) UseModePool does not do what it says in the documentation? I thought (without reading the documentation) that in case it is set to true, modes that the display is reporting will be set in HW instead of being scaled. But according to documentation this is not the case. However, by default (or with just Option “IncludeImplicitMetaModes” “True”), all modes were set in HW instead of being scaled by GPU. I haven’t tested which option makes it work in my case, but if I have the time, I will test it later on.

IMO this should be easier. According to Google, the most common use case is when attatching a laptop to a projector and wanting to use a clone mode. There are still a lot of 4:3 projectors out there and this should really be easier; I don’t usually use clone mode, but if I want to / someone borrows my laptop who wants to, this will come in handy, as most laptops don’t have any options in the display device itself.

In any case, I (also) needed this for retro gaming since my TV (which I use ATM) has poor control over 4:3 resolutions, and hence they need to be scaled to the native resolution of the TV one way or the other.

HTH,

Cheers!

Hi,

FWIW setting UseModePool = true kind of breaks it for me. Most resolutions will be scaled to 16:9 (which is not what I want) and some even have some kind of overscan, although my TV still reports 1080p!

However, I also noticed that wine (1.7.21) uses a different method of changing the resolution (I don’t have too many games that don’t support 1920x1080 which is my native). But this does work for DosBOX games, although dosbox offers its own scaling. Still worth a shot, though.

Cheers!