340.96 GPU aspect-ratio scaling problem

Hello! I need help with drivers v340.96
I have 1920x1200 monitor.
I need to run few programs in this resolutions: 1600x1200, 1280x1024, 1024x768, 800x600, 640x480
I need to set GPU scaling in full aspect ratio (correct 4x3 an 5x4 scaling with black borders on left an right).

At first, i tried to find a solution here:
Chapter 12. Configuring Multiple Display Devices on One X Screen #metamodes
Appendix B. X Config Options #IncludeImplicitMetaModes
[WORKAROUND]nvidia 331.20 driver, xrandr 1.4.1, wine, stretch 2D games / Newbie Corner / Arch Linux Forums
[SOLVED] NVidia GPU scaling / Multimedia and Games / Arch Linux Forums
Performance tip for vsync on proprietary nvidia drivers · Issue #227 · chjj/compton · GitHub
How can I get GPU scaling to work? - Linux - NVIDIA Developer Forums
How can I get GPU scaling to work? - Phoronix Forums
https://www.codeweavers.com/support/wiki/linux/faq/43_game_stretch
None of this really helping.

I don’t know, who pulled those “IncludeImplicitMetaModes” from the depths of hell, but i want to punch him really hard in the middle of his face.
Those settings is so incomprehensible and non-intuitive, that they force me to think: maybe, i should buy a AMD card instead.

I need steady setting that actually work automatically for all 5x4 and 4x3 display resolutions.

Questions:

  1. Can this GPU “aspect” scaling be done?
  2. Can you print a correct lines for xorg.conf?
  3. Where is full instruction on nVidia.com?

Thanks.

Is this forum completely abandoned, or what?

OK, don’t be angry about “punching in the face” stuff. Trying to set this “metamodes” is extremely frustrating experience. This “viewportin and out” is quite handy, if you need to plug an ancient projection TV to your PC, but for other 7 billion people they are useless.

Does this work?
Option “IncludeImplicitMetaModes” “DisplayDevice = DVI-I-2, Scaling=Aspect-Scaled, UseModePool = false”
NO.

Maybe, this?
“DFP-2: 1920x1200 { ViewPortIn=800x600, ViewPortOut=1600x1200+160+0 }”
Again, no.

What about this?
Option “FlatPanelProperties” “Scaling = aspect-scaled”
Nope. This easy settings are gone.

Did you somebody answered to this chap?

No, and as a result he using AMD card for two years.

AMD drivers has this settings, Intel has them too. nVidia has them on Windows and they work exactly as they should.
But not in linux.

Now, come on!

Hi m-linux,

Can you please run nvidia-bug-report.sh and attach the resulting log file, after starting X with the configuration that you expected to work? Also, can you please elaborate on exactly how it’s not working? I.e., what behavior are you seeing that you didn’t expect?

Hi, Aaron! Happy new year, by the way!

Send nvidia-bug-report.log Desktop runs at “1024x768”
[url]nvidia-bug-report.log — Yandex.Disk (press grey button on the right: Скачать)

How it’s not working? 4x3 resolutions stretches to the whole monitor, which have 16x10 proportions.
If i try to change resolution of desktop or run old apps in “Wine” - doesn’t matter, everything looks distorted.

This is what i see:
[url]stretched-1024.png — Yandex.Disk

I expected to have some settings to change that behavior. Preferrably through GUI.
Basically, what i need is this:
[url]aspect-scaling.png — Yandex.Disk

But if this setting doesn’t exist now, i will be happy to set this “Aspect-ratio Scaling” through some .conf file.

It looks like you have a GeForce GTX 460, which is supported by the latest drivers. Is there any particular reason that you’re using the 340.96 legacy driver? Please give 358.16 a try to see if the behavior is different there.

It appears that your current mode is using the monitor’s native 1024x768 mode, but it sounds like what you want is to scale 1024x768 to the monitor’s native 1920x1200 mode, correct? The implicit metamodes generated by the IncludeImplicitMetaModes functionality should do that. From your log, it looks like something is changing the mode from 1920x1200 to one that’s explicitly using 1024x768:

I think metamode you want here is “DVI-I-3: nvidia-auto-select { ViewPortIn=1024x768, ViewPortOut=1600x1200+160+0 }”. This looks a lot like the 800x600 one about which you said, “Again, no.” Can you elaborate more on how that particular metamode failed?

