5

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.

wdkrnls
  • 457

0 Answers0