
I am trying to use xmonad on a laptop connected to two monitors, via VGA and HDMI outputs. Laptop screen is disabled and both external monitors configured using xrandr: xrandr --output LVDS1 --off xrandr --output HDMI-0 --right-of VGA1 xrandr --output VGA1 --right-of LVDS1 But mod+{w,e,r} does not work and the only way to have windows on one of my screens is to move floating window. Xinerama shows only right monitor: ghc -e "Graphics.X11.openDisplay [] >>= Graphics.X11.Xinerama.getScreenInfo" [Rectangle {rect_x = 1920, rect_y = 0, rect_width = 1920, rect_height = 1200}] Is it possible to somehow overwrite getScreenInfo for xmonad or configure Xinerama propertly? nvidia-setting can only see one screen and one display. xrandr output shows one huge 3840 x 1200 display and all screens: Screen 0: minimum 8 x 8, current 3840 x 1200, maximum 16384 x 16384 LVDS-0 disconnected primary (normal left inverted right x axis y axis) DP-0 disconnected (normal left inverted right x axis y axis) DP-1 disconnected (normal left inverted right x axis y axis) HDMI-0 connected 1920x1200+1920+0 (normal left inverted right x axis y axis) 518mm x 324mm 1920x1200 60.0*+ 1920x1080 60.0 1680x1050 60.0 1600x1200 60.0 1280x1024 60.0 1280x960 60.0 1024x768 60.0 800x600 60.3 640x480 59.9 DP-2 disconnected (normal left inverted right x axis y axis) DP-3 disconnected (normal left inverted right x axis y axis) LVDS1 connected 1600x900 60.0 + 40.0 1440x900 59.9 1360x768 59.8 60.0 1152x864 60.0 1024x768 60.0 800x600 60.3 56.2 640x480 59.9 VGA1 connected 1920x1200+0+0 518mm x 324mm 1920x1200 60.0*+ 1920x1080 60.0 1680x1050 60.0 1600x900 60.0 1280x1024 60.0 1440x900 59.9 1280x800 59.8 1280x720 60.0 1024x768 60.0 800x600 60.3 56.2 640x480 60.0 VIRTUAL1 disconnected 1024x768 (0x2ce) 65.0MHz h: width 1024 start 1048 end 1184 total 1344 skew 0 clock 48.4KHz v: height 768 start 771 end 777 total 806 clock 60.0Hz 800x600 (0x2cf) 40.0MHz h: width 800 start 840 end 968 total 1056 skew 0 clock 37.9KHz v: height 600 start 601 end 605 total 628 clock 60.3Hz 640x480 (0x2d0) 25.2MHz h: width 640 start 656 end 752 total 800 skew 0 clock 31.5KHz v: height 480 start 490 end 492 total 525 clock 59.9Hz 1920x1200 (0x2c8) 154.0MHz h: width 1920 start 1968 end 2000 total 2080 skew 0 clock 74.0KHz v: height 1200 start 1203 end 1209 total 1235 clock 60.0Hz 1680x1050 (0x2ca) 146.2MHz h: width 1680 start 1784 end 1960 total 2240 skew 0 clock 65.3KHz v: height 1050 start 1053 end 1059 total 1089 clock 60.0Hz 1280x1024 (0x2cc) 108.0MHz h: width 1280 start 1328 end 1440 total 1688 skew 0 clock 64.0KHz v: height 1024 start 1025 end 1028 total 1066 clock 60.0Hz Cheers, Yuriy

Hi Yuriy, I have a similar setup on my ThinkPad, but I use three monitors. What I do first, is disable all outputs (I had other kind of problems before): xrandr --output $left --off xrandr --output $right --off xrandr --output $primary --off xrandr --output $primary --auto xrandr --output $right --auto --left-of $primary xrandr --output $left --auto --left-of $right You press mod+shift+{w,e,r} to shift a window to another screen, don't you? I copied and adapted this key bindings from the default config for a different keyboard layout: -- mod-{i,a,e} %! Switch to physical/Xinerama screens 1, 2, or 3 -- mod-shift-{i,a,e} %! Move client to screen 1, 2, or 3 [ (mod ++ key, screenWorkspace sc >>= flip whenJust (windows . f)) | (key, sc) <- zip ["i", "a", "e"] [2, 0, 1] -- [0..] is weired! -- now middle finger (a) is primary (laptop) monitor, -- pointer finger (e) is second (external) monitor , (f, mod) <- [(W.view, "M-"), (W.shift, "M-S-")] ] My xrandr -q output looks similar to your's: Screen 0: minimum 8 x 8, current 5520 x 1080, maximum 32767 x 32767 eDP1 connected 1920x1080+3600+0 (normal left inverted right x axis y axis) 309mm x 173mm 1920x1080 60.05*+ 1400x1050 59.98 1600x900 60.00 1280x1024 60.02 1280x960 60.00 1368x768 60.00 1280x720 60.00 1024x768 60.00 1024x576 60.00 960x540 60.00 800x600 60.32 56.25 864x486 60.00 640x480 59.94 720x405 60.00 640x360 60.00 DP1 disconnected (normal left inverted right x axis y axis) DP2 connected 1680x1050+1920+0 (normal left inverted right x axis y axis) 474mm x 296mm 1680x1050 59.88*+ 59.95 1280x1024 75.02 60.02 1440x900 74.98 59.89 1280x960 60.00 1152x864 75.00 1024x768 75.08 60.00 832x624 74.55 800x600 75.00 60.32 56.25 640x480 75.00 60.00 720x400 70.08 HDMI1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 530mm x 300mm 1920x1080 60.00*+ 1600x1200 60.00 1680x1050 59.88 1280x1024 60.02 1440x900 59.90 1280x960 60.00 1280x800 59.91 1024x768 60.00 800x600 60.32 56.25 640x480 60.00 HDMI2 disconnected (normal left inverted right x axis y axis) VIRTUAL1 disconnected (normal left inverted right x axis y axis) Cheers, Jakob Am 06.06.2016 um 07:14 schrieb Yuriy Halytskyy:
I am trying to use xmonad on a laptop connected to two monitors, via VGA and HDMI outputs. Laptop screen is disabled and both external monitors configured using xrandr:
xrandr --output LVDS1 --off xrandr --output HDMI-0 --right-of VGA1 xrandr --output VGA1 --right-of LVDS1
But mod+{w,e,r} does not work and the only way to have windows on one of my screens is to move floating window. Xinerama shows only right monitor: ghc -e "Graphics.X11.openDisplay [] >>= Graphics.X11.Xinerama.getScreenInfo" [Rectangle {rect_x = 1920, rect_y = 0, rect_width = 1920, rect_height = 1200}]
Is it possible to somehow overwrite getScreenInfo for xmonad or configure Xinerama propertly?
nvidia-setting can only see one screen and one display. xrandr output shows one huge 3840 x 1200 display and all screens:
Screen 0: minimum 8 x 8, current 3840 x 1200, maximum 16384 x 16384 LVDS-0 disconnected primary (normal left inverted right x axis y axis) DP-0 disconnected (normal left inverted right x axis y axis) DP-1 disconnected (normal left inverted right x axis y axis) HDMI-0 connected 1920x1200+1920+0 (normal left inverted right x axis y axis) 518mm x 324mm 1920x1200 60.0*+ 1920x1080 60.0 1680x1050 60.0 1600x1200 60.0 1280x1024 60.0 1280x960 60.0 1024x768 60.0 800x600 60.3 640x480 59.9 DP-2 disconnected (normal left inverted right x axis y axis) DP-3 disconnected (normal left inverted right x axis y axis) LVDS1 connected 1600x900 60.0 + 40.0 1440x900 59.9 1360x768 59.8 60.0 1152x864 60.0 1024x768 60.0 800x600 60.3 56.2 640x480 59.9 VGA1 connected 1920x1200+0+0 518mm x 324mm 1920x1200 60.0*+ 1920x1080 60.0 1680x1050 60.0 1600x900 60.0 1280x1024 60.0 1440x900 59.9 1280x800 59.8 1280x720 60.0 1024x768 60.0 800x600 60.3 56.2 640x480 60.0 VIRTUAL1 disconnected 1024x768 (0x2ce) 65.0MHz h: width 1024 start 1048 end 1184 total 1344 skew 0 clock 48.4KHz v: height 768 start 771 end 777 total 806 clock 60.0Hz 800x600 (0x2cf) 40.0MHz h: width 800 start 840 end 968 total 1056 skew 0 clock 37.9KHz v: height 600 start 601 end 605 total 628 clock 60.3Hz 640x480 (0x2d0) 25.2MHz h: width 640 start 656 end 752 total 800 skew 0 clock 31.5KHz v: height 480 start 490 end 492 total 525 clock 59.9Hz 1920x1200 (0x2c8) 154.0MHz h: width 1920 start 1968 end 2000 total 2080 skew 0 clock 74.0KHz v: height 1200 start 1203 end 1209 total 1235 clock 60.0Hz 1680x1050 (0x2ca) 146.2MHz h: width 1680 start 1784 end 1960 total 2240 skew 0 clock 65.3KHz v: height 1050 start 1053 end 1059 total 1089 clock 60.0Hz 1280x1024 (0x2cc) 108.0MHz h: width 1280 start 1328 end 1440 total 1688 skew 0 clock 64.0KHz v: height 1024 start 1025 end 1028 total 1066 clock 60.0Hz
Cheers, Yuriy
_______________________________________________ xmonad mailing list xmonad@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad

OK, it kind of works with fake Xinerama library inserted via LD_PRELOAD.
cat ~/.fakexinerama
# 2 screens:
2
# VGA display
0 0 1920 1200
# External LCD screen "HDMI1":
1920 0 1920 1200
ghc -e "Graphics.X11.openDisplay [] >>=
Graphics.X11.Xinerama.getScreenInfo"
[Rectangle {rect_x = 0, rect_y = 0, rect_width = 1920, rect_height =
1200},Rectangle {rect_x = 1920, rect_y = 0, rect_width = 1920, rect_height
= 1200}
Would be good if this ugly hack was unnecessary.
Cheers,
Yuriy
On Mon, Jun 6, 2016 at 5:14 PM, Yuriy Halytskyy
I am trying to use xmonad on a laptop connected to two monitors, via VGA and HDMI outputs. Laptop screen is disabled and both external monitors configured using xrandr:
xrandr --output LVDS1 --off xrandr --output HDMI-0 --right-of VGA1 xrandr --output VGA1 --right-of LVDS1
But mod+{w,e,r} does not work and the only way to have windows on one of my screens is to move floating window. Xinerama shows only right monitor: ghc -e "Graphics.X11.openDisplay [] >>= Graphics.X11.Xinerama.getScreenInfo" [Rectangle {rect_x = 1920, rect_y = 0, rect_width = 1920, rect_height = 1200}]
Is it possible to somehow overwrite getScreenInfo for xmonad or configure Xinerama propertly?
nvidia-setting can only see one screen and one display. xrandr output shows one huge 3840 x 1200 display and all screens:
Screen 0: minimum 8 x 8, current 3840 x 1200, maximum 16384 x 16384 LVDS-0 disconnected primary (normal left inverted right x axis y axis) DP-0 disconnected (normal left inverted right x axis y axis) DP-1 disconnected (normal left inverted right x axis y axis) HDMI-0 connected 1920x1200+1920+0 (normal left inverted right x axis y axis) 518mm x 324mm 1920x1200 60.0*+ 1920x1080 60.0 1680x1050 60.0 1600x1200 60.0 1280x1024 60.0 1280x960 60.0 1024x768 60.0 800x600 60.3 640x480 59.9 DP-2 disconnected (normal left inverted right x axis y axis) DP-3 disconnected (normal left inverted right x axis y axis) LVDS1 connected 1600x900 60.0 + 40.0 1440x900 59.9 1360x768 59.8 60.0 1152x864 60.0 1024x768 60.0 800x600 60.3 56.2 640x480 59.9 VGA1 connected 1920x1200+0+0 518mm x 324mm 1920x1200 60.0*+ 1920x1080 60.0 1680x1050 60.0 1600x900 60.0 1280x1024 60.0 1440x900 59.9 1280x800 59.8 1280x720 60.0 1024x768 60.0 800x600 60.3 56.2 640x480 60.0 VIRTUAL1 disconnected 1024x768 (0x2ce) 65.0MHz h: width 1024 start 1048 end 1184 total 1344 skew 0 clock 48.4KHz v: height 768 start 771 end 777 total 806 clock 60.0Hz 800x600 (0x2cf) 40.0MHz h: width 800 start 840 end 968 total 1056 skew 0 clock 37.9KHz v: height 600 start 601 end 605 total 628 clock 60.3Hz 640x480 (0x2d0) 25.2MHz h: width 640 start 656 end 752 total 800 skew 0 clock 31.5KHz v: height 480 start 490 end 492 total 525 clock 59.9Hz 1920x1200 (0x2c8) 154.0MHz h: width 1920 start 1968 end 2000 total 2080 skew 0 clock 74.0KHz v: height 1200 start 1203 end 1209 total 1235 clock 60.0Hz 1680x1050 (0x2ca) 146.2MHz h: width 1680 start 1784 end 1960 total 2240 skew 0 clock 65.3KHz v: height 1050 start 1053 end 1059 total 1089 clock 60.0Hz 1280x1024 (0x2cc) 108.0MHz h: width 1280 start 1328 end 1440 total 1688 skew 0 clock 64.0KHz v: height 1024 start 1025 end 1028 total 1066 clock 60.0Hz
Cheers, Yuriy

On Mon, Jun 6, 2016 at 1:14 AM, Yuriy Halytskyy
I am trying to use xmonad on a laptop connected to two monitors, via VGA and HDMI outputs. Laptop screen is disabled and both external monitors configured using xrandr:
What does "xmonad --verbose -version" say? If you are running a distribution package (e.g. via yum or apt-get) or you built it without the Xinerama developer libraries installed, it won't be using Xinerama. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

$ xmonad --verbose -version xmonad: user error (unrecognized flags $ xmonad --version xmonad 0.11 It is installed via apt but xinerama is supported (?): $ ghc -e Graphics.X11.Xinerama.compiledWithXinerama True Cheers, Yuriy

On Mon, Jun 6, 2016 at 5:21 PM, Yuriy Halytskyy
$ xmonad --verbose -version
Not sure if I typoed or you misread, but that is all one option: --verbose-version without a space. pyanfar Z$ xmonad --verbose-version xmonad 0.12 compiled by ghc 7.10 for x86_64-linux Xinerama: True -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

$ xmonad --verbose-version
xmonad 0.11 compiled by ghc 7.6 for x86_64-linux
Xinerama: True
On Tue, Jun 7, 2016 at 9:23 AM, Brandon Allbery
On Mon, Jun 6, 2016 at 5:21 PM, Yuriy Halytskyy
wrote:
$ xmonad --verbose -version
Not sure if I typoed or you misread, but that is all one option: --verbose-version without a space.
pyanfar Z$ xmonad --verbose-version xmonad 0.12 compiled by ghc 7.10 for x86_64-linux Xinerama: True
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

So I just looked back at your original message and saw
nvidia-setting can only see one screen and one display.
If NVidia's driver is only reporting one screen, that's all we or any other
program will see. I think you'll need to figure out how to get this
reported correctly.
On Mon, Jun 6, 2016 at 5:26 PM, Yuriy Halytskyy
$ xmonad --verbose-version xmonad 0.11 compiled by ghc 7.6 for x86_64-linux Xinerama: True
On Tue, Jun 7, 2016 at 9:23 AM, Brandon Allbery
wrote: On Mon, Jun 6, 2016 at 5:21 PM, Yuriy Halytskyy < yuriy.halytskyy@gmail.com> wrote:
$ xmonad --verbose -version
Not sure if I typoed or you misread, but that is all one option: --verbose-version without a space.
pyanfar Z$ xmonad --verbose-version xmonad 0.12 compiled by ghc 7.10 for x86_64-linux Xinerama: True
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

It is not that xmonad does not see the screen, I can move floating windows
to it. It could be xorg.conf problem but xrandr works OK, and everything I
read says xinerama is an "old" way of doing things.
Is it possible to tell xmonad explicitly about my screen arrangement in the
config bypassing xinerama? Or at least set LD_PRELOAD for it, as the
command launches ~/.xmonad/xmonad-x86_64-linux so variable setting does not
work. At the moment I use /etc/ld.so.preload which is terrible.
On Tue, Jun 7, 2016 at 9:30 AM, Brandon Allbery
So I just looked back at your original message and saw
nvidia-setting can only see one screen and one display.
If NVidia's driver is only reporting one screen, that's all we or any other program will see. I think you'll need to figure out how to get this reported correctly.
On Mon, Jun 6, 2016 at 5:26 PM, Yuriy Halytskyy
wrote:
$ xmonad --verbose-version xmonad 0.11 compiled by ghc 7.6 for x86_64-linux Xinerama: True
On Tue, Jun 7, 2016 at 9:23 AM, Brandon Allbery
wrote: On Mon, Jun 6, 2016 at 5:21 PM, Yuriy Halytskyy < yuriy.halytskyy@gmail.com> wrote:
$ xmonad --verbose -version
Not sure if I typoed or you misread, but that is all one option: --verbose-version without a space.
pyanfar Z$ xmonad --verbose-version xmonad 0.12 compiled by ghc 7.10 for x86_64-linux Xinerama: True
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

On Mon, Jun 6, 2016 at 5:43 PM, Yuriy Halytskyy
everything I read says xinerama is an "old" way of doing things
Everything you read is partially wrong. Xinerama consisted of a low level protocol for carving up the root window into screens, and a high level multiple monitor protocol. The high level support was removed in favor of XRandR. ALL existing multiple monitor support, except for "zaphod mode" which you almost certainly do not want, absolutely requires the low level Xinerama component. This includes but is not limited to XRandR, which xmonad uses for multiple monitor support. It still lives in libXinerama, all the API calls are named for it, etc. It causes remarkable amounts of confusion. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
participants (3)
-
Brandon Allbery
-
Jakob Schöttl
-
Yuriy Halytskyy