Note that the implicit metamodes show up via RandR 1.1, but RandR 1.2 bypasses all of that and lets applications modify the display configuration (including scaling) directly. So if you’re using an application that uses RandR 1.2 to configure the display, then it needs to know how to do the aspect scaling you’re looking for.

List of Release highlights at http://www.nvidia.com/Download/driverResults.aspx/95921/en-us show nothing interesting for me.
Nothing about adding GUI GPU scaling. But i surely will download and install NVIDIA-Linux-x86_64-358.16.run tomorrow.

I deliberately switch to 1024x768 just to show you, that scaling doesn’t work nor in desktop nor in games.

Not quite. I want ALL 4x3 and 5x4 and 16x9 resolutions scaling Automatically.

They certainly don’t do anything. That’s why i go to nVidia forum. I tested it on two machines. One with Debian Stretch and GTX460, other - with Arch Linux and 9800GT.

Yep. That “something” was me.

Sure, i can. Metamode “DVI-I-3: nvidia-auto-select { ViewPortIn=1024x768, ViewPortOut=1600x1200+160+0 }” is useless in games.
If i try something similar:
nvidia-settings --assign CurrentMetaMode=“DFP-2: 1920x1200 { ViewPortIn=640x480, ViewPortOut=1600x1200+160+0 }”
Yes, after that i have desktop with correct 4x3 proportions and black borders on the left and right. Monitor reports that resolution still is 1920x1200, image clearly shows 640x480. OK, now running 2D game through “Wine”. Let it be “NOX”. Monitor show this distorted half-NOX with black sides:
https://yadi.sk/i/Tje4aASemiCrj

Take screenshot of this misery. Received this:
https://yadi.sk/i/mQn2vWXxmiCpp

On 16x10 monitor with “GPU aspect-ratio scaling” enabled, game should look like this:
https://yadi.sk/i/CmEjk2kvmiCoX

Exit game. Going back to 1920x1200 with good command:
nvidia-settings --assign CurrentMetaMode=“nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }”

What do you mean? Currently i have “RandR version 1.4”, xrandr --prop shows that DVI-I-3 connected. All resolution i need - available. All them stretched to the sides.

And “xrandr --output DVI-I-3 --set “scaling mode” full_aspect” don’t do anything.
It shows: “X Error of failed request: BadName (named color or font does not exist)”

How i can tell xrandr, that i want GPU aspect-ratio scaling set by default, system wide?
And i will try 358.16 drivers. I will write to you a little later.

I am sorry, Aaron. That will be long boring reading.
When i go to “X Server Display configuration”, and trying to change resolution, i see this list:
Auto

Native resolution looks excellent everywhere, available everywhere.
Resolutions marked (scaled) not available in any games i tried, but available to desktop and look just as they should.
All others look distorted everywhere.

Xrandr says that only these resolutions available:

It seems, that all (scaled) resolutions are not present in the xrandr list. And all these 4x3 and 5x4 resolution don’t scaled properly.

OK. I removed all 340.96 and installed 358.16 drivers.

I got this: Xrandr still doesn’t know about 16x10 and 16x9 resolutions. All absent resolutions became available in games. Resolutions marked (scaled) available to desktop, looks just as they should, but in games i get this: 1280x800.png — Yandex Disk
Looks like it render this game in 1920x1200, and make "crop " in upper left corner. And all others 4x3 and 5x4 still looks distorted everywhere.

Add my old lines in xorg.conf:
Option “Metamodes” “DFP-2: nvidia-auto-select; nvidia-auto-select {ViewPortIn=1600x1200, ViewPortOut=1600x1200+160+0}; nvidia-auto-select {ViewPortIn=1280x1024, ViewPortOut=1500x1200+210+0}; nvidia-auto-select {ViewPortIn=1360x768, ViewPortOut=1920x1080+0+58}; nvidia-auto-select {ViewPortIn=1280x960, ViewPortOut=1600x1200+160+0}; nvidia-auto-select {ViewPortIn=1152x864, ViewPortOut=1600x1200+160+0}; nvidia-auto-select {ViewPortIn=1024x768, ViewPortOut=1600x1200+160+0}; nvidia-auto-select {ViewPortIn=800x600, ViewPortOut=1600x1200+160+0}; nvidia-auto-select {ViewPortIn=640x480, ViewPortOut=1600x1200+160+0}”

