Solved Dual monitor, xorg , how to maximize to only one monitor instead of both

When I maximize the window maximizes to both monitors and not to only one monitor, which is not what I want
Relevant parts of my xorg.conf
Code:
Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" RightOf "Screen0"
EndSection
Section "Device"
    Identifier "Card0"
    Option "AccelMethod" "EXA"
    BusID "PC:1:0:0"
EndSection

Section "Screen"
    Identifier "Screen0"
    Device     "Card0"
    SubSection "Display"
        Viewport   0 0
        Depth     24
    EndSubSection
EndSection
Section "Screen"
    Identifier "Screen1"
    Device     "Card0
    SubSection "Display"
        Viewport   0 0
        Depth     24
    EndSubSection
EndSection

In .xinitrc
Code:
xrandr --output HDMI-1 --mode 1600x1000 --primary --output DVI-D-1 --mode 1600x900 --right-of HDMI-1
exec startlxde

Any advise ? Xinerama , twin view etc ...
 
You're running Xinerama (you can drag a window from one screen to the other). Xinerama turns your two screens into one single view. Twinview is only available on the NVidia driver as far as I know (it does the same thing as Xinerama). It's your window manager that's supposed to deal with this. Windows getting maximized over the entire (two) screens is a sign your window manager doesn't know how to deal with a multi-monitor setup.

 
Recently I have extended desktop without any xorg config file by default. Just start openbox from .xinitrc file. Move windows from one monitor to next (TV) by normal way and resize as required on active monitor.
 
openbox was uncapable to maximize to one screen, nor lxde , nor mate.
I'll try with explicit modelines in xorg.conf
 
I added manual modelines to xorg.conf.
Two only thing I got now is that the monitors currently refresh at the same refresh rate of 59.95Hz.
But the main problem remains.
Should I play with Viewport ?
On the first try with dwm a window is opened on the two screens.
 
As SirDice mentioned above, you're using Xinerama, if your window manager cannot handle it in the way you want, just disable it.
There used to be the following option, hopefully still works:
Code:
Option "Xinerama" "0"
either in "ServerFlags" or "ServerLayout" section, I haven't used it for long time.
 
Option "Xinerama" "0" in ServerLayout and windows still open to two screens. I give up :). Maybe it's something in radeonkms.ko
 
Actually there is another option described in Openbox wiki:
In order to have Openbox manage multiple X screens (this is not the same as multi-monitor TwinView or Xinerama), you need to run an instance of Openbox directly on each screen. We've put work into making Openbox work well with other instances of itself, for this type of configuration.

In order to run Openbox on two screens, use commands such as these:

# run openbox on the second screen (they start from 0)
DISPLAY=:0.1 openbox &
# by default openbox will run on the first screen (screen number 0)
exec openbox-session
Also they mention the feature «Moving maximized windows between monitors on Xinerama (TwinView) setups» here․
 
Mmh. Openbox does it for me. I have no screens configured via xorg and don't start a second openbox instance. How does your placement section in ~/.config/openbox/rc.xml look like?
I have
Code:
<placement>
    <policy>Smart</policy>
    <!-- 'Smart' or 'UnderMouse' -->
    <center>yes</center>
    <!-- whether to place windows in the center of the free area found or
       the top left corner -->
    <monitor>Primary</monitor>
    <!-- with Smart placement on a multi-monitor system, try to place new windows
       on: 'Any' - any monitor, 'Mouse' - where the mouse is, 'Active' - where
       the active window is, 'Primary' - only on the primary monitor -->
    <primaryMonitor>1</primaryMonitor>
    <!-- The monitor where Openbox should place popup dialogs such as the
       focus cycling popup, or the desktop switch popup.  It can be an index
       from 1, specifying a particular monitor.  Or it can be one of the
       following: 'Mouse' - where the mouse is, or
                  'Active' - where the active window is -->
  </placement>
and a window will be maximized only on one of the two monitors but I can move them manually .
Looks like this with vim maximized on the right
2020-04-18_13:30:57.png
 
The issue was solved using xfce4 instead of lxde.

My xorg.conf
Code:
Section "Files"
    ModulePath   "/usr/local/lib/xorg/modules"
    FontPath     "/usr/local/share/fonts/misc/"
    FontPath     "/usr/local/share/fonts/TTF/"
    FontPath     "/usr/local/share/fonts/OTF/"
    FontPath     "/usr/local/share/fonts/Type1/"
    FontPath     "/usr/local/share/fonts/100dpi/"
    FontPath     "/usr/local/share/fonts/75dpi/"
EndSection

Section "ServerLayout"
    Identifier     "Multihead"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" RightOf "Screen0"
    Option            "Xinerama" "0"
EndSection

Section "Monitor"
        Identifier "Monitor0"
        Option "DPMS"
EndSection

Section "Monitor"
        Identifier "Monitor1"
        Option "DPMS"
EndSection

Section "Device"
    Identifier "Card0"
    Option "AccelMethod" "EXA"
    BusID "PC:1:0:0"
    Screen 0
EndSection

Section "Device"
    Identifier "Card1"
    Option "AccelMethod" "EXA"
    BusID "PC:1:0:0"
    Screen 0
EndSection

Section "Screen"
    Identifier "Screen0"
    Device       "Card0"
    Monitor    "Monitor0"
    SubSection "Display"
        Depth     24
        Modes     "1680x1050"
    EndSubSection
EndSection

Section "Screen"
    Identifier "Screen1"
    Device     "Card1"
    Monitor    "Monitor1"
    SubSection "Display"
        Depth     24
        Modes     "1600x900"
    EndSubSection
EndSection
 
Does Option "AccelMethod" "UXA" not work for you? Or
Code:
Section "Module"
    load "glamoregl"
EndSection
Section "Device"
    [...]
    Option    "AccelMethod"    "glamor"
    [...]
EndSection
 
That works but gives lower fps with glxgears test. So I keep EXA.
The modeset with glamor was,
modeset(0): glamor X acceleration enabled on AMD CAICOS (DRM 2.50.0 / 12.1-RELEASE-p5, LLVM 8.0.1)
 
Back
Top