LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   Using two screens. Can someone explain this geometrical puzzle? (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/using-two-screens-can-someone-explain-this-geometrical-puzzle-4175641571/)

hazel 11-01-2018 07:00 AM

Using two screens. Can someone explain this geometrical puzzle?
 
I don't much like the screen on my laptop so I plugged in a monitor. Now I have nice bright colours instead of drab ones. But of course the monitor screen has a different aspect ratio from the laptop screen. It is much deeper.

I expected that the screen image on the monitor would be distorted, but it is not. What has happened instead is that the icewm panel appears about one third of the way up the screen and the wallpaper continues below it. I can move the mouse pointer into this lower area but, when I do, it disappears from the laptop screen completely. I can also drag a window so that its bottom is below the panel, and the laptop screen then shows the window as truncated.

What exactly is going on here? On my desktop machine, the monitor shows the panel at the bottom and I cannot move the mouse pointer below it; it just glides along the bottom.

business_kid 11-01-2018 12:24 PM

I researched this a while back. Write yourself a video.conf in /etc/X11/xorg.conf.d/ It has to have 4 xorg.conf sections:
  1. Section "ServerLayout"
  2. Section "Monitor" #as many as monitors
  3. Section "Device" #as many as monitors
  4. Section "Screen" #as many as monitors

Man xorg.conf gives all the help you want. I configured for a 1600x900 Laptop Screen, a 1920x1080 monitor on hdmi, a projector of 1280x720 on hdmi, and an unknown monitor on vga plug. All were used sometime. If you start X, it simply detects and configures what's there. Settings like "Position"(On a virtual screen) "RightOf", & "PreferredMode" made things easy.

We had a Streaming link to be shown to audiences in 6 languages over a weekend. 3 guys offered their pcs - one windows, one mac & me. Everyone had to use linux :-D. The sound was actually a worse headache.

hazel 11-01-2018 02:21 PM

I'm pretty sure I only have one video device. It's a Via Chrome chip running Openchrome. This isn't like those DIY setups where you start with a basic on-board chip and then slot in a high-end graphics card as an upgrade.

If I go your way, I shall probably just need two screen sections, each referencing a different monitor. I hope the Xorg log can tell me what the video modes are. I have zero knowledge about that sort of thing.

But I still don't understand why the external monitor gives me a different picture rather than just a distorted version of the same one.

business_kid 11-02-2018 06:23 AM

I only have one video device too, a good-for-little Intel HD4000. But it ran 1280x720 HDMI and 1600x900 and kept lip-synch on the meeting I mentioned, which was all I cared about. The "Device sections were identical
Code:

Section "Device"
    Identifier  "Card0"
    Driver      "intel"
    BusID      "PCI:0:2:0"
EndSection

Section "Device"
    Identifier  "Card1"
    Driver      "intel"
    BusID      "PCI:0:2:0"
EndSection

Section "Device"
    Identifier  "Card0"
    Driver      "intel"
    BusID      "PCI:0:2:0"
EndSection

BTW, I don't know how Card1 got in there. It wasn't fatal. You get the device numbers from 'lspci'

ondoho 11-03-2018 05:19 AM

Quote:

Originally Posted by hazel (Post 5921767)
I'm pretty sure I only have one video device. It's a Via Chrome chip running Openchrome.

what you're seeing could well be a limitation of this hardware/driver.

but, instead of messing around with xorg.conf, i'd try arandr.
install it, if you don't have already, and drag the screens around and change their resolutions until you have what you want, then apply, and save as a script for later use (autostart).

business_kid 11-04-2018 05:19 AM

hazel, I doubt if you'll need Modelines. X will choose them for you. That crap relates to Analogue Monitors with CRT tubes. Set Modes.

Set a "Position" for your laptop screen as 0,0. You can then set your other screen as 0,0 (to get the same) or as RightOf Screen0. It's that simple. The chrome chip may be ok.
https://www.phoronix.com/scan.php?pa...tem&px=MTM0MTI

I imagine it's in the same class as mine: good-for-little :-). But that might be good enough. I hardly imagine you're into Minecraft, or Dungeons & Dragons :-). Here's my main Monitor section
Code:

Section "Monitor"
    Identifier    "Main"
    VendorName    "Samsung"
    ModelName      "TFT_Display"
    HorizSync      30.0 - 75.0
    VertRefresh    50.0 - 90.0
    Option        "DPMS"
    Option  "Primary"
    Option "PreferredMode"  "1600x900"
    Option "Position" "0 0"
EndSection

The messy "Screen" one for me was the HDMI plug, which could do 1920x1080, or 1280x720. X would check & adjust accordingly. It's very forgiving of idiots, I discovered. By setting the Virtual wide, I effectively set "RightOf" also. Here's the trick Screen
Code:

Section "Screen"
    Identifier "Screen1"
    Device    "Card1"
    Monitor    "HDMI1"
    Option "Position" "1601 0"
    DefaultDepth    24
    SubSection    "Display"
        Depth      24
        Modes      "1280x720"
        Virtual  2880 720 
    EndSubSection 
    SubSection    "Display"
        Depth      24
        Modes      "1920x1080" "1600x900"
        Virtual  3520 1080
    EndSubSection
