2

I have recently fallen in love with Linux. I first decided to try out Ubuntu 13.10 a few weeks ago, but I bricked it by incorrectly installing an AMD FGLRX driver. Then I reformatted and wiped that partition to try out Linux Mint 16. I did the same thing with Mint, as well as with Fedora 20, 19, and 18 (in that order). Now I am on a stable Ubuntu 12.04 because I know how to use it vastly more than the other distros I've tried and because it seems like it has the biggest online support group.

Because I am now tired of reformatting and reinstalling broken distros, I thought it would be a good idea to get at least one distro stable (Precise) and to test the driver installations and other risky modifications for that distro and others with them running in Oracle Virtual Box since I don't trust my Linux skill (lack?) at the moment. This way, I optimize the distros in the Box, take a "snapshot" like saving a video game, and try out the risky operations. If they fail and I break the distro, I can just open the snapshot up and go back to where I was right before the risky operation.

While this still seems like the best idea so far, I have noticed that the distros I have installed on Virtual Box report that I am NOT using my computer's actual hardware, and am actually using Virtual Box's "hardware", for instance, the "Innotek Systemberatung GmbH VirtualBox Graphics adapter.

Because of that adapter, my test graphics installations do not work properly. Even the operations I know would brick the distro with a black screen are not working. "My adapter is incompatible," FGLRX installation says, in the GUI version of installation (one of many methods).

My questions are: Can I not install these drivers inside of Virtual Box? Do I need some additional software? Is there any other virtual environment I could use for testing these distros that would result in a 100% identical virtual installation?


I am using the notoriously Linux-unfriendly Acer Aspire 5553G, which has "switchable graphics". Those cards are the Mobility Radeon HD 4250 and 5470. The driver's I have tested so far work in Windows 7, yet do not in Linux.

Thank you all in advance!

5

The short answer is no, you don't need extra drivers for Virtual Box.

The Virtual Box (or any any virtual machine software) creates a virtual computer with virtual hardware that are completely compatible with Linux. This means the virtual computer will have the same virtual graphics card irrespective of the actual graphics card in your computer. In theory, you should be able to copy your virtual installation of Ubuntu into another computer with a completely different graphics card and run is there, after installing the virtual machine software there.

In your case, inside the Virtual Box, there is no Mobility Radeon HD 4250 and 5470. These cards don't exist in the virtual world. Only the virtual card virtually manufactured by Virtual Box is there. This virtual card has open source Linux drivers. So when you install Ubuntu inside the Virtual Box, it only sees the virtual card. Ubuntu won't install the FGLRX driver which is for AMD Radeon cards as it can't see the AMD cards that are there in the real PC, but does not exist in the virtual PC.

The downside of using a virtual machine is that you won't be able to use the full capability of your graphics card inside the virtual machine. The virtual graphics card inside the virtual machine is likely to be less capable.

Hope this helps.

  • Thank you for your reply. I only intend to use Virtual Box to test the installation of the graphics drivers and other operations that may ruin the OS beyond my repair skills. Once I find a driver and installation method that works, I will apply to that to real, or non-virtual version of that OS. Never the less, I still think the Virtual Box drivers are preventing me from testing the other drivers in the way I would if the OS was actually installed. – shpong Mar 18 '14 at 15:33
  • For instance, on the FGLRX gui installation on Ubuntu 13.10 says I have an incompatible adapter and it cancels the intallation, yet this installation method completed, though resulting in a blackscreen, when I did it on Ubuntu when it was actually installed. These driver I am testing are not open-source, and are from ATI /AMD's website. – shpong Mar 18 '14 at 15:34
  • Downvote: Factual errors (VBox doesn't emulate an Intel card), bad reasoning (the use of virtual cards is not related at all with lack of drivers). – Javier Rivera Mar 19 '14 at 7:52
  • @JavierRivera Thanks for pointing out my error. I have edited the answer to reflect your input. The OP was trying to test FGLRX drivers inside Virtual Box. The FGLRX installer can't detect the real AMD card(s) in the virtual environment and won't install the driver. I think my reasoning is sound. – user68186 Mar 19 '14 at 14:27
  • 1
    Downvote removed, @shpong, install Ubuntu to an USB drive and use it for tests: askubuntu.com/questions/16988/… – Javier Rivera Mar 20 '14 at 7:42
2

Short answer: Depend on what you intend with drivers. Anyway, the virtual machine will be of no use to test "native" graphic drivers for your physical PC.

Long answer:

when you install Virtualbox it will add a couple of drivers to your physical machine. You can see these by lsmod:

(0)pern:~% lsmod | grep vbox
vboxpci                22896  0 
vboxnetadp             25636  0 
vboxnetflt             27291  0 
vboxdrv               285210  3 vboxnetadp,vboxnetflt,vboxpci

(more or less) which are the drivers that the virtual machines will use to share the memory, network and physical resources of your real computer with the virtual machines. You cannot run VirtualBox without them.

When you install a Virtual Machine (being that one a Linux one or a Windows one), VirtualBox will simulate a completely standard hardware drivers. So normally you can run the virtual machine "out of the box" with the standard, basic drivers that are present in any distribution.

Your original graphic hardware is invisible from the virtual machine (as your real network driver, wifi driver, etc). So you can't test the original graphic drivers in it, sorry.(1)

But that way the performance of some things (graphic card, basically) will be horrible; the installed distro will use the default "vga" drivers which have no acceleration whatsover. So VirtualBox will prompt you to install the "VirtualBox Additions" in the virtual machine. Do that if you want a reasonable graphic performance; these drivers will not touch your physical computer.

References: https://www.virtualbox.org/manual/ch04.html

Notes: (1) the only exceptions is for USB devices that you can "pass" transparently to the virtual machine (you need the non-free extension pack to handle USB 2.0, though).

  • So if I want to test the ATI FGLRX drivers, I have to actually test them in a physically installed Linux distro? Why can Virtual Box not just use by default the open source drivers that are installed for my cards when I install a distro? I believe they are Xorg? – shpong Mar 18 '14 at 15:41
  • @shpong Yes; there is no other way. What you can do is partition your disk so that you can have two different linux installed --- one "safe" and one for "experiment". See for example askubuntu.com/a/379212/16395 – Rmano Mar 18 '14 at 15:44
  • @shpong Xorg is the "X11" layer; see it as a big set of library to do graphics things (what an understatement). Drivers are at a lower layer. For example, on your card by default Xorg will use the open source "radeon" driver. – Rmano Mar 18 '14 at 15:46
  • Aaaaaaaand back to square one. This is so frustrating. I think if I had a new computer without a Radeon card and without switchable graphics, I wouldn't be having this problem. – shpong Mar 18 '14 at 15:48
  • @shpong BTW before having a LOT of problems with the ATI switchable graphics (that yes, are a PITA) read this post: askubuntu.com/questions/207733/… --- i have now a perfectly working thing but it was a bit, well, harsh way. I do not use the proprietary drivers, by the way --- never got around to have them working, see my answer to that question. – Rmano Mar 18 '14 at 15:50
0

The only option for your scenario (testing graphic card drivers) is to be having a hypervisor with GPU Passthrough so that the virtual machine can actually use the physical display card.

However, for virtualbox you can install virtualbox additions and enable VM to use 3D acceleration and rechek.

There is also an experimental feature for passing a PCI Card to the VM that you can also try (works with few graphic cards only)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.