【问题标题】:X Error of failed request: BadAlloc (insufficient resources for operation)X Error of failed request: BadAlloc (insufficient resources for operation)
【发布时间】:2013-03-12 17:37:42
【问题描述】:

我注意到这个问题过去被问过很多次,在网上冲浪时我发现了很多关于它的页面。但是,似乎提议的解决方案很少奏效,就我而言,问题与我编写的程序无关。所以我会在这里再试一次。

我最近在笔记本电脑上安装了 Linux Mint 14。在操作系统完善后,我开始安装我需要的软件,其中包括 netgen(一个网格生成器软件)。我尝试了两种方式:下载+解包+编译+安装和突触。无论哪种方式,这都是我尝试执行程序时得到的输出

X Error of failed request: BadAlloc (insufficient resources for operation)

请求失败的主要操作码:154 (GLX)

请求失败的次要操作码:3 (X_GLXCreateContext)

失败请求序列号:490

输出流中的当前序列号:491

正如我所说,我在网上冲浪,显然,这被认为与 X 服务器配置中的某些问题有关。从这里开始混乱。有人说我应该修改/etc/X11/Xorg.conf,添加行

选项“Videoram”“65536”

选项“缓存线”“1980”

在“设备”部分下。不幸的是,我没有这样的文件,显然在最近的发行版中,X 配置文件已移至/usr/share/X11/xorg.conf.d/*,现在它被拆分为不同的文件。关于显示器和图形的那个应该叫做 10-monitor.conf ......我没有。我尝试按照this 链接上的说明创建一个,然后添加这些行,但什么也没发生。公平地说,我不能 100% 确定我正确地生成了文件,因为我不确定如何检测我的显卡驱动程序。

我不知道人们需要多少和哪些信息来了解如何解决这个问题。以下是我看到的可能有用的内容。

'lspci | 的输出grep VGA' 是

01:05.0 VGA 兼容控制器:Advanced Micro Devices [AMD] nee ATI RS880M [Mobility Radeon HD 4200 系列]

我目前的/usr/share/X11/xorg.conf.d/10-monitor.conf如下

Section "Monitor"
  Identifier "Monitor0"
  Modeline "1920x1080_60.00"  172.80  1920 2040 2248 2576  1080 1081 1084 1118  -HSync +Vsync
EndSection

Section "Device"
    Identifier    "LVSD"
    Driver        "fglrx" #Choose the driver used for this monitor
EndSection

Section "Screen"
  Identifier "Screen0"
  Device "LVDS"
  Monitor "Monitor0"
  DefaultDepth 24
  SubSection "Display"
    Depth 24
    Modes "1920x1080_60.00" "1366x768"
  EndSubSection
EndSection

【问题讨论】:

  • 这是一道编程题吗?
  • 我很久以前就问过这个问题,但我知道这不是编程问题。我在尝试启动我下载的网格生成软件“netgen”时遇到了这个错误。
  • 对于软件问题,而不是编程问题,您将在 SuperUser 上获得更多回复。这里是 O/T。

标签: xorg linux-mint


【解决方案1】:

在“设备”部分下。不幸的是,我没有这样的文件

尝试创建您自己的 xorg.conf 文件,将其放在此位置会覆盖您在 restarting X 之后的 X 设置,或者只需重新启动计算机。

mkdir -p /etc/X11/xorg.conf.d/
cp /etc/X11/xorg.conf.d/xorg.conf /etc/X11/xorg.conf.d/xorg.conf.bk # in case it exists
cp /usr/share/X11/xorg.conf.d/10-monitor.conf /etc/X11/xorg.conf.d/xorg.conf

/etc/X11/xorg.conf.d/xorg.conf 的内容看起来像(添加您的选项):

Section "Monitor"
  Identifier "Monitor0"
  Modeline "1920x1080_60.00"  172.80  1920 2040 2248 2576  1080 1081 1084 1118  -HSync +Vsync
EndSection

Section "Device"
    Identifier    "LVSD"
    Driver        "fglrx" #Choose the driver used for this monitor
    Option "Videoram" "65536"
    Option "Cachelines" "1980"
EndSection

Section "Screen"
  Identifier "Screen0"
  Device "LVDS"
  Monitor "Monitor0"
  DefaultDepth 24
  SubSection "Display"
    Depth 24
    Modes "1920x1080_60.00" "1366x768"
  EndSubSection
EndSection

这也可能与您正在使用的驱动程序有关,还有其他常见的驱动程序可用,例如

Driver "fbdev"
Driver "vesa"
Driver "fglrx"

fbdev 驱动程序支持所有有帧缓冲驱动程序可用的硬件。

vesa 驱动程序支持大多数与 VESA 兼容的视频卡。有一些已知的例外情况,应在此处列出。

fglrx 是基于 ATI (Mobility(TM)) RADEON® 和 (Mobility(TM)) FireGL(TM) 的显卡的 X.org(7x) 驱动程序。该驱动程序为 3D 图形和视频播放提供硬件加速。它包括对双显示器、电视输出以及 8.21.7 版以及 OpenGL 2.0 (GLSL) 的支持。

根据您选择的驱动程序,是否启用某些选项/功能/兼容性,您可以更改驱动程序并使用您所说的选项进行测试。

最后,你有 hundreds of options here 来玩 X11。

【讨论】:

    猜你喜欢
    • 2017-03-31
    • 2018-06-29
    • 1970-01-01
    • 2017-12-18
    • 2019-11-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多