安装 AMD 驱动程序后,使用虚拟盒启动时 Cinnamon/OpenGL 崩溃

安装 AMD 驱动程序后,使用虚拟盒启动时 Cinnamon/OpenGL 崩溃

我已经在 USB 上安装了一个系统(Linux Mint Debian 版本),我可以在家里的真机上(使用 AMD Radeon 卡)启动它,或者在使用别人的电脑时在虚拟盒内启动它。

使用开源 Radeon 驱动程序后一切运行正常,我遇到的唯一问题是显卡风扇全速运转并且噪音很大。

所以我安装了 AMD 的专有驱动程序,它在真机上运行良好,但现在无法在虚拟机中启动。我修复了 xorg.conf 的第一个问题(删除它或生成新文件可以解决启动问题),现在它可以正常启动,直到 Cinnamon 启动,然后弹出一个窗口,提示 Cinnamon 崩溃了,它处于回退模式。

~/.xsession-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.
[...]

问题似乎出在 OpenGL 上。例如,如果我启动,glxgears我会得到

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

我想要的是将旧驱动程序(无论它是什么)加载到虚拟盒中,并在带有 Radeon 卡的真实机器上加载 AMD 驱动程序。这可能吗?例如,使用一个脚本来检测何时在虚拟盒内启动并相应地调整设置,我会没事的,但我不知道需要调整什么...

答案1

根据@essjae 评论和这个超级用户的回答,下面是解决我的问题的步骤:

  1. 重新安装 virtualbox 附加功能
    • 这修复了 ATI 安装程序搞乱的 virtualbox 驱动程序问题
    • 但幸运的是,它不会干扰 ATI 驱动程序,这意味着两种驱动程序现在在系统中共存
  2. 添加一个脚本 ( ),该脚本在每次系统启动时/etc/rc.local都会创建指向正确文件的符号链接xorg.conf

这是/etc/rc.local我正在使用的脚本:

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

您应该在每个要使用的系统上运行该dmidecode -s system-product-name命令,以查看其输出的内容,并在测试中使用它。当然,还要创建/etc/X11/xorg.conf.*脚本引用的每个文件。在我的例子中,xorg.conf.ati包含由 ATI 安装程序生成的配置,而xorg.conf.auto只是一个空文件,让系统自动检测所有内容。

相关内容