EndSection

One "Display" subsection handled the (now obsolete) projector. One handled the hdmi monitor. Each had it's own virtual setting. Setting the "Position at '1601, 0' put it right of my laptop screen. The (Primary)left screen had the Desktop, and I could boot X, log into the website (entering User & passsword) and then move it right. The audience saw none of that over the projector, only what I dragged over to the right.

The hardest basic test is does it lip synch a fullscreen movie with a lot going on in the background. The redrawing is a heavy load.

hazel 11-04-2018 12:31 PM

I've been playing about with arandr. By raising the internal screen to overlap the upper rather than the lower part of the vga screen, I could reproduce the odd position of the icewm panel on the latter. But that turned out to be a bad idea because it frequently caused the upper parts of windows to disappear. And of course without access to the title bar at the top of the window frame, you can't pull it back down again.

For the shallower internal screen, it obviously makes more sense to have maximum space above the panel rather than extra space below. But I still haven't had an answer to my original question: what is actually going on here? Does the "real" image generated by X have space below the panel (as shown by the vga monitor) or not? If the internal screen shows this real image, where does the extra space on the vga display (complete with wallpaper!) come from? Why isn't it just black? And if this is not real, how come the cursor disappears from view in the smaller screen when it moves into this nonexistent lower area?

ondoho 11-04-2018 01:42 PM

i might have misunderstood the situation; how many monitors do you have connected and active? 1 or 2?
are they both showing the same desktop, or are they side by side?
what is the output of
Code:

xrandr
???

hazel 11-05-2018 06:39 AM

Quote:

Originally Posted by ondoho (Post 5922773)
i might have misunderstood the situation; how many monitors do you have connected and active? 1 or 2?
are they both showing the same desktop, or are they side by side?

I have one flat screen monitor plugged into a vga port plus the laptop's internal screen. xrandr calls them VGA1 and LVDS1. In arandr, they overlap. Are you implying that if I moved one of them so that they didn't overlap, I would get a bigger desktop? How big does it get?
Quote:

what is the output of
Code:

xrandr
???
I'm on another machine at present but my recollection is that xrandr gives two entries for VGA1 and LVDS1 with different screen sizes.

hazel 11-05-2018 11:23 AM

Just checked it. When the screens are separated in arandr, they do indeed show separate desktops. I can move the cursor from one onto the other. I can get a desktop menu on the second desktop but any applications that I launch open on the primary desktop.

Here is the output from xrandr:
Code:

Screen 0: minimum 320 x 200, current 1280 x 1024, maximum 2048 x 2048
LVDS-1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 260mm x 170mm
  1280x800      60.00*+
VGA-1 connected primary 1280x1024+0+0 (normal left inverted right x axis y axis) 340mm x 270mm
  1280x1024    60.02*+  75.02 
  1024x768      75.03    60.00 
  800x600      75.00    60.32 
  640x480      75.00    59.94 
  720x400      70.08

As you can see, I have now switched the VGA monitor to be primary and consequently the panel appears at the bottom of this screen, not part way down. So far I haven't got it to apear on the LVDS screen at the same time but I'm working on it. (Yup! Got that now)

It looks like xorg makes an image that will cover the total non-overlapping screen area. Then the window manager (Icewm in this case) covers that area in wallpaper and adds the furniture. The panel goes at the bottom of whichever screen is primary.

ondoho 11-05-2018 10:59 PM

it is possible that different panels and windowmanagers handle these things differently.

business_kid 11-06-2018 04:15 AM

By setting the 2 screens as 'Position 0 0' you can have them display the same thing. I see your primary is 1280x1024. If you set the position of the other at '1281 0' you should eliminate the height difference.

hazel 11-06-2018 05:55 AM

Quote:

Originally Posted by business_kid (Post 5923298)
By setting the 2 screens as 'Position 0 0' you can have them display the same thing. I see your primary is 1280x1024. If you set the position of the other at '1281 0' you should eliminate the height difference.

Errm? If I set the position of the second screen as you suggest, I would get the two screens showing side-by-side images. But the LVDS screen (now the secondary screen) would still be different in height because that is a physical reality; it can't be wished away. And as it is shallower than the VGA screen, if I align the tops, the bottoms won't be aligned and the LVDS screen won't show the panel. I know because I tried that in yesterday's experiments.

To have the panel showing on both of them, I need to align the bottoms of the two screens, not the tops.

ondoho 11-07-2018 01:12 PM

Quote:

Originally Posted by hazel (Post 5923327)
To have the panel showing on both of them, I need to align the bottoms of the two screens, not the tops.

i think this is a limitation of the panel icewm uses.
unless you want this behaviour, you should check if icewm offers configuration to restrict the panel to 1 monitor.
i know that other panels (tint2) have this.


All times are GMT -5. The time now is 09:59 PM.