You are not logged in.
I dont know if this is the correct place to post this, but since aw (and perhaps others contributing to qemu etc) is here:
Fully updated qemu(not git, but qemu 2.1.0-2) and nvidia drivers in windows 340.52.
I cant use game optimization nor shadowplay since the only thing I lack is the CPU requirements. (However, I do have an i7 Haswell CPU, with kvm=off in my qemu settings)
Before I upgraded my qemu(and before using kvm=off) and before using the latest nvidia drivers, this worked fine.
In device manager, under processors - I can see "Intel Core Processor (Haswell), but I believe there should be standing something else here, but quite similar - so that the nvidia drivers "accept" me having the correct CPU?
Anyone else having the same issue? (PS: I dont use these features that often, however I'm somewhat pedantic about making things just right. Keep up the good work!).
Offline
I dont know if this is the correct place to post this, but since aw (and perhaps others contributing to qemu etc) is here:
Fully updated qemu(not git, but qemu 2.1.0-2) and nvidia drivers in windows 340.52.
I cant use game optimization nor shadowplay since the only thing I lack is the CPU requirements. (However, I do have an i7 Haswell CPU, with kvm=off in my qemu settings)Before I upgraded my qemu(and before using kvm=off) and before using the latest nvidia drivers, this worked fine.
In device manager, under processors - I can see "Intel Core Processor (Haswell), but I believe there should be standing something else here, but quite similar - so that the nvidia drivers "accept" me having the correct CPU?
Anyone else having the same issue? (PS: I dont use these features that often, however I'm somewhat pedantic about making things just right. Keep up the good work!).
How '-cpu ...' looks like? With '-cpu host,...' (host-passthrough if you're using libvirt) it should work fine.
Last edited by dwe11er (2014-08-15 11:14:32)
Offline
trimm wrote:I dont know if this is the correct place to post this, but since aw (and perhaps others contributing to qemu etc) is here:
Fully updated qemu(not git, but qemu 2.1.0-2) and nvidia drivers in windows 340.52.
I cant use game optimization nor shadowplay since the only thing I lack is the CPU requirements. (However, I do have an i7 Haswell CPU, with kvm=off in my qemu settings)Before I upgraded my qemu(and before using kvm=off) and before using the latest nvidia drivers, this worked fine.
In device manager, under processors - I can see "Intel Core Processor (Haswell), but I believe there should be standing something else here, but quite similar - so that the nvidia drivers "accept" me having the correct CPU?
Anyone else having the same issue? (PS: I dont use these features that often, however I'm somewhat pedantic about making things just right. Keep up the good work!).
How '-cpu ...' looks like? With'-cpu host,...' (host-passthrough if you're using libvirt) it should work fine.
Ah, stupid me!
I had -cpu Haswell instead of -cpu host in my script. Thanks.
Offline
I'm running into that silly code 43 error for Nvidia on Windows. Nvidia driver version: 340.52.
I'm using libvirt to run everything because my server is headless.
I'm using qemu-git and a vanilla kernel.
Following are my settings for a win8 vm:
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>win8</name>
<uuid>38176c7c-d25c-4cb0-aac5-107056c345f8</uuid>
<memory unit='KiB'>4194304</memory>
<currentMemory unit='KiB'>4194304</currentMemory>
<vcpu placement='static' current='1'>2</vcpu>
<os>
<type arch='x86_64' machine='pc-i440fx-2.1'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<cpu mode='host-model'>
<model fallback='allow'/>
</cpu>
<clock offset='localtime'>
<timer name='rtc' tickpolicy='catchup'/>
<timer name='pit' tickpolicy='delay'/>
<timer name='hpet' present='no'/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<pm>
<suspend-to-mem enabled='no'/>
<suspend-to-disk enabled='no'/>
</pm>
<devices>
<emulator>/usr/sbin/qemu-system-x86_64</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/mnt/zfs/vmpool/win8.qcow2'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/mnt/zfs/share/isos/en_windows_8_1_enterprise_x64_dvd_2971902.iso'/>
<target dev='hdb' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
<controller type='usb' index='0' model='ich9-ehci1'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x7'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci1'>
<master startport='0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci2'>
<master startport='2'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci3'>
<master startport='4'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<controller type='virtio-serial' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</controller>
<interface type='network'>
<mac address='52:54:00:90:71:8c'/>
<source network='default'/>
<model type='rtl8139'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<channel type='spicevmc'>
<target type='virtio' name='com.redhat.spice.0'/>
<address type='virtio-serial' controller='0' bus='0' port='1'/>
</channel>
<input type='tablet' bus='usb'/>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='spice' autoport='yes'/>
<sound model='ac97'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</sound>
<video>
<model type='qxl' ram='65536' vram='65536' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</source>
<rom bar='off'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
</hostdev>
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/>
</source>
<rom bar='off'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
</hostdev>
<redirdev bus='usb' type='spicevmc'>
</redirdev>
<redirdev bus='usb' type='spicevmc'>
</redirdev>
<redirdev bus='usb' type='spicevmc'>
</redirdev>
<redirdev bus='usb' type='spicevmc'>
</redirdev>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</memballoon>
</devices>
<qemu:commandline>
<qemu:arg value='-cpu'/>
<qemu:arg value='host,kvm=off'/>
</qemu:commandline>
</domain>
Did I miss something? Am I setting the qemu arg settings correctly? Does the video model type matter?
Last edited by Hspasta (2014-08-16 00:07:00)
Offline
I'm running into that silly code 43 error for Nvidia on Windows. Nvidia driver version: 340.52.
I don't have a solution but I had the same problem on Windows 7 x64 when downloading and installing the Nvidia drivers. When I use the drivers supplied through windows update (335.23) it works fine. Something to try.
Offline
<qemu:arg value='-cpu'/>
<qemu:arg value='host,kvm=off'/>
for 340+ nvidia drivers
edit... i saw u got this...
then u can't have spice (video QXL) i think... thats reason for error 43
Last edited by slis (2014-08-16 02:15:55)
Offline
Hi all,
with the help of this thread, I managed to create a gaming vm to play windows games while linux is running. Everything is working except for one aspect. I am not sure whether this is on topic here, but I don't know where to ask. Sorry for that.
I want to use only one keyboard and only one mouse to control both, the host and the windows guest. So far I have used synergy to share the host's mouse and keyboard with the vm. However, this is somewhat suboptimal since I cannot use all mouse buttons on the guest and because the mouse is not reacting very precisely. I guess it is okay for most use cases but not for gaming. One solution to this would be to give the mouse and keyboard to the vm and to run the synergy server in the guest to share the guest's controls with the host. However, when I try to run the synergy client on the host it is not able to connect to the synergy server on the guest (NOTE: connecting to '10.0.2.15': 10.0.2.15:24800 ... WARNING: failed to connect to server: Timed out). Is there any possibility to solve this?
My qemu command is:
qemu-system-x86_64 -enable-kvm -M q35 -m 8192 -cpu host \
-smp 6,sockets=1,cores=6,threads=1 \
-bios /usr/share/qemu/bios.bin -vga none \
-net nic -net user,smb=/home/xxxx \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on \
-device vfio-pci,host=01:00.1,bus=root.1,addr=00.1 \
-device virtio-scsi-pci,id=scsi \
-drive file=/mnt/vboxes/win_root.qcow2,id=disk,format=qcow2 -device scsi-hd,drive=disk \
-drive file=/mnt/vboxes/win_games.raw,id=disk2,format=raw -device scsi-hd,drive=disk2 \
-usb -usbdevice host:045e:0719 -usbdevice host:1e7d:2e22 \
-device ich9-intel-hda,bus=pcie.0,addr=1b.0,id=sound0 \
-device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0
Apart from synergy, I only use networking to provide the guest with Internet access and to share my home folder. Should I try one of the more sophisticated networking approaches (e.g., bridges)? Do you have any other suggestions?
Best k0ol
Offline
Apart from synergy, I only use networking to provide the guest with Internet access and to share my home folder. Should I try one of the more sophisticated networking approaches (e.g., bridges)? Do you have any other suggestions?
Best k0ol
imo, you really should try going for bridges
there was a link somewhere above (not more than few pages) for qemu/kvm networking wiki page
Offline
Sadly it doesn't work for me. I've followed all the instructions given by nbhs. I would really appreciate some help.
CPU: I5 4570
Mainboard: Asrock H97M Pro 4 / vt-d & vt-x enabled / onboard as primary / dual gpu disabled / UEFI mode
GPU: Asus R9 270
RAM: 16 GB DDR3
OS: Arch Linux / 3.16.0-1-mainline by nbhs (no changes have been made, except arch => core2 or newer)
qemu 2.1.0-2 / seabios 1.7.5-2
cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-linux-mainline root=UUID=9fb159a7-84b2-401b-a745-8199d3b0339c rw vfio_iommu_type1.allow_unsafe_interrupts=1 i915.enable_hd_vgaarb=1 pci-stub.ids=1002:6811,1002:aab0 resume=UUID=9416fa53-b808-4b96-bd92-6839effde5c5 quiet
cat /etc/modprobe.d/blacklist.conf
blacklist radeon
dmesg | grep pci-stub
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-linux-mainline root=UUID=9fb159a7-84b2-401b-a745-8199d3b0339c rw vfio_iommu_type1.allow_unsafe_interrupts=1 i915.enable_hd_vgaarb=1 pci-stub.ids=1002:6811,1002:aab0 resume=UUID=9416fa53-b808-4b96-bd92-6839effde5c5 quiet
[ 0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-linux-mainline root=UUID=9fb159a7-84b2-401b-a745-8199d3b0339c rw vfio_iommu_type1.allow_unsafe_interrupts=1 i915.enable_hd_vgaarb=1 pci-stub.ids=1002:6811,1002:aab0 resume=UUID=9416fa53-b808-4b96-bd92-6839effde5c5 quiet
[ 0.459556] pci-stub: add 1002:6811 sub=FFFFFFFF:FFFFFFFF cls=00000000/00000000
[ 0.459563] pci-stub 0000:01:00.0: claimed by stub
[ 0.459565] pci-stub: add 1002:AAB0 sub=FFFFFFFF:FFFFFFFF cls=00000000/00000000
[ 0.459581] pci-stub 0000:01:00.1: claimed by stub
lpsci -n (shortened)
01:00.0 0300: 1002:6811
01:00.1 0403: 1002:aab0
cat /etc/vfio-pci.cfg
DEVICES="0000:01:00.0 000:01:00.1"
When I enter this into my terminal ->
qemu-system-x86_64 -enable-kvm -M q35 -m 1024 -cpu host \
-smp 3,sockets=1,cores=3,threads=1 \
-bios /usr/share/qemu/bios.bin -vga none \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on \
-device vfio-pci,host=01:00.1,bus=root.1,addr=00.1
I get this error:
qemu-system-x86_64: -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: vfio: error no iommu_group for device
qemu-system-x86_64: -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: Device initialization failed.
qemu-system-x86_64: -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: Device 'vfio-pci' could not be initialized
Offline
@somearchfan
missing intel_iommu=on in cmdline ?
Offline
Thanks! It works now with "intel_iommu=on".
Offline
One more quick question:
How do I get a useful USB ID for qemu? I entered "usb-devices | egrep '(Manufacturer|SerialNumber)'" into my terminal and got the manufacturer (in this case Logitech) and a serial number (C0030059D31E) but not a correct PCI-ID. C0030059D31E is of no use. How can I find out what ID is to what device assigned specifically?
One example
[john@mainhub ~]$ usb-devices | egrep '(Manufacturer|SerialNumber)'
S: Manufacturer=Linux 3.16.0-1-mainline ehci_hcd
S: SerialNumber=0000:00:1a.0
S: Manufacturer=Linux 3.16.0-1-mainline ehci_hcd
S: SerialNumber=0000:00:1d.0
S: Manufacturer=Linux 3.16.0-1-mainline xhci_hcd
S: SerialNumber=0000:00:14.0
S: Manufacturer=Logitech
S: SerialNumber=C0030059D31E
S: Manufacturer=LGE
S: SerialNumber=030a483608e7ef63
S: Manufacturer=Logitech
S: Manufacturer=Linux 3.16.0-1-mainline xhci_hcd
S: SerialNumber=0000:00:14.0
S: Manufacturer=Western Digital
S: SerialNumber=575843314131343535353730
Offline
How can I find out what ID is to what device assigned specifically?
lsusb
or, if you like trying to drink from a firehose:
lsusb -v
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Wow. Great. It works.
Thank you.
Edit: OK. I have successfully installed Windows 8.1. But after installing the AMD graphics driver my monitor goes into power saving mode and doesn't awake anymore. My graphics card has been detected by the driver but something doesn't work.
This is what I get with windows 7 after installing the driver:
Last edited by somearchfan (2014-08-18 12:28:46)
Offline
Wow. Great. It works.
Thank you.
Edit: OK. I have successfully installed Windows 8.1. But after installing the AMD graphics driver my monitor goes into power saving mode and doesn't awake anymore. My graphics card has been detected by the driver but something doesn't work.
This is what I get with windows 7 after installing the driver: http://www1.xup.to/tn/2014_08/79159015.jpeg
Are you passing ATI's HD Audio controller? Just bind it to vfio-pci and leave it alone, passing just VGA controller.
Offline
Yes, I did. Without passing the HD controller I get this under Windows 8.1:
My config:
qemu-system-x86_64 -enable-kvm -M q35 -m 8196 -cpu host -boot d \
-smp 4,sockets=1,cores=4,threads=1 \
-bios /usr/share/qemu/bios.bin -vga none \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on,rombar=0,romfile=/home/john/Downloads/Asus.R9270.2048.131007.rom \
-device virtio-scsi-pci,id=scsi \
-drive file=/run/media/john/win//windows.img,id=disk,format=raw -device scsi-hd,drive=disk \
-drive file=/home/john/Desktop/Win7.iso,id=isocd -device ide-cd,bus=ide.1,drive=isocd \
-drive file=/home/john/Downloads/virtio-win-0.1-81.iso,id=virtiocd -device ide-cd,bus=ide.2,drive=virtiocd \
-usb -usbdevice host:046d:c019 -usbdevice host:046a:0021
Offline
that BSOD is from Windows itself, you need to go to device manager and disable the graphic from what window, then do the installtion for the drivers.
Offline
Hi,
this doesn't sound anything. I still get the BSOD while installing the graphics driver. ;o
Offline
I can't get audio working right in Windows 8.1 as a guest, I get audio output but it is distorted. I've tried both alsa (with libspeex_mediumrate resampler), and pulseaudio as an alsa pipe, as described at: https://wiki.archlinux.org/index.php/Pu … pe_to_ALSA
I've also tried installing Realtek audio drivers on the guest, it doesn't help at all.
I'm using an Asrock Z97 Extreme 3, which uses Realtek ALC892 for audio.
Qemu command:
QEMU_ALSA_DAC_BUFFER_SIZE=512 QEMU_ALSA_DAC_PERIOD_SIZE=170 QEMU_AUDIO_DRV=alsa \
sudo qemu-system-x86_64 -enable-kvm -M q35 -m 4096 \
-cpu host,kvm=off \
-smp 2,sockets=1,cores=2,threads=4 \
-bios /usr/share/qemu/bios.bin -vga none -nographic \
-boot menu=on \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on \
-device vfio-pci,host=01:00.1,bus=root.1,addr=00.1 \
-no-hpet \
-usb -usbdevice host:413c:3200 \
-usbdevice host:09da:0260 \
-usbdevice host:0810:0001 \
-device ich9-intel-hda,bus=pcie.0,addr=1b.0,id=sound0 \
-device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 \
-drive file=/home/someguy/VM/win8.1.qcow2,id=disk,format=qcow2 -device ide-hd,bus=ide.0,drive=disk
Any ideas?
Offline
I haven't been able to get my passthrough video card to display anything through qemu. I have an nvidia gtx 770 to passthrough to my Windows 8.1 guest while the host is using video from my Intel i5 processor. I am running linux 3.16 with the i915, acs and vga arbiter patches. I have the guest running on qemu 2.0 and I can expose the video card to it and see it in device manager (it is disabled due to Code 43 error).
The problem is I can never seem to get any output from the nvidia card, not even the seabios. I have the card on the first pcie slot, and set the primary output to igfx in the UEFI/bios.
/proc/cmdline
intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 kvm_intel.emulate_invalid_guest_state=0 pcie_acs_override=downstream
I try to test the passthrough by running the following
sudo qemu-system-x86_64 -enable-kvm -M q35 -m 1024 -cpu host \
-smp 2,sockets=1,cores=2,threads=1 \
-bios /usr/share/qemu/bios.bin -vga none \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on \
-device vfio-pci,host=01:00.1,bus=root.1,addr=00.1
but I don't get any output from the video card.
I do however get the following in dmesg
[ 108.138741] vfio-pci 0000:01:00.0: enabling device (0000 -> 0003)
[ 108.138896] vfio_ecap_init: 0000:01:00.0 hiding ecap 0x19@0x900
[ 110.371251] [drm:intel_uncore_check_errors] *ERROR* Unclaimed register before interrupt
[ 110.371302] [drm:intel_uncore_check_errors] *ERROR* Unclaimed register before interrupt
[ 110.371308] [drm:hsw_unclaimed_reg_check] *ERROR* Unclaimed write to 44040
Any ideas what I may be doing wrong?
Offline
@darkstego
you are missing i915 patch activation in cmdline....
and kvm=off option in qemu for 325+ nvidia driver
Last edited by slis (2014-08-19 02:18:07)
Offline
@slis, thanks, I just enabled it.
I was unaware that there is a kvm=off option for new drivers. I will be sure to add that.
Offline
My configuration works now. Special thanks to nbhs, abdullah, dwe11erm and ewaller.
Last edited by somearchfan (2014-08-19 02:47:03)
Offline
Im currently in the process of setting up my system and I am wondering does anyone have a way to disable your second monitor in linux when you start the vm and use your 2nd vga card to drive the second monitor? I would like my window manager/desktop environment to transfer the workspaces belonging to the second screen to my primary screen.
Offline
I can't get audio working right in Windows 8.1 as a guest, I get audio output but it is distorted. I've tried both alsa (with libspeex_mediumrate resampler), and pulseaudio as an alsa pipe, as described at: https://wiki.archlinux.org/index.php/Pu … pe_to_ALSA
I've also tried installing Realtek audio drivers on the guest, it doesn't help at all.I'm using an Asrock Z97 Extreme 3, which uses Realtek ALC892 for audio.
Qemu command:
QEMU_ALSA_DAC_BUFFER_SIZE=512 QEMU_ALSA_DAC_PERIOD_SIZE=170 QEMU_AUDIO_DRV=alsa \ sudo qemu-system-x86_64 ...
Any ideas?
why not just pa?
why not try varying parameters being used (not to mention learning what they are supposed to mean)?
for gods sake...
Im currently in the process of setting up my system and I am wondering does anyone have a way to disable your second monitor in linux when you start the vm and use your 2nd vga card to drive the second monitor? I would like my window manager/desktop environment to transfer the workspaces belonging to the second screen to my primary screen.
xrandr?
Offline