No Host Display After GPU Passthrough - virtual-machine

I am attempting to set up a GPU passthrough to use in a VM on my system. I am using Ubuntu 17.04 and have followed the instructions in the following link successfully after manually blacklisting the nouveau drivers.
https://medium.com/#calerogers/gpu-virtualization-with-kvm-qemu-63ca98a6a172
When I turn the host system on, I see the Ubuntu boot splash, but then the screen goes black and nothing is displayed. I can ssh into the system and see that the Nvidia GPU is correctly assigned to vfio-pci (as expected). I have not tested that the passthrough works on a VM yet, since I would like to get my host graphics working with the integrated Intel graphics first.
I have tried xrandr, but it says that it can't open the display. I'm expecting that there is something specific I have to do to enable the integrated graphics for the host. Any suggestions?
System:
ASRocks Z77 EXTREME4
Intel i7-4790K
Nvidia GTX 650 Ti
Thank you for your help!

I have figured out the problem and decided not to delete the post, for anyone who this might find this helpful.
By changing the primary graphics in my BIOS from auto (which automatically chooses the Nvidia card) to integrated, everything now works exactly as expected.

Related

Is it possible to have different dev VM environments and access graphics card?

What I want to do on my laptop:
Develop and Run on windows with Visual Studio (CUDA, TensorRT,...)
Develop and Run on Linux (CUDA, TensorRT,...)
Environment to edit videos, photoshop,...
Play games
Environment for general use (web browser, outlook, word,...)
Environment to test applications
Possibly connecting some external GPU to offload the work (cuda,...) from my laptop's graphics card. Since I'm new to this, I haven't researched enough to understand how it can be done. But, this is in my plans.
What I did and reaserched:
As a start, I created VM environements in my host Windows OS using VirtualBox for #1 and #2, but I cannot run inside VM, since it doesn't provide access to graphics card. Even if it did, I still need somehow to switch to a different environment when I want to play games for example.
I probably need hypervisor type 1 if I want to have environment to play games? But, in this case I'll need a second laptop to access it, right?
Is this even possible to do on one laptop (I have strong laptop with enough RAM and SSD)
Graphics cards (GPU) are PCI devices, so they can be passed to VMs with PCI Passthrough. A device is not accessible to the host during passthrough. Hot plug can be used to reattach a graphics card to a different VM or the host without rebooting.
I don't know if a Windows host supports GPU passthrough (maybe you need Windows Server), but Linux host and Windows guest seems to work.
Setting this up is easier if you have a second GPU that remains attached to the host or another computer to control the host during GPU passthrough, for example via SSH.

How to passthrough an usb hub to a vm (based on kvm)?

linux kernel 4.9.7
libvirt 2.4.0
qemu 2.7.0
HOST:
i7 6700
ASUS B250M-PLUS
2xGTX1060 3GB
500Wpower
1x PCIEtoUSB3.0 card (Reneses chip)
I have two VMs using different GPU
I'm using usb controller passthrough now
VM1 has motherboard controller
VM2 has the PCIE CARD
BUT!!!!!!it is instability!!!!!
mouse and keyboard will be no use sometimes
so i am thinking about passthrough usb hub to be stable
is there any way to do it
this question is interesting. But you should provide more infos about the problem, how you started the machine, what precisel is working and what not.
Btw, use some more time to format your question...
Maybe you background is, that it is dificult and mayby impossible to passthrough an hub to a vom using the normal QEMU VID/PID combination. You can probably show the VM the hub, but all devcices connected to it are still owned by the host.^^
The only way I see is to pass through your nice PCIe USB3.0 controller to your desired VM. You need to enable the IOMMU feature in Grub for KVM to do so. But then it will work.

genymotion stays on black screen when loading emulator

