Giter VIP home page Giter VIP logo

qemu-gaming's Introduction

qemu-gaming

This is a small project I experimented with alot. With QEMU and KVM and a secound graphics card it is actually possible to play games in a virtual machine with almost the same performance like a native windows system.

Please note this project is currently tested by me with some minor issues. If you have further questions about the procedures don't hesitate to contact me.

Requirements

  • A CPU that supports IOMMU
  • Linux Kernel 4.4.x
  • Edit mkinitcpio (Arch Linux) MODULES="vfio vfio_iommu_type1 vfio_pci vfio_virqfd"
  • AUR Package ovmf-git
  • virtio-driver Download

How to install

Pretty simple, all the necessary files are in the repository including their proper save location. Don't forget the system config files in the folder etc. Some games might not work without these modifications (e.g. Battlefield). Please edit and configure the scripts to your liking.

If you want to permanently bind a device to the vfio-driver

Edit the file /etc/modprobe.d/vfio.conf and input the id of the graphical card you want to use.

options vfio-pci ids=YOUR GPU ID

To retrieve the ID execute lspci -nnk | grep VGA. It will output something similiar like this:

00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 530 [8086:1912] (rev 06)
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK104 [GeForce GTX 670] [10de:1189] (rev a1)

For me the id is : 10de:1189

Please note that you shouldn't use this method if you want to reuse your GPU in the linux environment. Use the GPU-Switcher instead.

Add support for hugetables

Add hugetlbfs /dev/hugepages hugetlbfs mode=1770,gid=78 0 0 to /etc/fstab.

GPU-Switcher

A little tool to switch your graphics card driver. Please be careful because your XServer will be restarted to apply changes

QEMU-Gaming

Tool that launches the QEMU process with all the necessary parameter. It also initializes the network stack so have a look at it before running it.

Architecture

Architecture

Issues

  • When you use the vfio-pci driver without running a VM the GPU fans spin up. Try to assign a proper driver (nvidia, nouveau) to stop them
  • Software Audio is not working properly after a long gaming session
  • Hardware Audio is broken atleast for my GTX 670
  • Sometime when you start Windows you see a black screen. This means the graphic card was not correctly initialized and you might need to restart your PC.

qemu-gaming's People

Contributors

bomberus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.