Problem mapping virtual screens to physical monitors
Posted: 7. Apr 2016, 19:26
I've got a VirtualBox 5.0.16 installation, with a Linux host and a Windows 7 guest. I've got three monitors hung off of one GPU, and X11 is working great. I can drag windows in Linux among my three monitors all day. I'll call the monitors Left, Middle, and Right.
The problem comes when I try to map VirtualBox virtual screens to the monitors. I'm getting a different mapping depending on whether I'm in Fullscreen mode or Seamless mode.
First, my setup. The virtual machine is set to have 3 monitors, with the maximum amount of video memory available.
Great. When I launch Windows and have VB in Fullscreen mode, the mapping is a bit odd. Even though I have Virtual Screen 1 mapped to Host Screen 1, Virtual Screen 2 mapped to Host Screen 2, and Virtual Screen 3 mapped to Host Screen 3, they show up in a 2-1-3 layout. To me, this means that Virtual Screen 1 is on Left, Virtual Screen 2 is on Middle, and Virtual Screen 3 is on Right. See these two screenshots for what Windows sees: Okay. Screens 1 and 2 seem swapped from what I think, but I can make it work. I've configured Windows to have display 2 on the Left, display 1 in the Middle, and display 3 on the Right. On-screen windows can be dragged around just fine and Windows appears happy.
The problem shows up when I flip to Seamless mode. When I do that, I get an odd layout of the Virtual screens. Sometimes both Virtual Screens 1 and 2 land on the Middle monitor. Other times they land in a 1-2-3 configuration. Virtual Screen 1 is now on Left, Virtual Screen 2 is in Middle, and Virtual Screen 3 is on the Right, just like I want. But I have to reconfigure Windows now! If I adjust the Windows mapping to make it work in Seamless mode, it's then screwed up again when I go back to Fullscreen mode. I can never get a mapping that stays consistent between Fullscreen and Seamless mode. And it's often overlapping.
Somehow, VirtualBox is not putting its X11 windows on the appropriate physical monitors. I can confirm this using xwininfo. Here is the VirtualBox X11 window mapping when I'm in Fullscreen mode:
Look at the geometry. VB is putting Virtual Screen 1 on Middle, Virtual Screen 2 on Left, and Virtual Screen 3 on Right. But this mapping isn't retained when I go to Seamless mode. Here's one of them:
Argh! Both Virtual Screen 1 and Virtual Screen 2 are on the Middle monitor, while Virtual Screen 3 is correctly on the right! I could use xwit to manually move the X11 windows around, I suppose, but this just feels like a broken application. Or maybe I'm doing something wrong with how VirtualBox thinks of my Virtual Screens.
Can anyone help me debug this? Does anyone have experience making VirtualBox play well with multiple Virtual Screens?
Thank you!
(Edit to fix formatting)
The problem comes when I try to map VirtualBox virtual screens to the monitors. I'm getting a different mapping depending on whether I'm in Fullscreen mode or Seamless mode.
First, my setup. The virtual machine is set to have 3 monitors, with the maximum amount of video memory available.
Great. When I launch Windows and have VB in Fullscreen mode, the mapping is a bit odd. Even though I have Virtual Screen 1 mapped to Host Screen 1, Virtual Screen 2 mapped to Host Screen 2, and Virtual Screen 3 mapped to Host Screen 3, they show up in a 2-1-3 layout. To me, this means that Virtual Screen 1 is on Left, Virtual Screen 2 is on Middle, and Virtual Screen 3 is on Right. See these two screenshots for what Windows sees: Okay. Screens 1 and 2 seem swapped from what I think, but I can make it work. I've configured Windows to have display 2 on the Left, display 1 in the Middle, and display 3 on the Right. On-screen windows can be dragged around just fine and Windows appears happy.
The problem shows up when I flip to Seamless mode. When I do that, I get an odd layout of the Virtual screens. Sometimes both Virtual Screens 1 and 2 land on the Middle monitor. Other times they land in a 1-2-3 configuration. Virtual Screen 1 is now on Left, Virtual Screen 2 is in Middle, and Virtual Screen 3 is on the Right, just like I want. But I have to reconfigure Windows now! If I adjust the Windows mapping to make it work in Seamless mode, it's then screwed up again when I go back to Fullscreen mode. I can never get a mapping that stays consistent between Fullscreen and Seamless mode. And it's often overlapping.
Somehow, VirtualBox is not putting its X11 windows on the appropriate physical monitors. I can confirm this using xwininfo. Here is the VirtualBox X11 window mapping when I'm in Fullscreen mode:
Code: Select all
% xwininfo -root -children | grep "VirtualBox :"
0x5a05d9a "Windows [Running] - Oracle VM VirtualBox : 1": ("VirtualBox" "VirtualBox") 1920x1200+1920+65 +1920+65
0x5a05e3a "Windows [Running] - Oracle VM VirtualBox : 3": ("VirtualBox" "VirtualBox") 1920x1080+3840+0 +3840+0
0x5a05dea "Windows [Running] - Oracle VM VirtualBox : 2": ("VirtualBox" "VirtualBox") 1920x1080+0+131 +0+131
Code: Select all
% xwininfo -root -children | grep "VirtualBox :"
0x5c00bfd "Windows [Running] - Oracle VM VirtualBox : 2": ("VirtualBox" "VirtualBox") 1920x1200+1920+65 +1920+65
0x5c00b9e "Windows [Running] - Oracle VM VirtualBox : 1": ("VirtualBox" "VirtualBox") 1920x1200+1920+65 +1920+65
0x5c00c5c "Windows [Running] - Oracle VM VirtualBox : 3": ("VirtualBox" "VirtualBox") 1719x1080+3840+0 +3840+0
Can anyone help me debug this? Does anyone have experience making VirtualBox play well with multiple Virtual Screens?
Thank you!
(Edit to fix formatting)