When i start a new virtual device with genymotion sometimes it will get stuck on the black screen and not load. Sometimes it will work especially just after a restart, otherwise it will hang on the black screen and become unusable.
If the emulator freezes or crashes this is likely due to incompatability with your video card driver.
If however it just hangs on the black screen, this can be due to two reasons:
Your Firewall or other program is blocking genymotion
If this is likely the case then try disconnecting any vpn services or other software which could be hindering this, and ensuring that genymotion is able to connect to the virtual device over the local network.
If you have a firewall, make sure that you allowed connections to the Genymotion network, set to 192.168.56.0/24 by default.
Your network adaptor is misconfigured
If this is the case you should try the following
Run VirtualBox.
Open File > Preferences > Network (or VirtualBox > Preferences for Mac OS X).
Edit the Host-only Network by clicking .
Check that the adapter IPv4 address is in the same network (192.168.56.0/24 by default) as the DHCP server address, lower address bound and upper address bound. If not, your virtual device cannot start.
You can also remove the Host-only Network by clicking . Genymotion will automatically recreate it at the next virtual device start.
I had this problem in Windows 10 after I updated to VirtualBox 6.0.4 and Genymotion 3.0.1. I am using 2nd generation core i5 cpu (i5 2400). Update to this graphics card is not available. According to the official documentation:
Your graphics card no longer matches Genymotion requirements. Please see https://www.genymotion.com/help/desktop/faq/#supported-graphics-cards.
If you are using a dual graphics card laptop (e.g. Intel/Nvidia or Intel/AMD), make sure you are using the most recent/powerful one.
https://www.genymotion.com/help/desktop/faq/#virtual-device-window-empty
Only solution to my problem was keep the VirtualBox 6.0.4 but downgrade genymotion to 2.12.2 version because my graphics cards is no longer supported and only supported intel graphics card is intel hd graphics 4000 generation. Link to Genymotion 2.12.2 is below:
https://dl.genymotion.com/releases/genymotion-2.12.2/genymotion-2.12.2.exe
Following the below steps solved the issue for me.
Open Windows Settings > Network & Internet > Change adapter options
Right-click on VirtualBox Host-Only Ethernet Adapter
Select Disable
Right-click on the VirtualBox Host-Only Ethernet Adapter again and Select Enable
Press power button doesn't start until then they will stuck on android logo screen then restart
I had the same problem in Windows. updating the video card driver solved the issue.
Genymotion 3.0.1
VirtualBox 6.0.4
I solved the issue in 2 steps:
Check the Android API versions installed on your system from \SDK\platforms directory.
Create New AVD using available Android versions only.
You need to check 4 different things:
proxy connections to be off( Gennymotion/setting/Network)
SDK be set( Gennymotion/ABD/SDK)
Graphic card driver be successfully installed
Virtual box installed and working correctly
Try again please. hope you will fix it easily.

Raspberry Pi2 IoT no HDMI output

I have had Win 10 IoT Core running on a Raspberry Pi2, it was working fine, I had ported across my signage software, and all good, then the hdmi port stopped working ? my monitor just says no output, and goes into sleep mode. the Pi is running as I can assess it via the web portal, I can still deploy my application to it, and it says its running, but nothing been displayed.
I know that when using Linux there is a config file that you can modify, but what do you do with windows version ?
you have the configuration file for Windows too. check in the root of SD card. refer https://www.raspberrypi.org/forums/viewtopic.php?t=5851. You can try setting (this forces the board to use DVI mode instead of HDMI)
hdmi_group=2 # forces DVI timing to be used
It might also be due to low power input to the RP2, which could cause HTMI to not work. Try using USB3 or 1.5A~2.0A/ 5V adapter.
Ensure that you are running headed mode and not switched to headless by mistake. Details here: https://ms-iot.github.io/content/en-US/win10/HeadlessMode.htm
he display.

USB device detection problems: using Compact Flash card reader and QNX (Virtual Machine)

First of all, there's a similar thread on OpenQNX posted years ago but the solutions don't really apply for me.
Having said that, I want to create an OS image of QNX 6.6.0 to put on a Compact Flash card. This card is plugged in an USB adapter which is connected to my host pc. I'm running Neutrino in a VM (VMware/VirtualBox) for which I enabled USB support. Generally, the adapter works fine under Win (current host) and Linux.
The (apparently out-dated) tutorial I was following stated to search for devices named umass* or hd* after connecting the USB adapter. But there aren't any (except for hd0).
See also "ls /dev" screenshot.
The processes devb-umass and io-usb are running. So I expect that the adapter is detected automatically.
Any suggestions what went wrong?
OK, it seems that I had to restart the usb driver 'devb-umass' (several times). When the card reader is already plugged-in during the booting the driver will not detect it autoamtically. Thus one has to unplug and plug it in again after the devb-umass was getting re-started. It also might have been that the Host Controller Driver (HCD) was set to 'ohci' instead of 'ehci'.
Everything is working now as expected.
(Thanks Tim from the OpenQNX forum! ;) )