打开Anki时黑屏

打开Anki时黑屏

当我在 Ubuntu 机器上启动 anki 时,会弹出以下窗口

黑屏弹出

因此我尝试使用终端启动 Anki,它显示以下错误。

libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
Qt warning: QQuickWidget: Failed to make context current 
Qt warning: QQuickWidget::resizeEvent() no OpenGL context 
Qt warning: QQuickWidget: Failed to make context current 
Qt warning: QQuickWidget: Failed to make context current 
Qt warning: QQuickWidget::resizeEvent() no OpenGL context 
Qt warning: QQuickWidget: Failed to make context current 
Xlib: sequence lost (0x102d1 > 0x2d3) in reply type 0x0!
Xlib: sequence lost (0x102d4 > 0x2d6) in reply type 0x0!
Qt warning: QQuickWidget: Failed to make context current 
Qt warning: QQuickWidget::resizeEvent() no OpenGL context 
Qt warning: QQuickWidget: Failed to make context current 
[21404:21447:0520/120313.269102:ERROR:context_group.cc(292)] ContextResult::kFatalFailure: too few texture units supported (0, should be 8).
Qt warning: QQuickWidget: Attempted to render scene with no context 
Qt warning: QQuickWidget: Attempted to render scene with no context 
Qt warning: QQuickWidget: Attempted to render scene with no context 
[21461:7:0520/120313.271585:ERROR:command_buffer_proxy_impl.cc(144)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer.
[21404:21447:0520/120313.291113:ERROR:context_group.cc(292)] ContextResult::kFatalFailure: too few texture units supported (0, should be 8).
Qt warning: QQuickWidget::invalidateRenderControl could not make context current 
Qt warning: QQuickWidget::invalidateRenderControl could not make context current 
Qt warning: QQuickWidget::invalidateRenderControl could not make context current 

眼镜

  • 操作系统版本-Ubuntu 20.04.2 LTS
  • 显卡 - AMD Radeon RX 580 系列
  • 处理器 - AMD Ryzen 7 3800x 8 核处理器 × 16

我尝试重新安装图形驱动程序,但没有效果。

我也试图这样做方法,但我不能,因为我对 Linux 的经验很少,而且我的显卡是 AMD

我也尝试过,但它似乎不起作用。

答案1

如果您在 Qt6 中使用 Anki(我的情况是 2.1.54),请尝试启用软件渲染:

echo software > ~/.local/share/Anki2/gldriver6

答案2

每当我遇到有关缺少驱动程序/文件/共享库的错误消息时,我都会尝试找出该文件可以在哪个 deb 包中找到:

apt-file search swrast_dri.so
--> libgl1-mesa-dri: /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so

然后我将安装该包

sudo apt install libgl1-mesa-dri

然后再试一次。

如果apt-file尚未安装,您可以输入以下代码进行安装

sudo apt install apt-file
apt-file update

话虽如此,anki这是我直接从他们的网站下载的极少数软件包之一apps.ankiweb.net因为这是一个非常活跃的项目。安装说明在同一页面上提供。如果执行此操作,请确保事先从系统中删除打包版本:sudo apt remove anki

相关内容