Bezel correction and multiple displays with Nvidia driver on Linux – Metamode seems to be ignored

In theory it should be as easy as using offsets in a ‘metamode’ line. in he screen section of xorg.conf eg.

	Option         "metamodes" "DP-0: 1920x1080_75 +0+0,DP-2: 1920x1080_75 +1962+0, DP-4: 1920x1080_75 +3924+0

Where +0+0 , +1962+0 and +3924+0 is adding 42 pixels between monitors to account for the size of my bezels. But it doesn’t work. The metamode line is ignored and the nvidia driver make it’s own metamode line, as seen in Xorg.log

[ 40517.093] (**) NVIDIA(0): Option "MetaModes" "DP-2: 1920x1080_75 +1920+0, DP-0: 1920x1080_75 +0+0, DP-4: 1920x1080_75 +3840+0"

I can change the absolute positions in the nvidia-settings GUI. Press apply and it works. I have my bezel correction. But then click ‘Save to Xconfig file’, Fire up an xserver with that .conf and it overrides the custom metamode again.

Work around:

Use nvidia-settings gui to position the displays with the offsets you want. Click apply.
On the command line
nvidia-settings –query Currentmetamode
Which gave me

Attribute ‘CurrentMetaMode’ (gent:1.0): id=50, switchable=no, source=nv-control :: DPY-3: 1920x1080_75 @1920x1080
+1962+0 {ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0}, DPY-0: 1920x1080_75 @1920x1080 +0+0
{ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0}, DPY-5: 1920x1080_75 @1920x1080 +3924+0 {ViewPortIn=1920x1080,
ViewPortOut=1920x1080+0+0}

You’ll need to clean up newlines and extra white space so its all on one line . Get rid of the “(gent:1.0): id=50, switchable=no, source=nv-control ::” bit (when I didn’t the command succeeded but I lost my middle display). Get rid of Attribute, put an = after ‘CurrentMetaMode’ and double quotes around every following, and nvidia-settings –assign at the start and you should be left with some thing like this

nvidia-settings --assign 'CurrentMetaMode'="DPY-3: 1920x1080_75 @1920x1080 +1962+0  {ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0}, DPY-0: 1920x1080_75 @1920x1080 +0+0 {ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0}, DPY-5: 1920x1080_75 @1920x1080 +3924+0 {ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0}"

So that command is run before playing a game where bezel correction is required. Run it again without the offsets to go back to normal.

Disable Nvidia HDMI sound under Linux

Sound under linux and KDE seems to able to get itself confused with its settings easily enough so their is no point adding to the confusion. I’m sure that HDMI is hugely useful to those that want it and use it but up to now I never have.
Among the issues I’ve noticed is that at seemingly random times the KDE mixer Kmix will revert to setting the Nvidia HDMI output as the master channel. Then I have to change it back which starts to get old fairly rapidly. Continue reading