[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">&gt; we use this kind
        of ServerLayout: Screen 1 "SCREEN1" RightOf "SCREEN0"<br>
        &gt; This way, their canvases look like they are put side by
        side.</font></div>
    <div class="moz-signature"><font color="black">&gt; I am not sure
        how Xorg sets up screens related to each other in the<br>
        &gt; 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>
        &gt; Are you sure you want a multi-seat setup ...<br>
        &gt; This creates a single seat with two independent displays,
        attached to<br>
        &gt; the same X session.  This is not multi-seat, this is just
        multi-monitor<br>
        &gt; 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">&gt; If you want
        multi-seat, you generally have to launch a separate Xorg<br>
        &gt; session for each seat, with effectively a different
        ServerLayout for<br>
        &gt; 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">&gt; The display
        origins are all at (0,0) as they behave a bit like two<br>
        &gt; independent computers (perhaps this is where the multi-seat
        confusion<br>
        &gt; is coming from).  However if you plug a mouse into the
        computer, you<br>
        &gt; will be able to move the cursor between both monitors which
        means it's<br>
        &gt; 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">&gt; In a true
        multi-seat set up, you would have to<br>
        &gt; configure the system to assign the mouse you plugged in to
        one<br>
        &gt; seat/monitor or the other, and you could not move it
        between both<br>
        &gt; 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">&gt; So one solution
        to your problem is to configure the system as a true<br>
        &gt; multi-seat system, with each monitor assigned to a
        different seat.  You<br>
        &gt; may however need to add a second video card to the system
        to do this, as<br>
        &gt; I cannot recall whether you can share a single video card
        between seats.<br>
        &gt; Certainly it was not the case in the past, and I am unsure
        whether this<br>
        &gt; 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">&gt; Alternatively,
        in this single-seat Zaphod mode, the screens are still<br>
        &gt; aligned so that the mouse cursor can glide from one monitor
        to the next,<br>
        &gt; so the second monitor will have an origin that is not (0,0)
        as far as<br>
        &gt; 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">&gt; Have you tried
        assuming the monitors are set up as a single Xorg<br>
        &gt; 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">&gt; If you left the
        transformation matrix alone for the left monitor, but<br>
        &gt; set the one on the right so that it was offset by 1920
        pixels<br>
        &gt; 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">&gt; I haven't
        actually tried this so I am only guessing, and of course the<br>
        &gt; exact transformation values would depend on the screen
        sizes and how<br>
        &gt; they are positioned relative to each other in xorg.conf,
        but it could<br>
        &gt; 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