2

I have both an internal and external display which I'd like to pass my cursor over. When I start the computer with the external connected, my display manager starts with the wrong DPI, and I have to execute these 4 commands to fix the dpi.

xrandr --output DP-2 --mode 1920x1200 --dpi 94
xrandr --output LVDS-1-0 --mode 1920x1080 --dpi 147
xrandr --output DP-2 --right-of LVDS-1-0 --dpi 94
xrandr --output DP-2 --primary

In this case, however, I can move my cursor across both monitors.

If instead I start without having the external monitor connected, there is no dpi issue, but when I run the above script to detect the external monitor, the mouse gets mapped to the area of the external display and I can't move it onto the internal display.

Is there some explicit option to specify the area the cursor has access to?

I also have a graphics tablet, which I map to just use the external display with the following script.

xsetwacom --set "Wacom Intuos5 touch L Pen stylus" MapToOutput "1920x1200+1920+0"
xsetwacom --set "Wacom Intuos5 touch L Pen eraser" MapToOutput "1920x1200+1920+0"
xsetwacom --set "Wacom Intuos5 touch L Pen cursor" MapToOutput "1920x1200+1920+0"
xsetwacom --set "Wacom Intuos5 touch L Pad pad" MapToOutput "1920x1200+1920+0"
xsetwacom --set "Wacom Intuos5 touch L Finger touch" MapToOutput "1920x1200+1920+0"

My xinput --list is

xinput --list
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech Performance MX                   id=10   [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=13   [slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                     id=15   [slave  pointer  (2)]
⎜   ↳ Wacom Intuos5 touch L Pen stylus          id=16   [slave  pointer  (2)]
⎜   ↳ Wacom Intuos5 touch L Pen eraser          id=17   [slave  pointer  (2)]
⎜   ↳ Wacom Intuos5 touch L Pen cursor          id=18   [slave  pointer  (2)]
⎜   ↳ Wacom Intuos5 touch L Finger touch        id=19   [slave  pointer  (2)]
⎜   ↳ Wacom Intuos5 touch L Pad pad             id=20   [slave  pointer  (2)]
⎜   ↳ Microsoft Natural® Ergonomic Keyboard 4000    id=21   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Video Bus                                 id=8    [slave  keyboard (3)]
    ↳ Sleep Button                              id=9    [slave  keyboard (3)]
    ↳ Integrated Camera                         id=11   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=12   [slave  keyboard (3)]
    ↳ ThinkPad Extra Buttons                    id=14   [slave  keyboard (3)]
    ↳ Microsoft Natural® Ergonomic Keyboard 4000    id=22   [slave  keyboard (3)]

My xrandr output has:

DP-2 connected primary 1920x1200+1920+0 (normal left inverted right x axis y axis) 520mm x 320mm
   1920x1200     59.95*+
   1920x1080     60.00  
   1680x1050     59.95  
   1600x1200     60.00  
   1280x1024     60.02  
   1280x960      60.00  
   1024x768      60.00  
   800x600       60.32  
   640x480       59.94  
 [...] 
LVDS-1-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
   1920x1080     60.00*+  50.00  
   1400x1050     59.98  
   1280x1024     60.02  
   1280x960      60.00  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   800x600       60.00    60.32    56.25  
   700x525       59.98  
   640x512       60.02  
   640x480       60.00    59.94  
   512x384       60.00  
   400x300       60.32    56.34  
   320x240       60.05  
  [...]

When I make window clicks following this question on the DP-2 monitor I see results like:

x:3158 y:1084 screen:0 window:16788951
x:3508 y:1076 screen:0 window:16788951
x:1920 y:740 screen:0 window:801
x:3193 y:986 screen:0 window:16788951
x:3345 y:1066 screen:0 window:16788951
x:3382 y:990 screen:0 window:16788951
x:3363 y:1055 screen:0 window:16788951
x:2806 y:983 screen:0 window:41943171
x:1941 y:48 screen:0 window:41943171
x:3466 y:1060 screen:0 window:16788951
x:3469 y:1117 screen:0 window:16788951

I am using the herbstluftwm window manager and I tell it my monitor configuration with

herbstclient set_monitors "1920x1080+0+0" "1920x1200+1920+0"

The configuration appears as:

$ hc detect_monitors -l
1920x1200+1920+0
1920x1080+0+0

I am using an nVidia graphics card with the nvidia driver on a thinkpad W520 laptop.

  • Running xrandr would normally not prevent the cursor moving between monitors. The circumstances that lead to the problem are not clear, because your description mixes observations about the working case and observations about the non-working case. Please edit your question to clarify the scenario in which the cursor gets stuck. Does it make a difference where the cursor is before running that sequence of commands? After which command does it get stuck? – Gilles Sep 15 '15 at 21:57
  • Updated. Hopefully now it is clear that the mouse is initially mapped to the internal display until the external monitor is detected. From then on, the cursor gets mapped onto the external monitor and can't go back to the internal. – wdkrnls Sep 16 '15 at 3:43
  • Have you observed the problem only while running this window manager, or also with other window managers? Is there a grab on the mouse pointer? – Gilles Sep 16 '15 at 8:06
  • I haven't. Can you recommend a window manager that is really easy to set up in order to test? – wdkrnls Sep 19 '15 at 20:00
  • With most distributions, you can just install any window manager package and pick it in the session list on the display manager. – Gilles Sep 19 '15 at 20:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.