Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Nvidia/Xrandr/Xmonad spans screens [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
vputz
Guru
Guru


Joined: 16 Mar 2005
Posts: 310
Location: Oxford, England

PostPosted: Tue Dec 30, 2014 11:50 am    Post subject: Nvidia/Xrandr/Xmonad spans screens [solved] Reply with quote

**Fixed by getting rid of crappy crufty old xorg.conf, see my own reply

nvidia-drivers 343.36, xrandr 1.4.1, libxrandr 1.4.2, xmonad 0.11-r1

For a few years I've been using the nvidia binary driver and a very fussy xorg.conf with Xinerama to get multiple screens on my multimonitor setup (different resolutions on each screen, and xmonad views this as separate workspaces, which is what I want).

Well, I wanted to rotate one, and decided to try and sort through dropping Xinerama to use xrandr. But xmonad seems to view this as all one big virtual screen, which is NOT what I want.

Unfortunately, now I can't even get it working the old way any more, so I want to bull ahead. I'd like to avoid nouveau if I can.

So: xorg starts up with one monitor (my old 1680x1050) connected. I can connect the other one with

Code:
vputz@mert2129_2 ~ $ xrandr --output HDMI-0 --auto --right-of DVI-I-1


Now I have one big display:

Code:
vputz@mert2129_2 ~ $ xrandr -q
Screen 0: minimum 8 x 8, current 3600 x 1080, maximum 16384 x 16384
DVI-I-0 disconnected primary (normal left inverted right x axis y axis)
DVI-I-1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 434mm x 270mm
...


...but XMonad thinks it's one big 3600x1080 screen (the right screen is 1920x1080, so when I activate the right monitor, the virtual screen expands to fit both)

Crucial distinction: the MOUSE knows what's going on (in my "smaller" screen on the left I can't get the mouse to go below the bottom of the screen, and if it's on the right screen below the level of the left screen, it hits the "ledge" where there's a difference in resolution). But the window manager doesn't (apps spread across both screens, creating some "undisplayed" areas and making editing across the split very irritating).

Any ideas? Very oddly, xrandr knows of another screen:

Code:

vputz@mert2129_2 ~ $ xrandr --screen 1 -q
Screen 1: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
DP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 598mm x 336mm


Such that screen 0 has my DVI0/1, HDMI0, and DP0 connectors and screen 1 lists my DP1 connector. But I can't do anything with screen 1; it shows as blank and if I restrict screen0 to the small monitor, the mouse is "captured".

VERY frustrating. I still have a bit of a hideous xorg.conf (deleting it did not please the nvidia drivers), but I can't figure out how/what is safe to remove. Here's that awful thing, crufty from years:

Code:
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 304.64  (buildmeister@swio-display-x86-rhel47-12)  Tue Oct 30 12:04:34 PDT 2012

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 256.35  (buildmeister@builder97.nvidia.com)  Wed Jun 16 19:15:05 PDT 2010
# File generated by xorgconfig.
#
# Copyright 2004 The X.Org Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
# The X.Org Foundation BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# Except as contained in this notice, the name of The X.Org Foundation shall
# not be used in advertising or otherwise to promote the sale, use or other
# dealings in this Software without prior written authorization from
# The X.Org Foundation.
#
# **********************************************************************
# Refer to the xorg.conf(5x) man page for details about the format of
# this file.
# **********************************************************************
# **********************************************************************
# Module section -- this  section  is used to specify
# which dynamically loadable modules to load.
# **********************************************************************
#
# **********************************************************************
# Files section.  This allows default font and rgb paths to be set
# **********************************************************************
# **********************************************************************
# Server flags section.
# **********************************************************************
# **********************************************************************
# Input devices
# **********************************************************************
# **********************************************************************
# Core keyboard's Input
# **********************************************************************
# **********************************************************************
# Core Pointer's InputDevice section
# **********************************************************************
# **********************************************************************
# Other input device sections
# this is optional and is required only if you
# are using extended input devices.  This is for example only.  Refer
# to the xorg.conf man page for a description of the options.
# **********************************************************************
#
# Section "InputDevice"
#    Identifier  "Mouse2"
#    Driver      "mouse"
#    Option      "Protocol"      "MouseMan"
#    Option      "Device"        "/dev/mouse2"
# EndSection
#
# Section "InputDevice"
#    Identifier "spaceball"
#    Driver     "magellan"
#    Option     "Device"        "/dev/cua0"
# EndSection
#
# Section "InputDevice"
#    Identifier "spaceball2"
#    Driver     "spaceorb"
#    Option     "Device"        "/dev/cua0"
# EndSection
#
# Section "InputDevice"
#    Identifier "touchscreen0"
#    Driver     "microtouch"
#    Option     "Device"        "/dev/ttyS0"
#    Option     "MinX"          "1412"
#    Option     "MaxX"          "15184"
#    Option     "MinY"          "15372"
#    Option     "MaxY"          "1230"
#    Option     "ScreenNumber"  "0"
#    Option     "ReportingMode" "Scaled"
#    Option     "ButtonNumber"  "1"
#    Option     "SendCoreEvents"
# EndSection
#
# Section "InputDevice"
#    Identifier "touchscreen1"
#    Driver     "elo2300"
#    Option     "Device"        "/dev/ttyS0"
#    Option     "MinX"          "231"
#    Option     "MaxX"          "3868"
#    Option     "MinY"          "3858"
#    Option     "MaxY"          "272"
#    Option     "ScreenNumber"  "0"
#    Option     "ReportingMode" "Scaled"
#    Option     "ButtonThreshold"       "17"
#    Option     "ButtonNumber"  "1"
#    Option     "SendCoreEvents"
# EndSection
# **********************************************************************
# Monitor section
# **********************************************************************
# Any number of monitor sections may be present
# **********************************************************************
# Graphics device section
# **********************************************************************
# Any number of graphics device sections may be present
# Standard VGA Device:
# Device configured by xorgconfig:
# **********************************************************************
# Screen sections
# **********************************************************************
# Any number of screen sections may be present.  Each describes
# the configuration of a single screen.  A single specific screen section
# may be specified from the X server command line with the "-screen"
# option.
# **********************************************************************
# ServerLayout sections.
# **********************************************************************
# Any number of ServerLayout sections may be present.  Each describes
# the way multiple screens are organised.  A specific ServerLayout
# section may be specified from the X server command line with the
# "-layout" option.  In the absence of this, the first section is used.
# When now ServerLayout section is present, the first Screen section
# is used alone.
# Section "DRI"
#    Mode 0666
# EndSection
#Section "Device"
#    Identifier "Card0"
#    Driver "intel"
    #BusID "PCI:1:0:0"
#    Screen 0
#EndSection

Section "ServerLayout"

# The Identifier line must be present
# Each Screen line specifies a Screen section name, and optionally
# the relative position of other screens.  The four names after
# primary screen name are the screens to the top, bottom, left and right
# of the primary screen.  In this example, screen 2 is located to the
# right of screen 1.
# Each InputDevice line specifies an InputDevice section name and
# optionally some options to specify the way the device is to be
# used.  Those options include "CorePointer", "CoreKeyboard" and
# "SendCoreEvents".
# Removed Option "Xinerama" "1"
# Removed Option "Xinerama" "0"
    Identifier     "Simple Layout"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" 1680 0
    InputDevice    "Mouse1" "CorePointer"
    InputDevice    "Keyboard1" "CoreKeyboard"
    # uncommenting Xinerama allows xrandr, but I can't manage to get XMonad to play nice with
    # separate screens
    # Option         "Xinerama" "1"
EndSection

Section "Files"

# The location of the RGB database.  Note, this is the name of the
# file minus the extension (like ".txt" or ".db").  There is normally
# no need to change the default.
# Multiple FontPath entries are allowed (which are concatenated together),
# as well as specifying multiple comma-separated entries in one FontPath
# command (or a combination of both methods)
#
#
#    FontPath   "/usr/share/fonts/TTF"
#    FontPath   "/usr/lib/X11/fonts/local/"
#    FontPath   "/usr/lib/X11/fonts/misc/"
#    FontPath   "/usr/lib/X11/fonts/75dpi/:unscaled"
#    FontPath   "/usr/lib/X11/fonts/100dpi/:unscaled"
#    FontPath   "/usr/lib/X11/fonts/Speedo/"
#    FontPath   "/usr/lib/X11/fonts/Type1/"
#    FontPath   "/usr/lib/X11/fonts/TrueType/"
#    FontPath   "/usr/lib/X11/fonts/freefont/"
#    FontPath   "/usr/lib/X11/fonts/75dpi/"
#    FontPath   "/usr/lib/X11/fonts/100dpi/"
# The module search path.  The default path is shown here.
    FontPath        "/usr/share/fonts/misc"
    FontPath        "/usr/share/fonts/75dpi"
    FontPath        "/usr/share/fonts/100dpi"
    FontPath        "/usr/share/fonts/Type1"
EndSection

Section "Module"

# This loads the DBE extension module.
# This loads the miscellaneous extensions module, and disables
# initialisation of the XFree86-DGA extension within that module.
# This loads the font modules
#    Load        "type1"
#    Load        "speedo"
# This loads the GLX module
#    Load       "dri"
    Load           "dbe"     # Double buffer extension
    SubSection     "extmod"
        Option         "omit xfree86-dga"   # don't initialise the DGA extension
    EndSubSection
    Load           "freetype"
#    Load        "xtt"
    Load           "glx"
# This loads the DRI module
EndSection

Section "ServerFlags"

# Uncomment this to cause a core dump at the spot where a signal is
# received.  This may leave the console in an unusable state, but may
# provide a better stack trace in the core dump to aid in debugging
#    Option "NoTrapSignals"
# Uncomment this to disable the <Ctrl><Alt><Fn> VT switch sequence
# (where n is 1 through 12).  This allows clients to receive these key
# events.
#    Option "DontVTSwitch"
# Uncomment this to disable the <Ctrl><Alt><BS> server abort sequence
# This allows clients to receive this key event.
#    Option "DontZap"
# Uncomment this to disable the <Ctrl><Alt><KP_+>/<KP_-> mode switching
# sequences.  This allows clients to receive these key events.
#    Option "Dont Zoom"
# Uncomment this to disable tuning with the xvidtune client. With
# it the client can still run and fetch card and monitor attributes,
# but it will not be allowed to change them. If it tries it will
# receive a protocol error.
#    Option "DisableVidModeExtension"
# Uncomment this to enable the use of a non-local xvidtune client.
#    Option "AllowNonLocalXvidtune"
# Uncomment this to disable dynamically modifying the input device
# (mouse and keyboard) settings.
#    Option "DisableModInDev"
# Uncomment this to enable the use of a non-local client to
# change the keyboard or mouse settings (currently only xset).
#    Option "AllowNonLocalModInDev"
    Option         "Xinerama" "0"
EndSection

Section "InputDevice"

# For most OSs the protocol can be omitted (it defaults to "Standard").
# When using XQUEUE (only for SVR3 and SVR4, but not Solaris),
# uncomment the following line.
#    Option     "Protocol"      "Xqueue"
#    Option   "Xleds"      "1 2 3"
#    Option "LeftAlt"     "Meta"
#    Option "RightAlt"    "ModeShift"
# To customise the XKB settings to suit your keyboard, modify the
# lines below (which are the defaults).  For example, for a non-U.S.
# keyboard, you will probably want to use:
#    Option "XkbModel"    "pc105"
# If you have a US Microsoft Natural keyboard, you can use:
#    Option "XkbModel"    "microsoft"
#
# Then to change the language, change the Layout setting.
# For example, a german layout can be obtained with:
#    Option "XkbLayout"   "de"
# or:
#    Option "XkbLayout"   "de"
#    Option "XkbVariant"  "nodeadkeys"
#
# If you'd like to switch the positions of your capslock and
# control keys, use:
#    Option "XkbOptions"  "ctrl:swapcaps"
# These are the default XKB settings for Xorg
#    Option "XkbRules"    "xorg"
#    Option "XkbModel"    "pc105"
#    Option "XkbLayout"   "us"
#    Option "XkbVariant"  ""
#    Option "XkbOptions"  ""
#    Option "XkbDisable"
    Identifier     "Keyboard1"
    Driver         "kbd"
    Option         "AutoRepeat" "500 30"
# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
    Option         "XkbRules" "xorg"
    Option         "XkbModel" "pc101"
    Option         "XkbLayout" "us"
EndSection

Section "InputDevice"

# Identifier and driver
# the following line.
#    Option "Protocol"   "Xqueue"
# Mouse-speed setting for PS/2 mouse.
#    Option "Resolution"   "256"
# Baudrate and SampleRate are only for some Logitech mice. In
# almost every case these lines should be omitted.
#    Option "BaudRate"   "9600"
#    Option "SampleRate"   "150"
# Mouse wheel mapping.  Default is to map vertical wheel to buttons 4 & 5,
# horizontal wheel to buttons 6 & 7.   Change if your mouse has more than
# 3 buttons and you need to map the wheel to different button ids to avoid
# conflicts.
# Emulate3Timeout is the timeout in milliseconds (default is 50ms)
#    Option "Emulate3Buttons"
#    Option "Emulate3Timeout"    "50"
# ChordMiddle is an option for some 3-button Logitech mice
#    Option "ChordMiddle"
    Identifier     "Mouse1"
    Driver         "mouse"
    Option         "Protocol" "Auto"   # Auto detect
    Option         "Device" "/dev/input/mice"
# When using XQUEUE, comment out the above two lines, and uncomment
    Option         "ZAxisMapping" "4 5 6 7"
# Emulate3Buttons is an option for 2-button mice
EndSection

Section "Monitor"
    Identifier     "asus_big"
    Option         "Primary" "True"
EndSection

Section "Monitor"
    Identifier     "Dell"
    Option         "Primary" "False"
    Option         "LeftOf" "asus_big"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "Ancor Communications Inc ASUS VE278"
    HorizSync       24.0 - 92.0
    VertRefresh     50.0 - 85.0
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "DELL 2005FPW"
    HorizSync       30.0 - 83.0
    VertRefresh     56.0 - 75.0
EndSection

Section "Device"
    Identifier     "Card1"
    Driver         "nvidia"
    Option         "Rotate" "left"
    BusID          "PCI:3:0:0"
    Screen          1
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 660 Ti"
    BusID          "PCI:3:0:0"
    Option "RandRRotation" "on"
    Screen          1
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 660 Ti"
    Option      "RandRRotation" "on"
    BusID          "PCI:3:0:0"
    Screen          0
EndSection

Section "Screen"

    #Option "TwinView" "0"
    #Option "metamodes" "DFP-0: nvidia-auto-select +0+0"
# Removed Option "metamodes" "DFP-3: nvidia-auto-select +0+0; DFP-3: nvidia-auto-select +0+0; DFP-3: 1680x1050 +0+0; DFP-3: 1680x1050_60 +0+0; DFP-3: 1280x1024 +0+0; DFP-3: 1280x1024_75 +0+0; DFP-3: 1280x1024_60 +0+0; DFP-3: 1152x864 +0+0; DFP-3: 1152x864_75 +0+0; DFP-3: 1024x768 +0+0; DFP-3: 1024x768_75 +0+0; DFP-3: 1024x768_60 +0+0; DFP-3: 800x600 +0+0; DFP-3: 800x600_75 +0+0; DFP-3: 800x600_60 +0+0; DFP-3: 640x480 +0+0; DFP-3: 640x480_75 +0+0; DFP-3: 640x480_60 +0+0; DFP-3: nvidia-auto-select @1680x720 +0+0; DFP-3: nvidia-auto-select @1680x945 +0+0"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "metamodes" "DFP-3: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"

    #Option         "metamodes" "DFP-1: nvidia-auto-select +0+0"
    #Option "TwinView" "0"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "nvidiaXineramaInfoOrder" "DFP-4"
    Option         "Stereo" "0"
    Option         "metamodes" "DFP-4: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Extensions"
    Option "Composite" "enable"
    #Option         "Composite" "Disable"
EndSection


Many flail. Any ideas? I feel like this really should be possible.
Back to top
View user's profile Send private message
vputz
Guru
Guru


Joined: 16 Mar 2005
Posts: 310
Location: Oxford, England

PostPosted: Tue Dec 30, 2014 12:30 pm    Post subject: Reply with quote

Solved by deleting crufty crappy xorg.conf and generating a new one from nvidia-xconfig. The new shiny file is:

Code:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 343.36  (buildmeister@swio-display-x86-rhel47-09)  Mon Dec  1 16:47:14 PST 2014

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from data in "/etc/conf.d/gpm"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol"
    Option         "Device" "/dev/input/mice"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection


Xrandr works as it should and I feel moderately less like an idiot.

Sigh.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum