On Wednesday, 3 July 2024 10:22:33 BST Dale wrote:

> Another update.  I rebooted several times to make sure whether things
> would be consistent.  Most of the time, it came up as it should.  Some
> times, not so much.  When I had just the new Samsung monitor connected,
> it was consistent.  When I added the old LG, it would not always come up
> like it should.  The biggest thing, the plasma panel would be on the
> wrong monitor. 

If you are adding a second monitor then you need an additional "Monitor" 
section with a different identifier in your xorg.conf for a multi-headed 
setup.  You need to add in the first monitor section:

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Samsung LS32B30"
    HorizSync       30.0 - 84.0
    VertRefresh     50.0 - 75.0
    Option         "PreferredMode" "1920x1080_60.00"
    Option         "Primary" "true"
    Option         "DPMS" "true"
EndSection

and then in the second monitor section:

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "LG blah-blah"
    Option         "PreferredMode" "1920x1080_60.00"
    Option         "RightOf" "Monitor0"
    Option         "DPMS" "true"
EndSection

Section "Screen" 
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    SubSection     "Display"
        Depth       24
        Virtual     3840 1080 # 1920 + 1920 (3840), 1080 + 0 (1080)
    EndSubSection
EndSection

You'll get the correct identifiers and "Modelines", "PreferredMode", 
resolution, refresh rate, etc. values for the above by using 'xrandr -q'.


> I tried using xrandr to set this but it kept changing what monitors was
> connected where which would throw off what monitor got what priority.

Manually instructing xranrd to set up your monitors will not survive between 
reboots unless you store its settings in your xorg.conf.  You need to rerun it 
each time, manually or via a script.  Or, you just set correctly your 
xorg.conf once and then you can forget about it.  ;-)


> Finally, I removed the old LG.  It has caused enough grief already.  I
> unhooked the TV cable for my bedroom TV and connected it to the new
> rig.  I then booted.  I installed a package called arandr.  It's a
> sister to xrandr but GUI based.  Makes it very easy to see what is
> what.  On the first boot, the Samsung showed as connected to port 1. 
> The TV showed as port 3 I think.  It seems each port can do two displays
> so it kinda skips.  The first port is actually 0.  Anyway, I used arandr
> to set it up like I wanted.  I saved the file with the command in my
> home directory.  I then moved the command to a file in
> /etc/X11/xinit/xinitrc.d/ as a file.  They are usually started with a
> number in the file name.  Don't forget to add the bash bit on the first
> line if needed and make it executable as well.  Once I did that, the
> displays worked like they should.  So far at least.
> 
> The lesson to be learned is this.  When you have a monitor that is
> having issues and keeps showing as connected to different ports and
> such, you can't use that display to get a reliable configuration that
> will survive a reboot, maybe even a power off and back on.  Another
> thing, using either xrandr or arandr is a nifty feature if set up
> correctly.  Those two make it so a display, or set of displays more
> importantly, work like you want.  The arnadr command since it is a GUI,
> makes it a lot easier to create the xrandr command with the right
> options.  If you use that route tho, make sure all monitors are
> connected and on before starting.  You may can do it without it with
> xrandr but arandr needs the monitor to be on and working.  The other
> thing, putting the setting in /etc/X11/xinit/xinitrc.d/ seems to work
> pretty well.  So far at least. 
> 
> To be honest tho, I wish Nvidia would generate a conf file that contains
> both monitors and I could set it up properly there.  Then when I boot
> up, it reads that file and knows what monitor is what long before DM
> and/or sddm even starts.  It could also keep a monitor powered on even
> while on a console with nothing GUI running.  I kinda wish we could do
> it like we did back in the old days. 
> 
> I also had another thought. When changing the xorg.conf file, I wonder
> if it only reads that file when loading the nvidia drivers but not when
> DM is started/restarted.  I noticed on my system, when I booted but have
> not started DM, the Nvidia drivers were already loaded.  I'm not sure
> when the xorg.conf file is loaded but if it is loaded when the drivers
> load, then that could explain why some changes didn't make any changes
> to the display.  The changes were not seen unless I rebooted which I
> didn't always do.  Maybe someone here knows what order this happens in. 
> It could explain a lot tho. 

I think if you change parameters in the "Device" section for the graphics 
driver in your xorg.conf, you need to reload the driver itself, then restart 
X.  If the driver is built-in the kernel, you have to reboot.

If you change something in your "Monitor" section you just need to restart X.


> I'm hoping all this will help someone. It sure has been a hair puller
> for me.  LOL 

Yeah, that LG monitor has been a pain.  You better keep it matched to the old 
PC where you know it just works.  ;-)

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to