Mark Knecht wrote:
>
>
> On Wed, Feb 28, 2024 at 3:24 PM Dale <rdalek1...@gmail.com
> <mailto:rdalek1...@gmail.com>> wrote:
> >
> > Paul B. Henson wrote:
> > > On Sat, Feb 24, 2024 at 08:53:37PM -0800, Daniel Frey wrote:
> > >> After cursing KDE for a while with three monitors, does anyone
> have any
> > >> idea why KDE is so bad at managing multiple monitors?
> > > <shrug>. I ended up adding this to /usr/share/sddm/scripts/Xsetup:
> > >
> > > xrandr --output DVI-D-0 --primary --output HDMI-A-0 --left-of DVI-D-0
> > > --output DisplayPort-0 --right-of DVI-D-0
> > >
> > > Always perfect since then :).
> >
> > I have two questions.  Does a upgrade change it back to defaults?  If
> > so, there may be a file in /etc somewhere that is more permanent.  If
> > not, cool.  :-)
> >
> > How did you get the info to match the hardware you have?  My main
> > display is on a DB15HD port.  My second display in on a HDMI port.  I
> > figure you ran a command to gather that info or there is a source of all
> > the possibilities.
> >
> > I'd like to give that a shot.  Might help with my occasional issue.
> >
> > Dale
> >
> > :-)  :-)
>
> If you're just looking for what's connected to what port then xrandr
> will tell you that.
>
> To get to Paul's equation you would need to figure out the ordering
> yourself I think
>
> HTH,
> Mark


To provide a little more info on how this works.  This is how I did it. 
It helps a LOT to have tab completion with this.  It will fill in a lot
of the info and when unsure, list the available options.  First, I had
to install the package xrandr.  My first problem is the command isn't
available since it wasn't installed.  So, if you don't have it, install
it. It's tiny.  This is what I have for my setup.  You can ignore that I
watch TV and just pretend you have two monitors side by side or whatever
and get the same results.  I have a DB15HD connector, referred to as VGA
within xrandr.  That is my main monitor.  The second monitor is is
connected to a HDMI port, seen as same in xrandr, and what I watch TV
with.  This is the output I started with to get good clues. 


root@fireball / # xrandr --listmonitors
Monitors: 2
 0: +*VGA-0 1920/598x1080/336+0+0  VGA-0
 1: +HDMI-0 1920/1150x1080/650+1920+0  HDMI-0
root@fireball / #


Since I have different ports, it is easy to see which is which.  The
last bit is what you use in the command, not the first bits.  If all
your ports are the same, mini HDMI for example, I think the port lowest
to the bottom of the video card is number 0, or the first port.  Anyway,
mine is easy.  I then typed in xrandr --output and hit tab twice.  It
will list all the available monitors.  Pick the one you want to be the
first output or main monitor.  In my case, VGA-0 as shown on the end of
line one.  Once you type enough, tab completion will fill it in.  Then
add --primary to that to make it the primary display. 

For the second monitor, continue on with the command and tab
completion.  Type in --output and hit tab twice again to list options. 
Pick the second monitor and type enough in for tab completion to fill in
the rest.  Then add --right-of, --left-of, --above or --below and then
the output device for the main monitor.  For me, this is what my command
looks like. 


root@fireball / # xrandr --output VGA-0 --primary --output HDMI-0
--right-of VGA-0
root@fireball / #


That makes VGA the primary, HDMI-0 second and to the right of VGA-0.  If
you have more than two monitors, just keep adding --output and list and
place the other monitors.  I don't have the means to test but that
should work.  I'd think setting the primary is key in this so I wouldn't
forget to include that. 

Once you get that command, you can test it by going to a Konsole if
using KDE or some other similar tool you can type commands in as root
and run the command manually.  If it works correctly, add the command to
the file in this path.  /usr/share/sddm/scripts/Xsetup  I haven't logged
out and back in again yet so we will see when that happens if it really
works and my little quirk goes away. 

There is a man page for this.  It may have other options that you may
need to add.  Just keep in mind, what is between each --output is what
it applies too.  One could have different resolutions, image flipped or
something and lots of other options.  Just keep the options in the right
section of the command. 

I hope this helps someone and makes decent sense.  I also hope it works
after I logout and back in again.  :/   I'm making a note of the
location in case I need to comment it out.  Better to be safe than
sorry.  LOL 

Dale

:-)  :-) 

Reply via email to