From owner-freebsd-questions@FreeBSD.ORG Wed Sep 30 20:45:17 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B67EA1065679 for ; Wed, 30 Sep 2009 20:45:17 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from fw.farid-hajji.net (fw.farid-hajji.net [213.146.115.42]) by mx1.freebsd.org (Postfix) with ESMTP id 79D688FC13 for ; Wed, 30 Sep 2009 20:45:14 +0000 (UTC) Received: from phenom.cordula.ws (phenom [192.168.254.60]) by fw.farid-hajji.net (Postfix) with ESMTP id 7DE30331C2; Wed, 30 Sep 2009 22:45:03 +0200 (CEST) Date: Wed, 30 Sep 2009 22:45:03 +0200 From: cpghost To: Anton Shterenlikht Message-ID: <20090930204503.GA3865@phenom.cordula.ws> References: <20090930163640.GA45422@mech-cluster241.men.bris.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090930163640.GA45422@mech-cluster241.men.bris.ac.uk> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-questions@freebsd.org Subject: Re: mplayer: X11 error: BadAlloc (insufficient resources for operation) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Sep 2009 20:45:17 -0000 On Wed, Sep 30, 2009 at 05:36:40PM +0100, Anton Shterenlikht wrote: > I've installed port multimedia/mplayer (mplayer-0.99.11_14) > on 9.0-current ia64. > > Trying to play an mpeg video I get endless stream of > > X11 error: BadAlloc (insufficient resources for operation) > X11 error: BadAlloc (insufficient resources for operation) > V: 7.6 190/190 17% 82% 0.0% 0 0 > X11 error: BadAlloc (insufficient resources for operation) > X11 error: BadAlloc (insufficient resources for operation) > X11 error: BadAlloc (insufficient resources for operation) > X11 error: BadAlloc (insufficient resources for operation) > X11 error: BadAlloc (insufficient resources for operation) > X11 error: BadAlloc (insufficient resources for operation) This usually happens when X doesn't have enough resources to allocate to direct viewing with the xv (XView) driver. This is very often related to DRM/DRI or memory problems. As a work around, try playing the video with the x11 driver instead: $ mplayer -vo x11 somefile.avi On a very slow machine, x11 isn't as good as xv driver, but it's better than nothing. On a reasonably fast machine (2 GB or so), you shouldn't notice any difference. Also you can't use full screen mode with x11 driver like with xv, but if your CPU is fast enough, you can use software zooming with the -zoom option. BTW, I often experience that mplayer with -vo xv works very well the first time I start X (directly after booting), but not on subsequent starts of X. I traced this down to the following data point, but was unable to investigate further as I have NO experience in drm/dri debugging: On a first start of X on my machine, xvinfo yields: $ xvinfo X-Video Extension version 2.2 screen #0 Adaptor #0: "RadeonHD Textured Video" number of ports: 16 port base: 64 operations supported: PutImage supported visuals: depth 24, visualID 0x21 no port attributes defined maximum XvImage size: 8192 x 8192 (...) and mplayer -vo xv ... and everything else works great; while on subsequent starts of X, it returns something like $ xvinfo X-Video Extension version 2.2 screen #0 no adaptors present and mplayer -vo xv yields those X11 BadAlloc errors, and scrolling in tin/rtin, firefox etc... is *painfully* slow. This is with the following kld modules 5 1 0xffffffff80e67000 5ab6d radeon.ko 6 1 0xffffffff80ec2000 11795 drm.ko and radeonhd driver: drm0: on vgapci0 info: [drm] MSI enabled 1 message(s) vgapci0: child drm0 requested pci_enable_busmaster info: [drm] Initialized radeon 1.29.0 20080528 info: [drm] Setting GART location based on new memory map info: [drm] Loading RS780/RS880 Microcode info: [drm] Resetting GPU info: [drm] writeback test succeeded in 1 usecs drm0: [ITHREAD] It may be similar with other Xorg drivers that can't initialize drm/dri properly, or can't allocate enough memory for DRI to mplayer. X11 BadAlloc can also happen on large videos only, while mplayer is able to play smaller videos with xv... Good luck. > Exiting... (End of file) > > Please advise > > many thanks > > -- > Anton Shterenlikht > Room 2.6, Queen's Building > Mech Eng Dept > Bristol University > University Walk, Bristol BS8 1TR, UK > Tel: +44 (0)117 331 5944 > Fax: +44 (0)117 929 4423 -cpghost. -- Cordula's Web. http://www.cordula.ws/