With 358.16 drivers some changes. Got this: native, all 4x3 and 5x4 looks just right on desktop and 2D/3D games both. 1366x768, 1360x768 also scaled properly. 1920x1080, 1680x1050, 1440x900, 1280x800, 1280x720 looks just right in desktop, but still looks “cropped” in all 3D games and stretched vertically in all old 2D games.
More to that, now i have this interesting effect: too-many-resolutions.png — Yandex Disk

Phew!

I understand, that all my questions may sound like “How to wear socks?”. But i really don’t understand, why in the name of all that holy nVidia make this simple Scaling settings so freakishly complicated?

I need solution. Not just to myself, but to other people as well. Many of them have nVidia cards, using Linux distributions and experience more or less the same problems.

Aaron, can you tell me please, what i should type in xorg.conf to solve this once and for all?

OK, i guess i forgot for a moment, that this is Developers forum, not customers help. But my questions mostly about few settings in xorg config file. I just cannot imagine, why nVidia Linux Team removed proper scaling settings and when they planning to bring them back back?
I mean, like this: aspect-scaling.png — Yandex.Disk

  1. Why scaling don’t work on 340.96 drivers, and work on 358.16?
  2. How i can set proper scaling for all resolutions?

I still need an answers. Or at least, pointing in the right direction. Aaron?

When I said RandR 1.2, I really meant, “RandR 1.2 or higher.” RandR 1.2 added a bunch of new functionality to the API that gives explicit control over the display configuration to applications. That wasn’t really compatible with how the old aspect scaling option worked, so it was removed in favor of the current, more flexible approach. The implicit metamodes thing replicates the old behavior for applications using the RandR 1.1 interface, but applications that use RandR 1.2 bypass all of that and program the display directly.

When RandR 1.2 says that it’s using 1024x768, that means that it’s literally sending 1024x768 timings to your monitor. No scaling is happening in the GPU in that case, so any scaling that’s happening is happening inside your display.

Since Wine uses RandR 1.2 to program the display configuration directly bypassing the driver’s implicit scaling stuff, then you either need to get it to stop messing with the display at all, or to program the proper aspect-scaled configuration itself.

Actually, i don’t care much about Wine games. I just tested them to make sure that everything works properly with nVidia drivers.

For example, i want to change desktop resolution from 1920x1200 to 1600x1200.
I don’t added 1600x1200 resolution to XRandR, beacause it is already present.
I added in xorg.conf this line:
Option “Metamodes” “DFP-2: nvidia-auto-select; nvidia-auto-select {ViewPortIn=1600x1200, ViewPortOut=1600x1200+160+0}”
With 340.96 desktop does full aspect-scaling. Games - does not.
With 358.16 - other way around. Desktop distorted, all games - perfect.

I just try to get to the root of this problem. Is it nVidia drivers or XRanR?
If it is XRandr, could you tell me, what command should i use to set it to “Full-aspect” scaling?

I have similar problem though my needs are somewhat simpler. I have ultrawide 3440x1440 monitor that doesn’t advertise 2560x1440 resolution in EDID (I need it for some older yet XRandr-1.2+ compatible games that do not support borderless window mode, and could otherwise just use desktop display mode).
It seems I’m hitting the same wall here - IncludeImplicitMetaModes doesn’t do anything.
Adding
Option "ModeValidation" "NoMaxPClkCheck, NoEdidMaxPClkCheck, NoMaxSizeCheck, NoHorizSyncCheck, NoVertRefreshCheck, NoVirtualSizeCheck, NoTotalSizeCheck, AllowNonEdidModes, NoInterlacedModes"
does make bunch of new resolutions, including 2560x1440 to be visible in XRandr 1.2+ (stretch to entire screen when I just use them vanilla) but it’s still useless.
MetaModes doesn’t allow overriding how selecting display mode 2560x1440 is to be handled (“ViewPort is too small”). And I don’t want to override how 3440x1440 is handled (the only mode I can list in MetaModes that will allow me to set ViewPortIn=2560x1440 and ViewPortOut=2560x1440+440+0)
So to me it looks like IncludeImplicitMetaModes or bust… And because neither xrandr --addmode (NVIDIA/Troubleshooting - ArchWiki) nor IncludeImplicitMetaModes can be used… I say… bust, sell 1080Ti and buy some AMD card…