0

I have installed a system (Linux Mint Debian Edition) on a USB stick, that I either start on a real machine at home (with an AMD Radeon card), or inside virtual box when I'm on someone else's computer.

Things were working fine with the open source radeon driver, the only issue I had was the graphic card fan was running at full speed and very noisy.

So I installed the proprietary drivers from AMD, and it works fine on the real machine, but now it won't boot inside virtual box. I fixed a first issue with xorg.conf (either removing it or generating a new file solves the boot issue), and now it boots fine until Cinnamon starts, and then I have a popup saying that Cinnamon crashed and it's in fallback mode.

In ~/.xsession-errors I have, among other things, these errors:

[...]
Error getting login monitor: -2
[...]
libEGL warning: GLX/DRI2 is not supported
[...]
(cinnamon:3203): GLib-CRITICAL **: g_strsplit: assertion 'string != NULL' failed
(cinnamon:3203): Clutter-CRITICAL **: Unable to initialize Clutter: The OpenGL version could not be determined
Window manager error: Unable to initialize Clutter.
[...]

It seems the issue is with OpenGL. For example if I start glxgears I get

Xlib:  extension "GLX" missing on display ":0".
Error: couldn't get an RGB, Double-buffered visual

What I would like is to load the old driver (whatever that was) in virtual box, and load the AMD driver on a real machine with a Radeon card. Is this possible? I would be fine, for example, with a script that detects when starting inside virtual box, and ajusts settings accordingly, but I don't know what needs to be adjusted...

2
  • 1
    Did you try to install the AMD drivers in VirtualBox? If so, that's your issue, the VM has no direct access to the host's hardware, never install host hardware drivers in a VM. What should fix this is reinstalling the VirtualBox Additions. They include the correct drivers for the VM's hardware.
    – essjae
    Commented May 15, 2018 at 18:28
  • I installed the AMD drivers on the real hardware. However, I want to use the same system on virtual box as well. I don't think I can re-install drivers each time I change the machine, unless I can make it fully automatic and fast enough. However your idea of reinstalling VirtualBox additions might point me in the right direction as to what configuration changes it makes, I'll give that a try. I just need a way to quickly and automatically configure the correct drivers at each boot.
    – youen
    Commented May 16, 2018 at 6:54

1 Answer 1

0

Based on @essjae comment and this superuser answer, here are the steps that solved my problem:

  1. reinstall virtualbox additions
    • this fixes the virtualbox drivers issue that the ATI installer messed up
    • but fortunately, it doesn't mess with the ATI drivers, meaning both drivers are now coexisting in the system
  2. adding a script (/etc/rc.local) that makes a symlink to the correct xorg.conf file each time the system boots

Here is the /etc/rc.local script I'm using:

if [ -L /etc/X11/xorg.conf ]
then
    rm /etc/X11/xorg.conf
fi

if [ `dmidecode -s system-product-name` = "Z68X-UD3P-B3" ]
then
    ln -s /etc/X11/xorg.conf.ati /etc/X11/xorg.conf
else
    ln -s /etc/X11/xorg.conf.auto /etc/X11/xorg.conf
fi

You should run the dmidecode -s system-product-name command on each system you want to use to see what it outputs and use that in your tests. And of course create each /etc/X11/xorg.conf.* file that your script references. In my case, xorg.conf.ati contains the configuration generated by the ATI installer, while xorg.conf.auto is just an empty file, letting the system auto-detect everything.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .