#598659 xmonad ignores xrandr --primary and assumes leftmost screen is the primary

Package:
xmonad
Source:
xmonad
Description:
Lightweight X11 window manager written in Haskell
Submitter:
Albin Stjerna
Date:
2010-10-02 08:45:03 UTC
Severity:
normal
#598659#5
Date:
2010-09-30 20:31:03 UTC
From:
To:
I've set up a virtual desktop on two screens with xrandr (see xorg.conf below). I've both tried setting the --primary flag manually with xrandr as well as in xorg.conf, and I've tried swapping connectors on the graphics card. GDM, Gnome and dwm all correctly recognize my right screen as the primary, but not xmonad. The only thing that works is using xrandr to set the right screen as the left using  xrandr --auto --output DFP2 --left-of DFP1, which of course means the computer thinks my right screen is actually my left. Setting things back with xrandr --auto --output DFP2 --right-of DFP1 does not help, so it is not a question of order of appearance, but, it seems, a matter of physical placement.

My xorg.conf:
Section "Monitor"
    Identifier      "Primary monitor"
#    Option          "Primary" "On"
EndSection

Section "Monitor"
    Identifier      "Secondary monitor"
    Option          "RightOf" "Primary monitor"
    Option          "Primary" "On"
#    Option          "Primary"   "Off"
EndSection



Section "Device"
	Identifier  "radeon"
	Driver      "fglrx"
	BusID       "PCI:1:0:0"
        Option "Monitor-DFP1" "Primary monitor"
        Option "Monitor-DFP2" "Secondary monitor"
EndSection

Section "Screen"
    Identifier      "Default Screen"
    Device          "radeon"
    DefaultDepth    24
    SubSection "Display"
        Depth           24
        # big virtual screen to place
	Virtual 3000 1200
       # Virtual         2560 1024
    EndSubSection
EndSection
Section "ServerLayout"
        Identifier      "Default Layout"
        Screen          "Default Screen"
EndSection

My ~/.xmonad/xmonad.hs:
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
import qualified Data.Map as M
import qualified XMonad.StackSet as W
import XMonad.Layout.NoBorders
import XMonad.Layout.IndependentScreens
import XMonad
import XMonad.Actions.UpdatePointer
main = do
    xmproc <- spawnPipe "/usr/bin/xmobar /home/albin/.xmonad/xmobarrc.hs"
    xmonad $ defaultConfig {
      manageHook = manageDocks <+> manageHook defaultConfig <+> composeOne [
         isKDETrayWindow -?> doIgnore
         , transience
         , isFullscreen -?> doFullFloat
         , resource =? "stalonetray" -?> doIgnore
         , className =? "Emacs" -?> doShift "emacs"
         , className =? "Conkeror" -?> doShift "web"
         , className =? "MPlayer" -?> doFullFloat
         ]
      -- manageHook = composeAll 
      --              [ 
      --                className =? "Emacs" -?> doShift "emacs"
      --              , className =? "Conkeror" -?> doShift "web"
      --              , className =? "MPlayer" -?> doFullFloat
      --              , className =? "MPlayer"        --> doFloat
      --              , className =? "Gimp"           --> doFloat
      --              , resource  =? "desktop_window" --> doIgnore
      --              , resource  =? "kdesktop"       --> doIgnore ]


      , layoutHook = avoidStruts  $ smartBorders $ layoutHook defaultConfig
      , logHook = dynamicLogWithPP $ xmobarPP
                                             { ppOutput = hPutStrLn xmproc
                                             , ppTitle = xmobarColor "green" "" . shorten 50
                                             }

#598659#10
Date:
2010-09-30 21:12:48 UTC
From:
To:
Hi,

Am Donnerstag, den 30.09.2010, 22:31 +0200 schrieb Albin Stjerna:

just wondering: What do you mean with „xmonad recognizes the screen as
primary“? That Meta-A does switch to it? In that case an easy fix would
be to change the order of the keys in the line
        | (key, sc) <- zip [xK_a, xK_o, xK_e]
of your xmonad.hs.

Is that sufficient for you?

Greetings,
Joachim

#598659#15
Date:
2010-10-01 06:15:31 UTC
From:
To:
Unfortunately not; what I mean is that focus is by default placed on the
left screen, menues and notifications are spawned there by default and
(most importantly) that's where xmobar is.

#598659#20
Date:
2010-10-02 08:33:14 UTC
From:
To:
Dear xmonad list,

a user of the xmonad package in Debian reports problems with
xmonad/xmobar and two screens, where the wrong screen seems to be used
as the primary screen. As I don’t have a dual screen setup myself, maybe
you can help Albin?

The full discussion so far can be read on http://bugs.debian.org/598659

Thanks,
Joachim

#598659#25
Date:
2010-10-02 08:41:41 UTC
From:
To:
Well, the xmobar problem appears to not be an actual xmonad issue.
However, the --primary bit seems to be something new in xrandr.