Nvidia 510 & xrandr

Hi! I have two monitors, 4K and FullHD(1K) and Nvidia 3060 TI card.
Before drivers 510 appeared I had used 470, easily making the same monitor resolution using xrandr.
I saved the line of the code:

/usr/bin/xrandr --fbmm 5760x2160 --output DP-0 --pos 0x0 --mode 3840x2160 --scale 1x1 --primary --output DP-2 --pos 3840x0 --mode 1920x1080 --scale 2x2

in a file /etc/profile.d/50-xrandr.sh, it went well when loading and everything was OK.

Then there appeared drivers 510, which are really faster. However, for some reason, the xrandr setting fell into disuse. It seems that when loading something resets the settings.

One may do the same using Nvidia drivers. It is just enough to expand on the code for 1К monitor.
But this setting won’t save either.

I’ve been using the line with xrandr setting in every conceivable way. It worked properly in this file for a couple of years.

The question is how to solve this issue or at least which way to search for a solution?

Which distro/DE are you using?

Right now kubuntu 22.04
But the same behavior was also in kubuntu 20.04

KDE has its own monitor manager. Either do your settings in kde control center or disable the kscreen2 service.

Thanks, I will try.
But KDE does not allow to change these settings.
Besides, these xrandr settings worked well with 470 driver.

Please check whether you’re using a wayland or xorg session, might be that the gbm addition in driver 510 enabled wayland so xrandr doesn’t have any effect.

Сhecked. Session x11.

Can I save the driver settings and not use xrandr at all?

You can set up a MetaMode in xorg.conf. kscreen2 has to be disabled for this.

like this?

Section "Screen"
    Identifier     "Screen0"
    Device         "nvidia"
    Monitor        "DP-0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-1"
    Option         "metamodes" "DP-0: 3840x2160 +0+0, DP-2: 1920x1080 +3840+0 {viewportin=3840x2160}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24

I’ve already done that.
It doesn’t work.

Does it work if you fiddle you config together using nvidia-settings GUI and then query the config
nvidia-settings -q CurrentMetaMode

So does using that MetaMode in xorg.conf work?

Unfortunately, it doesn’t work.

So, how can I fix it? I don’t even know where to ask this question after no reply here.

Find out what is changing the settings back, if kscreen2 is disabled, something else must be running. The driver doesn’t set any resolution unless edid is broken.
Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

I did not disable kscreen2 with 510 driver. Just like I didn’t disable it with 470 driver.

Then I can’t help you.

I will try to disable kscreen2. Here is the file you asked for.
nvidia-bug-report.log.gz (358.3 KB)