AnsweredAssumed Answered

surfaceflinger keeps restarting - fb buffer 0 allocation failed err=Out of memory

Question asked by varsmolta on Jul 6, 2014
Latest reply on Jul 9, 2014 by varsmolta

I am porting android 4.0.4 (based on freescale 13.4-ga release) to a custom board and surfaceflinger keeps shutting down and restarting. Here is the error I get:

 

I/ServiceManager( 2477): Waiting for service SurfaceFlinger...

I/ServiceManager( 2477): Waiting for service SurfaceFlinger...

I/SurfaceFlinger( 2499): SurfaceFlinger is starting

I/SurfaceFlinger( 2499): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...

I/imx6.gralloc( 2499): primary display name lcd

I/        ( 2499): XmlTool()

I/imx6.gralloc( 2499): colordepth is 0

I/imx6.gralloc( 2499): disp_mode is

W/imx6.gralloc( 2499): using (fd=12)

W/imx6.gralloc( 2499): id           = DISP3 BG

W/imx6.gralloc( 2499): xres         = 480 px

W/imx6.gralloc( 2499): yres         = 272 px

W/imx6.gralloc( 2499): xres_virtual = 480 px

W/imx6.gralloc( 2499): yres_virtual = 1152 px

W/imx6.gralloc( 2499): bpp          = 16

W/imx6.gralloc( 2499): r            = 11:5

W/imx6.gralloc( 2499): g            =  5:6

W/imx6.gralloc( 2499): b            =  0:5

W/imx6.gralloc( 2499): width        = 76 mm (160.421051 dpi)

W/imx6.gralloc( 2499): height       = 43 mm (160.669769 dpi)

W/imx6.gralloc( 2499): refresh rate = 179.54 Hz

E/FramebufferNativeWindow( 2499): fb buffer 0 allocation failed w=480, h=272, err=Out of memory

E/FramebufferNativeWindow( 2499): fb buffer 1 allocation failed w=480, h=272, err=Out of memory

E/FramebufferNativeWindow( 2499): fb buffer 2 allocation failed w=480, h=272, err=Out of memory

D/libEGL  ( 2499): loaded /system/lib/egl/libGLES_android.so

D/libEGL  ( 2499): loaded /system/lib/egl/libEGL_VIVANTE.so

D/libEGL  ( 2499): loaded /system/lib/egl/libGLESv1_CM_VIVANTE.so

D/libEGL  ( 2499): loaded /system/lib/egl/libGLESv2_VIVANTE.so

W/SurfaceFlinger( 2499): ro.sf.lcd_density not defined, using 160 dpi by default.

E/libagl  ( 2499): connect() failed to lock buffer 0x1786548 (480x272)

E/libEGL  ( 2499): eglMakeCurrent:680 error 3002 (EGL_BAD_ACCESS)

E/SurfaceFlinger( 2499): Couldn't create a working GLES context. check logs. exiting...

I/ServiceManager( 2288): service 'power' died

I/ServiceManager( 2288): service 'entropy' died

I/ServiceManager( 2288): service 'sensorservice' died

 

 

My kernel command line is:

enable_wait_mode=off console=ttymxc0,115200 vmalloc=400M consoleblank=0 rootdelay=3 video=mxcfb0:dev=lcd,DTECH,if=RGB666 fbmem=28M androidboot.bootdev=sdhci-esdhc-imx.0 androidboot.hardware=freescale androidboot.console=ttymxc0

 

The kernel boot lines of interest are:

MIPI DSI driver module loaded

mxc_sdc_fb mxc_sdc_fb.0: register mxc display driver lcd

pwm_config: pwm freq = 32786, clk_select=2 clock_rate=6000000

pwm_config: pwm freq = 20000, clk_select=2 clock_rate=6000000

mxc_sdc_fb mxc_sdc_fb.1: register mxc display driver lcd

mxc_sdc_fb mxc_sdc_fb.1: ipu0-di0 already in use

mxc_sdc_fb: probe of mxc_sdc_fb.1 failed with error -16

mxc_sdc_fb mxc_sdc_fb.2: register mxc display driver ldb

_regulator_get: get() with no identifier

imx-ipuv3 imx-ipuv3.1: IPU DMFC DP HIGH RESOLUTION: 1(0,1), 5B(2~5), 5F(6,7)

pwm_config: pwm freq = 32786, clk_select=2 clock_rate=6000000

pwm_config: pwm freq = 20000, clk_select=2 clock_rate=6000000

mxc_sdc_fb mxc_sdc_fb.3: register mxc display driver ldb

 

and here is the repeated logs of surfaceflinger shutting down and restarting:

root@android:/ # init: starting 'surfaceflinger'

init: waitpid returned pid 2470, status = 00000000

init: process 'surfaceflinger', pid 2470 exited

init: process 'surfaceflinger' killing any children in process group

init: service 'zygote' is being killed

init: starting 'zygote'

init: waitpid returned pid 2445, status = 00000009

init: Created socket '/dev/socket/zygote' with mode '666', user '0', group '0'

init: untracked pid 2445 exited

init: waitpid returned pid 2453, status = 00000009

init: untracked pid 2453 exited

init: starting 'surfaceflinger'

init: waitpid returned pid 2499, status = 00000000

init: process 'surfaceflinger', pid 2499 exited

init: process 'surfaceflinger' killing any children in process group

init: service 'zygote' is being killed

init: starting 'zygote'

init: waitpid returned pid 2473, status = 00000009

init: Created socket '/dev/socket/zygote' with mode '666', user '0', group '0'

init: untracked pid 2473 exited

init: waitpid returned pid 2477, status = 00000009

init: untracked pid 2477 exited

 

Can anyone please help? Thanks

Outcomes