You are not logged in.

#1 2022-08-10 21:17:40

wnaBee
Member
Registered: 2021-06-19
Posts: 13

Only one monitor runs X at a time and RightOf doesn't seem to work.

Hi,
I've been trying to get a dual-monitor setup to work where one monitor is connected via HDMI to the graphics card and the other is connected to the iGPU with VGA.
My issues began when i noticed that only one of the monitors was being detected by xrandr a.la:

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
DP-0 disconnected primary (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 521mm x 293mm
   1920x1080     60.00*+  59.94    50.00  
   1680x1050     59.95  
   1440x900      59.89  
   1440x576      50.00  
   1440x480      59.94  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.94    59.93  
DP-4 disconnected (normal left inverted right x axis y axis)
DP-5 disconnected (normal left inverted right x axis y axis)

After some snooping i figured the issue was my xorg.conf and so i started playing around with it but i couldn't get both monitors to run X simultaneously.
In the first case i created a file called 20-intel.conf containing:

Section "Device"
	Identifier "Intel Graphics"
	driver "intel"
	BusID "PCI:0:2:0"
EndSection

Section "Screen"
	Identifier "Screen1"
	Device "Intel Graphics"
EndSection

Running with this additional file would cause the active monitor to switch after leaving bios from my default monitor to the secondary one on iGPU.
Instead i tried adding similar lines to the auto-generated conf created by

nvidia-xconfig

here marked as comments with #:

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
#    Screen	1  "Screen1" RightOf "Screen0"

    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option	   "Primary" "true"
    Option	   "PrefferedMode" "1920x1080"
    Option	   "Position" "0 0"   
    Option         "DPMS"
EndSection

#Section "Monitor"
#    Identifier	   "Monitor1"
#    Option	   "PrefferedMode" "1920x1080"
#    Option	   "Position" "1920 0"
#    Option 	   "DPMS"
#EndSection


Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
	Option "NoLogo" "1"
    BusID "PCI:1:0:0"
EndSection

#Section "Device"
#	Identifier "Device1"
#	driver "intel"
#	BusID "PCI:0:2:0"
#EndSection


Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

#Section "Screen"
#	Identifier "Screen1"
#	Device "Device1"
#	Monitor "Monitor1"
#EndSection

Section "Extensions"
    Option         "COMPOSITE" "Enable"
EndSection

 
Section "InputClass"
    Identifier          "Keyboard Defaults"
    MatchIsKeyboard     "yes"
    Option              "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

Now, depending on whether spaces are added into

"Screen1"RightOf"Screen1"

xorg either states:

[     4.894] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[     4.894] Parse error on line 86 of section ServerLayout in file /etc/X11/xorg.conf.d/90-mhwd.conf
	"RightOf"Screen0"" is not a valid keyword in this section.
[     4.894] (EE) Problem parsing the config file
[     4.894] (EE) Error parsing the config file
[     4.894] (EE)

when spaces aren't used. Causing both monitors to boot on tty1 and then get stuck there, with X crashing.
Or:

[     3.409] (==) using system config directory "/usr/share/x11/xorg.conf.d"
[     3.411] (==) serverlayout "layout"
[     3.411] (**) |-->screen "screen0" (0)
[     3.411] (**) |   |-->monitor "monitor0"
[     3.411] (**) |   |-->device "device0"
[     3.411] (**) |   |-->gpudevice "device1"
[     3.411] (**) |   |-->gpudevice "device0"
[     3.411] (**) |   |-->gpudevice "device1"
[     3.411] (==) automatically adding devices
[     3.411] (==) automatically enabling devices
[     3.411] (==) automatically adding gpu devices
[     3.411] (==) automatically binding gpu devices

Causing only the monitor plugged in on HDMI to boot while the other claims "No signal detected" and goes into power-saving mode.

A third option happens when no config (besides the default one) is used. In which case the HDMI based monitor will boot as normal while the secondary one has a single blinking _ in the corner.

So at this point I'm at my wits end.
Reading the man pages and this post i thought this would be the way to go but apparantly not.
I'm sure I'm missing something obvious but would be very thankful if someone could point it out to me because I'm clearly blind.


I know nothing.

Offline

#2 2022-08-10 21:35:11

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

Re: Only one monitor runs X at a time and RightOf doesn't seem to work.

Instead i tried adding similar lines to the auto-generated conf created by

the file you're going to remove again, nvidia-xconfig has an --prime flag, but even that's not a good idea.

So at this point I'm at my wits end.

https://wiki.archlinux.org/title/NVIDIA_Optimus

Step one: how do you intend to use the system (intel only, nvidia only or hybrid)?


"Screen1"RightOf"Screen1"

in syntatically invalid - whitespace is not optional, but again: you don't want to do *any* of this.

Offline

#3 2022-08-11 09:39:53

wnaBee
Member
Registered: 2021-06-19
Posts: 13

Re: Only one monitor runs X at a time and RightOf doesn't seem to work.

seth wrote:

the file you're going to remove again, nvidia-xconfig has an --prime flag, but even that's not a good idea.

Alright. File's gone. As expected I can now only boot into TTY.
However, just as an experiment I tried regenerating the xorg.conf file again but now when I reboot, the nvidia driver fails to load as well.
So it seems I've managed to get myself into an even bigger mess than before.
The new error seems to be the same as described in this thread: https://bbs.archlinux.org/viewtopic.php?id=258201
I'll try to resolve it using the instructions from there.

Nevermind, the proposed solution in that thread is essentially the same as what you just told me not to do. I'll keep looking.

https://wiki.archlinux.org/title/NVIDIA_Optimus

Step one: how do you intend to use the system (intel only, nvidia only or hybrid)?

Hybrid, which is why i initially tried installing bumblebee.
However since i couldn't get that to work i tried going into the configs and manually editing them, which in hindsight does seem like a really bad idea.
Especially considering i have essentially no experience with xorg configs.
Either way, having broken everything trying to do it myself I am now here, to ask for some guidance (both practical and spiritual) smile

Last edited by wnaBee (2022-08-11 11:02:14)


I know nothing.

Offline

#4 2022-08-11 13:08:31

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

Re: Only one monitor runs X at a time and RightOf doesn't seem to work.

Post the output of "lspci -k" and your most recent (failing) xorg log, https://wiki.archlinux.org/title/Xorg#General
You can use the tip in the first link below to upload them from the console (basically "lspci -k | curl -F 'file=@-' 0x0.st" will get you a url w/ the uploaded output)

i initially tried installing bumblebee.

There's a good chance that bbswitch disables the nvidia chip/blacklists the kernel module.

Also make sure that there's no nonsense in /etc/X11/xorg.conf.d/90-mhwd.conf (the parsing error will reliably prevent the X11 server from starting up)

Offline

#5 2022-08-12 09:51:41

wnaBee
Member
Registered: 2021-06-19
Posts: 13

Re: Only one monitor runs X at a time and RightOf doesn't seem to work.

Post the output of "lspci -k" and your most recent (failing) xorg log, https://wiki.archlinux.org/title/Xorg#General
You can use the tip in the first link below to upload them from the console (basically "lspci -k | curl -F 'file=@-' 0x0.st" will get you a url w/ the uploaded output)

I fixed the issue of X failing by reinstalling the nvidia-drivers.

As for the rest. There's no good way to phrase this. I'm on the wrong forum.
I recently switched from Arch to Manjaro on this computer, but since I'm used to working in Arch i came here without a second through and posted.
I only realised today because of a reboot that, to my chagrin, flashed the Manjaro logo across my face.
I'll go ask the mods to close/delete the thread.
Either way, thank you very much for the help and sorry to have wasted your time.
(Here's hoping i don't get banned hmm)

Last edited by wnaBee (2022-08-12 09:52:51)


I know nothing.

Offline

Board footer

Powered by FluxBB