Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I noticed this question has been asked many times in the past and surfing the web I found many pages about it. However, it seems like the proposed solutions rarely work and, in my case, the problem does not refer to a program that I wrote. So I'll give it another try here.

I recently installed Linux Mint 14 on my laptop. After the OS was spick and span, I started to install the software I need, and among these netgen (a Mesh Generator software). I tried both ways: download+unpack+compile+install and synaptic. Either way, this is the output I get when I try to execute the program

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

Major opcode of failed request: 154 (GLX)

Minor opcode of failed request: 3 (X_GLXCreateContext)

Serial number of failed request: 490

Current serial number in output stream: 491

As I said, I surfed the web, and apparently, this is thought to be linked to some problem in the X server configuration. And here start the mess. Someone says I should modify /etc/X11/Xorg.conf, adding the lines

Option "Videoram" "65536"

Option "Cachelines" "1980"

Under the section "Device." Unfortunately, I have no such file, as apparently in recent distros, the X configuration file has been moved to /usr/share/X11/xorg.conf.d/* and it's now split into different files. The one about the monitor and graphics should be called 10-monitor.conf...which I don't have. I tried to create one, following the instruction at this link, and then add those lines, but nothing happened. To be fair, I'm not 100% sure I generated the file correctly since I am not sure how to detect the driver for my graphics card.

I don't know how much and which information people would need to have an idea of how to fix this problem. Here's what I see might be useful.

The output of 'lspci | grep VGA' is

01:05.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RS880M [Mobility Radeon HD 4200 Series]

My current /usr/share/X11/xorg.conf.d/10-monitor.conf is the following

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
like image 659
bartgol Avatar asked Mar 22 '13 18:03

bartgol


1 Answers

Under the section "Device." Unfortunately, I have no such file

Try creating your own xorg.conf file, placing it in this location will override your X settings after restarting X or simply by restarting the computer.

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

The content of /etc/X11/xorg.conf.d/xorg.conf would look like (adding your options):

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

This also could be related to the driver you're using, there are other common drivers available like

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

The fbdev driver supports all hardware where a framebuffer driver is available.

The vesa driver supports most VESA-compatible video cards. There are some known exceptions, and those should be listed here.

fglrx is a X.org(7x) driver for ATI (Mobility(TM)) RADEON® and (Mobility(TM)) FireGL(TM) based video cards. The driver provides hardware acceleration for 3D graphics and video playback. It includes support for dual displays, TV Output and as of version 8.21.7 also OpenGL 2.0 (GLSL).

Depending on which driver you choose, certain options/functionality/compatibility would be enabled or not, you could change the driver and test with the options you said would work.

Finally, you have hundreds of options here to play with X11.

like image 102
Miguel Ortiz Avatar answered Nov 04 '22 13:11

Miguel Ortiz