You are not logged in.

#1 2022-10-31 16:21:55

TheWingedHussar
Member
Registered: 2022-05-19
Posts: 8

[SOLVED] Can't figure out multi-head (Xorg/Nvidia)

I'm attempting to setup an old tv(HDMI-0) as a second monitor, but im having some issues.

By default HDMI-0 is set to primary, causing my dwm bar & dmenu font to be much to large

So I add the following to my xorg.conf

Section "Monitor"
	Identifier	"DP-0"
	Option		"Primary"	"true"
EndSection

Whole file for refrence:

Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	ModulePath   "/usr/lib/xorg/modules"
	FontPath     "/usr/share/fonts/misc"
	FontPath     "/usr/share/fonts/TTF"
	FontPath     "/usr/share/fonts/OTF"
	FontPath     "/usr/share/fonts/Type1"
	FontPath     "/usr/share/fonts/100dpi"
	FontPath     "/usr/share/fonts/75dpi"
EndSection

Section "Module"
	Load  "glx"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/input/mice"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Monitor"
	Identifier	"DP-0"
	Option		"Primary"	"true"
EndSection

Section "Device"
	Identifier  "Card0"
	Driver      "nvidia"
	BusID       "PCI:45:0:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

Upon reboot, the font is fixed, but now HDMI-0 is on the right rahter than left, so I then add the folowing: 

Section "Monitor"
	Identifier	"HDMI-0"
	Option		"LeftOf"	"DP-0"
EndSection

Refrenced Wiki Page

This did nothing.

So I tried nvidia-settings.
This is what it gave me:

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 520.56.06

Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "Screen0" 0 0
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
    Option         "Xinerama" "0"
EndSection

Section "Files"
    ModulePath      "/usr/lib/xorg/modules"
    FontPath        "/usr/share/fonts/misc"
    FontPath        "/usr/share/fonts/TTF"
    FontPath        "/usr/share/fonts/OTF"
    FontPath        "/usr/share/fonts/Type1"
    FontPath        "/usr/share/fonts/100dpi"
    FontPath        "/usr/share/fonts/75dpi"
EndSection

Section "Module"
    Load           "glx"
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/input/mice"
    Option         "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "LG Electronics 27GL650F"
    HorizSync       160.0 - 160.0
    VertRefresh     48.0 - 144.0
EndSection

Section "Monitor"
    Identifier     "DP-0"
    Option         "Primary" "true"
EndSection

Section "Monitor"
    Identifier     "HDMI-0"
    Option         "LeftOf" "DP-0"
EndSection

Section "Device"
    Identifier     "Card0"
    Driver         "nvidia"
    BusID          "PCI:45:0:0"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce RTX 2060 SUPER"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-1"
    Option         "metamodes" "DP-0: nvidia-auto-select +1366+0, HDMI-0: nvidia-auto-select +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

And I'm back to square 1, broken font size, despite fixed primary, but correct monitor layout.
Any ideas on a fix, referebly using the original config file.

Last edited by TheWingedHussar (2022-10-31 21:56:34)

Offline

#2 2022-10-31 17:19:14

Ferdinand
Member
From: Norway
Registered: 2020-01-02
Posts: 338

Re: [SOLVED] Can't figure out multi-head (Xorg/Nvidia)

Hm.. that's a rather full xorg.conf.
Are you sure you need all of it?
I don't even have the xorg.conf file (I don't have an NVIDIA card ether, though :-)
I think it may be worth a try to rename it in order to just disable all of it, and then make an /etc/X11/xorg.conf.d/10-monitor.conf, containing only the two "Monitor" sections.

Offline

#3 2022-10-31 17:29:20

TheWingedHussar
Member
Registered: 2022-05-19
Posts: 8

Re: [SOLVED] Can't figure out multi-head (Xorg/Nvidia)

Ferdinand wrote:

I think it may be worth a try to rename it in order to just disable all of it, and then make an /etc/X11/xorg.conf.d/10-monitor.conf, containing only the two "Monitor" sections.

Tried that, same as when I just added the Monitor sections to the main file.

Offline

#4 2022-10-31 20:40:06

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,446

Re: [SOLVED] Can't figure out multi-head (Xorg/Nvidia)

Remove the config you generated and add /etc/X11/xorg.conf.d/20-nvidia.conf

Section "Device"
    Identifier "Default nvidia Device" # or any fancy name you wish
    Driver	"nvidia"
    Option  "DPI"					"96x96"  # choose the DPI you want here
    Option	"UseEdidDpi"			"False"
    Option         "MetaModes" "DP-0: nvidia-auto-select +1366+0, HDMI-0: nvidia-auto-select +0+0"
EndSection

Offline

#5 2022-10-31 21:56:14

TheWingedHussar
Member
Registered: 2022-05-19
Posts: 8

Re: [SOLVED] Can't figure out multi-head (Xorg/Nvidia)

seth wrote:

Remove the config you generated and add /etc/X11/xorg.conf.d/20-nvidia.conf

Section "Device"
    Identifier "Default nvidia Device" # or any fancy name you wish
    Driver	"nvidia"
    Option  "DPI"					"96x96"  # choose the DPI you want here
    Option	"UseEdidDpi"			"False"
    Option         "MetaModes" "DP-0: nvidia-auto-select +1366+0, HDMI-0: nvidia-auto-select +0+0"
EndSection

Yep. This is it. Thank you very much.

20-nvidia.conf worked, just want to double check if it was a typo and should be 10.

Offline

#6 2022-10-31 22:07:02

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,446

Re: [SOLVED] Can't figure out multi-head (Xorg/Nvidia)

The number in and by itself isn't relevant except for ordering the configlets.
Indexing 20 is the canonical suggestion for device configs ( https://wiki.archlinux.org/title/NVIDIA … figuration ) where "10" is associated w/ output control, but you can even skip the number and be fine.

Offline

Board footer

Powered by FluxBB