Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

X Error: BadAlloc (insufficient resources for operation)

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
User avatar
ange
Posts: 59
Joined: 2008-02-01 17:23
Location: Nador, Morocco
Contact:

X Error: BadAlloc (insufficient resources for operation)

#1 Post by ange »

This error means the video player is using the wrong video output driver. The solution is to change the video output settings of your media player .

For VLC player, go to Settings>Preferences>Video>>Output Modules. Tick the Advanced Options and set Video output module to X11 video output. Save your settings and restart your application.

For mplayer, go to preferences>video>available drivers. select X11 (OpenGL). Save your settings and restart your application.

For Kaffeine
, go to settings>xine Engine Prameters>video. Select opengl. save your settings. restart Kaffeine.
if after changing these settings, you still unable to play your videos, you need to reset your screen resolution. When I change the resolution to 1280 x 1024, I cant play my videos ( with openGl, slow display motion :( ). But when I set the screen resolution to 1024 x 768, I can play my videos with the default video out put settings in Media players (vlc,mplayer,kplayer, kaffeine,etc)
Please note that I mentioned the settings that worked for me.
os:debian 4.6.18*
desktop:kde
Last edited by ange on 2009-05-24 15:26, edited 1 time in total.
your thoughts make your reality

User avatar
garrincha
Posts: 2335
Joined: 2006-06-02 16:38

Re: X Error: BadAlloc (insufficient resources for operation)

#2 Post by garrincha »

This is a bit misleading. The error does NOT mean that the video player is using wrong video output driver, it's mostly the limitation of video card and/or PC capability in playing big video. This could happen for example when you play a very large video and it is larger than what your display resolution could handle.

By the way, X11 is just a software driver and you'll not get hardware acceleration as in the case of xv driver which is the standard in most Linux video applications.
Maurice Green on Usain Bolt's 9.58: "The Earth stopped for a second, and he went to Mars."

User avatar
ange
Posts: 59
Joined: 2008-02-01 17:23
Location: Nador, Morocco
Contact:

Re: X Error: BadAlloc (insufficient resources for operation)

#3 Post by ange »

garrincha wrote:.... The error does NOT mean that the video player is using wrong video output driver, it's mostly the limitation of video card and/or PC capability in playing big video. This could happen for example when you play a very large video and it is larger than what your display resolution could handle.

By the way, X11 is just a software driver and you'll not get hardware acceleration as in the case of xv driver which is the standard in most Linux video applications.
Yes you are right. My purpose was to mention the configuration that solved the problem for me because the default xv was producing this error every time I play a video with a Linux video application; my graphic card is only 8Mb ram on an old PIII Intel IBM machine :lol: . It may or may not work for other systems. My post was sent in the hope it will be useful to those with limited hardware resources (like me) who I believe are the most to get this type of error. :
Last edited by ange on 2008-10-31 13:50, edited 1 time in total.
your thoughts make your reality

User avatar
garrincha
Posts: 2335
Joined: 2006-06-02 16:38

#4 Post by garrincha »

These problems are mostly related to slow and/or old PC and outdated graphic card especially those from intel. One method of solving this problem is to add the line Option "Cachelines" "1980" to the Section "Device" of your /etc/X11/xorg.conf file. Man page is your friend!

Code: Select all

 man intel
:
Option "CacheLines" "integer"
This allows the user to change the amount of graphics memory used for 2D acceleration and video when XAA acceleration is enabled.  Decreasing this amount leaves more for 3D textures.  Increasing it can improve 2D performance at the expense of 3D performance.  Default:  depends on  the  resolution,  depth,  and available video memory.  The driver attempts to allocate space for at 3 screenfuls of pixmaps plus an HD-sized XV video.  The default used for a specific configuration can be found by examining the Xorg log file.
Or possibly the old configuration like Option "VideoRam" "65536"

Code: Select all

man xorg.conf
:
VideoRam mem
    This optional entry specifies the amount of video ram that is installed on the graphics board. This is measured in kBytes. In most cases this is not required because the Xorg server probes the graphics board to determine this quantity. The driver-specific documentation should indicate when it might be needed. 
Of course these are by no mean the only methods of fixing the problems.
Maurice Green on Usain Bolt's 9.58: "The Earth stopped for a second, and he went to Mars."

User avatar
ange
Posts: 59
Joined: 2008-02-01 17:23
Location: Nador, Morocco
Contact:

#5 Post by ange »

i tried to add the line but hen i rebooted the x server was unable to start till i removed that line
your thoughts make your reality

User avatar
garrincha
Posts: 2335
Joined: 2006-06-02 16:38

#6 Post by garrincha »

ange wrote:i tried to add the line but hen i rebooted the x server was unable to start till i removed that line
What lines did you add? And what's the out of:

Code: Select all

 cat /var//log/Xorg.0.log | grep "(EE)"
Maurice Green on Usain Bolt's 9.58: "The Earth stopped for a second, and he went to Mars."

User avatar
ange
Posts: 59
Joined: 2008-02-01 17:23
Location: Nador, Morocco
Contact:

#7 Post by ange »

cat /var//log/Xorg.0.log | grep "(EE)"
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(EE) Error loading keymap /var/lib/xkb/server-0.xkm

I added the line you suggested.
your thoughts make your reality

User avatar
ange
Posts: 59
Joined: 2008-02-01 17:23
Location: Nador, Morocco
Contact:

Re: X Error: BadAlloc (insufficient resources for operation)

#8 Post by ange »

garrincha wrote:This is a bit misleading. The error does NOT mean that the video player is using wrong video output driver, it's mostly the limitation of video card and/or PC capability in playing big video. This could happen for example when you play a very large video and it is larger than what your display resolution could handle.

By the way, X11 is just a software driver and you'll not get hardware acceleration as in the case of xv driver which is the standard in most Linux video applications.
My video card is 8 MB, an extinct dinosaur; the solutions seems to reduce screen resolution. when I set the display to 1280 x 1024, all media players capabilities to play video vanish; when I set it back to 1024 x 768, all work fine.
your thoughts make your reality

jamesparker
Posts: 2
Joined: 2009-10-05 15:05

Re: X Error: BadAlloc (insufficient resources for operation)

#9 Post by jamesparker »

angge wrote:
garrrincha wrote:This is a bit misleading. The error does NOT mean that the video player is using wrong video output driver, it's mostly the Wealthy Affiliate posted at https://affmountain.com/my-wealthy-affi ... nd-results and the limitation of video card and/or PC capability in playing big video. This could happen for example when you play a very large video and it is larger than what your display resolution could handle.

By the way, X11 is just a software driver and you'll not get hardware acceleration as in the case of xv driver which is the standard in most Linux video applications.
My video card is 8 MB, an extinct dinosaur; the solutions seems to reduce screen resolution. when I set the display to 1280 x 1024, all media players capabilities to play video vanish; when I set it back to 1024 x 768, all work fine.
I was having a similar problem to this. I solved it by changing my screen resolution to a smaller size. Then rebooting.

James Parker
Last edited by jamesparker on 2016-08-21 14:09, edited 13 times in total.

User avatar
ange
Posts: 59
Joined: 2008-02-01 17:23
Location: Nador, Morocco
Contact:

Re: X Error: BadAlloc (insufficient resources for operation)

#10 Post by ange »

Thanks James Parker. The issue is solved.
your thoughts make your reality

PatrickKnight
Posts: 1
Joined: 2020-01-22 17:30

Re: X Error: BadAlloc (insufficient resources for operation)

#11 Post by PatrickKnight »

ange wrote:This error means the video player is using the wrong video output driver. The solution is to change the video output settings of your media player .

For VLC player, go to Settings>Preferences>Video>>Output Modules. Tick the Advanced Options and set Video output module to X11 video output. Save your settings and restart your application.

For mplayer, go to preferences>video>available drivers. select X11 (OpenGL). Save your settings and restart your application.

For Kaffeine
, go to settings>xine Engine Prameters>video. Select opengl. save your settings. restart Kaffeine.
if after changing these settings, you still unable to play your videos, you need to reset your screen resolution. When I change the resolution to 1280 x 1024, I cant play my videos ( with openGl, slow display motion :( ). But when I set the screen resolution to 1024 x 768, I can play my videos with the default video out put settings in Media players (vlc,mplayer,kplayer, kaffeine,etc)
Please note that I mentioned the settings that worked for me.
os:debian 4.6.18*
desktop:kde
Thank you very much for providing these instructions. It has helped me a lot in my work.

BradleyGuerr
Posts: 2
Joined: 2020-10-24 17:34

Re:

#12 Post by BradleyGuerr »

angell wrote:i tried to add the line but hen i rebooted the x server was unable to start till i removed that line
I was also faced this error. how can it resolve

Post Reply