[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xorg
Subject: Re: [Question] ZaphodHeads, ServerLayout without position information, and touchscreens
From: Hugh Chang <perceiv2 () gmail ! com>
Date: 2020-07-26 12:28:39
Message-ID: 0af44b15-7214-5ddd-3dca-bd09ca17f872 () gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Dear Böszörményi Zoltán and Adam Nielsen,
Thanks for your valuable comments. I deeply appreciate them and am
writing my reply below.
> we use this kind of ServerLayout: Screen 1 "SCREEN1" RightOf "SCREEN0"
> This way, their canvases look like they are put side by side.
> I am not sure how Xorg sets up screens related to each other in the
> video RAM when the positional coordinates are used the way you quoted.
It is good to know that you usually position the screens not to overlap.
I also don't know about the video RAM when the origins are all (0,0).
> Are you sure you want a multi-seat setup ...
> This creates a single seat with two independent displays, attached to
> the same X session. This is not multi-seat, this is just multi-monitor
> on a single seat.
Thanks for teaching me. I did not know the exact meaning of the terminology.
> If you want multi-seat, you generally have to launch a separate Xorg
> session for each seat, with effectively a different ServerLayout for
> each one. I am not sure that this is what your requirement actually is.
Okay, I got it. Then I think that my customer does not want multi-seat.
> The display origins are all at (0,0) as they behave a bit like two
> independent computers (perhaps this is where the multi-seat confusion
> is coming from). However if you plug a mouse into the computer, you
> will be able to move the cursor between both monitors which means it's
> a single seat.
Yes, you are right.
> In a true multi-seat set up, you would have to
> configure the system to assign the mouse you plugged in to one
> seat/monitor or the other, and you could not move it between both
> screens.
Now, I can understand the exact meaning of the terminology.
> So one solution to your problem is to configure the system as a true
> multi-seat system, with each monitor assigned to a different seat. You
> may however need to add a second video card to the system to do this, as
> I cannot recall whether you can share a single video card between seats.
> Certainly it was not the case in the past, and I am unsure whether this
> is now supported or not.
That's right. We need multiple video cards for a true multi-seat system.
> Alternatively, in this single-seat Zaphod mode, the screens are still
> aligned so that the mouse cursor can glide from one monitor to the next,
> so the second monitor will have an origin that is not (0,0) as far as
> the mouse/touchscreen is concerned.
Yes, I think from the mouse movement that the input device coordinates
do not overlap while the output device coordinates DO overlap.
How can I know the input device layout to calculate the transformation
matrix values when the output device origins are all (0,0)?
> Have you tried assuming the monitors are set up as a single Xorg
> display (":0" only) and setting the transformation matrix accordingly?
Yes, as I described in "4.2.1. ServerLayout with position information" of
"https://lists.x.org/archives/xorg/attachments/20200717/37b0cae6/attachment-0001.pdf",
Section "ServerLayout"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" 1920 360
EndSection
+---------------------+
| | +----------------------+
| Left Monitor (:0.0) | | Right Monitor (:0.1) |
| 1920x1080 @ 0,0 | | 1280x720 @ 1920,360 |
+---------------------+ +----------------------+
Section "InputClass"
Identifier "Touch for screen0"
MatchUSBID "2965:5024"
Option "TransformationMatrix" "0.6 0 0 0 1 0 0 0 1"
EndSection
Section "InputClass"
Identifier "Touch for screen1"
MatchUSBID "2965:5023"
Option "TransformationMatrix" "0.4 0 0.6 0 0.666667 0.333333 0 0 1"
EndSection
> If you left the transformation matrix alone for the left monitor, but
> set the one on the right so that it was offset by 1920 pixels
> horizontally, would that work?
Yes, the above configuration worked well.
> I haven't actually tried this so I am only guessing, and of course the
> exact transformation values would depend on the screen sizes and how
> they are positioned relative to each other in xorg.conf, but it could
> be worth experimenting with.
Section "ServerLayout"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" 0 0
EndSection
When all the origins are (0,0), however, I don't know what to do
as I described in "4.2.2. ServerLayout without position information" of
"https://lists.x.org/archives/xorg/attachments/20200717/37b0cae6/attachment-0001.pdf",
Best regards,
Hugh Chang
[Attachment #5 (text/html)]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font color="black"><font color="black">Dear Böszörményi Zoltán and
Adam Nielsen,</font><br>
</font><br>
<div class="moz-signature"><font color="black">Thanks for your
valuable comments. I deeply appreciate them and am writing my
reply below.</font></div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black">> we use this kind
of ServerLayout: Screen 1 "SCREEN1" RightOf "SCREEN0"<br>
> This way, their canvases look like they are put side by
side.</font></div>
<div class="moz-signature"><font color="black">> I am not sure
how Xorg sets up screens related to each other in the<br>
> video RAM when the positional coordinates are used the way
you quoted.</font></div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black">It is good to know
that you usually position the screens not to overlap.<br>
</font></div>
<div class="moz-signature"><font color="black">I also don't know
about the video RAM when the origins are all (0,0).<br>
</font></div>
<div class="moz-signature"><font color="black"><br>
> Are you sure you want a multi-seat setup ...<br>
> This creates a single seat with two independent displays,
attached to<br>
> the same X session. This is not multi-seat, this is just
multi-monitor<br>
> on a single seat.</font></div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black">Thanks for teaching
me. I did not know the exact meaning of the terminology.<br>
</font></div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black">> If you want
multi-seat, you generally have to launch a separate Xorg<br>
> session for each seat, with effectively a different
ServerLayout for<br>
> each one. I am not sure that this is what your requirement
actually is.</font></div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black">Okay, I got it. Then
I think that my customer does not want multi-seat.<br>
</font></div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black">> The display
origins are all at (0,0) as they behave a bit like two<br>
> independent computers (perhaps this is where the multi-seat
confusion<br>
> is coming from). However if you plug a mouse into the
computer, you<br>
> will be able to move the cursor between both monitors which
means it's<br>
> a single seat. <br>
</font></div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black">Yes, you are right.<br>
</font></div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black">> In a true
multi-seat set up, you would have to<br>
> configure the system to assign the mouse you plugged in to
one<br>
> seat/monitor or the other, and you could not move it
between both<br>
> screens.</font></div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black">Now, I can understand
the exact meaning of the terminology.<br>
</font></div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black">> So one solution
to your problem is to configure the system as a true<br>
> multi-seat system, with each monitor assigned to a
different seat. You<br>
> may however need to add a second video card to the system
to do this, as<br>
> I cannot recall whether you can share a single video card
between seats.<br>
> Certainly it was not the case in the past, and I am unsure
whether this<br>
> is now supported or not.</font></div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black">That's right. We need
multiple video cards for a true multi-seat system.<br>
</font></div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black">> Alternatively,
in this single-seat Zaphod mode, the screens are still<br>
> aligned so that the mouse cursor can glide from one monitor
to the next,<br>
> so the second monitor will have an origin that is not (0,0)
as far as<br>
> the mouse/touchscreen is concerned.</font></div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black">Yes, I think </font><font
color="black"><font color="black">from the mouse movement </font>that
the input device coordinates do not overlap while the output
device coordinates DO overlap.<br>
</font></div>
<div class="moz-signature">How can I know the input device layout to
calculate the transformation matrix values <font color="black"><font
color="black">when the output device origins are all \
(0,0)?</font></font></div> <div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black">> Have you tried
assuming the monitors are set up as a single Xorg<br>
> display (":0" only) and setting the transformation matrix
accordingly?</font></div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black">Yes, as I described
in "4.2.1. ServerLayout with position information" of <br>
</font></div>
<div class="moz-signature"><font color="black"><a class="moz-txt-link-rfc2396E" \
href="https://lists.x.org/archives/xorg/attachments/20200717/37b0cae6/attachment-0001. \
pdf">"https://lists.x.org/archives/xorg/attachments/20200717/37b0cae6/attachment-0001.pdf"</a>,</font></div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black"> Section
"ServerLayout"</font></div>
<font color="black"> Screen 0 "Screen0" 0 0</font>
<div class="moz-signature"><font color="black"> Screen 1
"Screen1" 1920 360</font></div>
<div class="moz-signature"><font color="black"> EndSection<br>
</font></div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black"><tt><font
color="black"><tt><font color="black"><tt><font
color="black"><tt> +---------------------+</tt><tt><br>
</tt></font></tt></font> | |
+----------------------+</tt><tt><br>
</tt></font></tt><tt> | Left Monitor (:0.0) | | Right
Monitor (:0.1) |</tt><tt><br>
</tt><tt> | 1920x1080 @ 0,0 | | 1280x720 @ 1920,360 |</tt><tt><br>
</tt><tt> +---------------------+ \
+----------------------+</tt></font></div> <div class="moz-signature"><br>
</div>
<div class="moz-signature">Section "InputClass"</div>
<div class="moz-signature"> Identifier "Touch for screen0"</div>
<div class="moz-signature"> MatchUSBID "2965:5024"</div>
Option "TransformationMatrix" "0.6 0 0 0 1 0 0 0 1"
<div class="moz-signature">EndSection<br>
</div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black">Section "InputClass"</font></div>
<div class="moz-signature"><font color="black"> Identifier
"Touch for screen1"</font></div>
<div class="moz-signature"><font color="black"> MatchUSBID
"2965:5023"</font></div>
<font color="black"> Option "TransformationMatrix" "0.4 0 0.6 0
0.666667 0.333333 0 0 1"</font>
<div class="moz-signature"><font color="black">EndSection<br>
</font></div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black">> If you left the
transformation matrix alone for the left monitor, but<br>
> set the one on the right so that it was offset by 1920
pixels<br>
> horizontally, would that work?</font></div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black">Yes, the above
configuration worked well.<br>
</font></div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black">> I haven't
actually tried this so I am only guessing, and of course the<br>
> exact transformation values would depend on the screen
sizes and how<br>
> they are positioned relative to each other in xorg.conf,
but it could<br>
> be worth experimenting with.<br>
</font></div>
<div class="moz-signature"><br>
<div class="moz-signature"><font color="black"> Section
"ServerLayout"</font></div>
<font color="black"> Screen 0 "Screen0" 0 0</font>
<div class="moz-signature"><font color="black"> Screen 1
"Screen1" 0 0</font></div>
<div class="moz-signature"><font color="black"> EndSection<br>
</font></div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black">When all the
origins are (0,0), however, I don't know what to do</font></div>
<div class="moz-signature"><font color="black">as I described in
"4.2.2. ServerLayout without position information" of <br>
</font>
<div class="moz-signature"><font color="black"><a \
class="moz-txt-link-rfc2396E" \
href="https://lists.x.org/archives/xorg/attachments/20200717/37b0cae6/attachment-0001. \
pdf">"https://lists.x.org/archives/xorg/attachments/20200717/37b0cae6/attachment-0001.pdf"</a>,</font></div>
<font color="black"> </font></div>
</div>
<div class="moz-signature"><font color="black"><br>
</font></div>
<div class="moz-signature"><font color="black">Best regards,<br>
Hugh Chang<br>
</font><br>
</div>
</body>
</html>
_______________________________________________
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic