mitchellh / nixos-config

My NixOS configurations.
https://twitter.com/mitchellh/status/1346136404682625024
MIT License
1.99k stars 191 forks source link

Multiple monitors #24

Open justinmoon opened 2 years ago

justinmoon commented 2 years ago

Thanks for sharing this awesome setup.

Has anyone tried using this with multiple monitors? When I follow these instructions I can get vmware fusion to mirror on 2 displays. When when I run xrandr inside the guest, I only see one display show up:

$ xrandr --query
Screen 0: minimum 320 x 200, current 3840 x 2160, maximum 8192 x 8192
Virtual-1 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768      60.00 +  60.00  
   3840x2400     59.97  
   3840x2160     59.97* 
   2880x1800     59.95  
   2560x1600     59.99  
   2560x1440     59.95  
   1920x1440     60.00  
   1856x1392     60.00  
   1792x1344     60.00  
   1920x1200     59.88  
   1920x1080     59.96  
   1600x1200     60.00  
   1680x1050     59.95  
   1400x1050     59.98  
   1280x1024     60.02  
   1440x900      59.89  
   1280x960      60.00  
   1360x768      60.02  
   1280x800      59.81  
   1152x864      75.00  
   1280x768      59.87  
   1280x720      59.86  
   800x600       60.32  
   640x480       59.94  

So to me it seems like linux doesn't know it is being mirrored on 2 monitors. So I'm stuck mirroring which doesn't help at all.

strobe commented 1 year ago

looks like in resent vmware fusion versions it works, I able to get additional monitors appears and they perfectly working for rendering but mouse input screwed. Mouse appears about 50-100pixels off across all displays which makes that still no usable.

justinmoon commented 3 months ago

I tried this again and was able to get both monitors working, but have same problem as @strobe where mouse doesn't click where it points. I'm using VMWare fusion. Wonder whether other platforms have this problem. How maybe it's an i3 bug?

justinmoon commented 3 months ago

Just resettings these "transformations" for xrandr and mouse pointers the cursors are almost right. Usable I think. With a little more tinkering might become perfect. At very least, dis-incentive from using the mouse!

# Sets external monitor above laptop, and resets transformations
xrandr --output Virtual-1 --mode 6880x2880 --pos 0x0 --transform 1,0,0,0,1,0,0,0,1 --output Virtual-2 --mode 3024x1890 --pos 1828x2880 --transform 1,0,0,0,1,0,0,0,1
# Reset mouse transformations
xinput set-prop 7 'Coordinate Transformation Matrix' 1 0 0 0 1 0 0 0 1
xinput set-prop 6 'Coordinate Transformation Matrix' 1 0 0 0 1 0 0 0 1