[vfio-users] Nvidia Code 43 on Fedora 24 host and Windows 10 guest.

Thomas Lindroth thomas.lindroth at gmail.com
Thu Oct 6 16:44:33 UTC 2016


On 10/06/2016 05:53 PM, Rokas Kupstys wrote:
> Hey could you share /home/cocobo/scripts/single_head and
> /home/cocobo/scripts/dual_head scripts? They sound very interesting if
> they are what i think they are.

They are probably not as interesting as you think.

single_head:
#!/bin/bash
# use xwininfo for geometry
xrandr --output DP1 --off
xdotool search --onlyvisible "Mozilla Firefox" windowmove 326 54
xdotool search --onlyvisible "Mozilla Firefox" windowsize 1350 1010
xdotool search --onlyvisible "Konsole" windowmove 86 54
xdotool search --onlyvisible "Konsole" windowsize 922 1142
xdotool search --onlyvisible "Konversation" windowmove 1016 54
xdotool search --onlyvisible "Konversation" windowsize 900 1142
xdotool search --onlyvisible "gkrellm" windowmove 0 30

dual_head:
#!/bin/bash
# use xwininfo for geometry
xrandr --output DP1 --auto --primary --output HDMI2 --auto --right-of DP1
xdotool search --onlyvisible "Mozilla Firefox" windowmove 383 54
xdotool search --onlyvisible "Mozilla Firefox" windowsize 1350 1142
xdotool search --onlyvisible "Konsole" windowmove 0 54
xdotool search --onlyvisible "Konsole" windowsize 950 1142
xdotool search --onlyvisible "Konversation" windowmove 2936 24
xdotool search --onlyvisible "Konversation" windowsize 900 1172
xdotool search --onlyvisible "gkrellm" windowmove 1920 0


I connect both the host and guest graphic cards to my main monitor.
When the host disable the main monitor with the single_head script the
monitor looks for other signals and switch the the guest automatically.
When the VM shuts down the monitor switch back to the host.

The linux desktop have an annoying habit of moving all windows around
when the virtual desktop size change and keep the new position when
the size change back. I eventually created those scripts to move my
regular programs to hardcoded locations. Perhaps one day we will have
windows manager that won't fuck up the desktop every time a monitor is
hotplugged but until then I use those scripts.




More information about the vfio-users mailing list