vmware: Could not add a reference to a surface, need help

232 views
Skip to first unread message

Xuefer H

unread,
Jun 22, 2017, 10:32:45 PM6/22/17
to Android-x86
android-x83 6.0-r3, downloaded from official website
vmware 12.5.2 build-4638234
it runs fine for some minutes and then starts to get flicker for a few seconds, then black screen, or still image

dmesg shows a lot of
[ 1194.306230] [drm:vmw_surface_handle_reference.isra.13 [vmwgfx]] *ERROR* Could not add a reference to a surface.


dmesg.log

Xuefer H

unread,
Jun 22, 2017, 10:34:35 PM6/22/17
to Android-x86
tested on host: windows 10 && ati 8750, or centos 7 && GT 730
i'm not sure what happen, can anyone help?

Xuefer H

unread,
Jul 7, 2017, 4:41:47 AM7/7/17
to Android-x86
ubuntu 16 LTS seems to be working fine under vmware. is there any thing we can compare it against our android-x86 projects? can we borrow something from ubuntu?

4.8.0-36-generic, Xorg module: xserver-xorg-video-vmware-hwe-16.04
libgl1-mesa-glx:amd64 12.0.6-0ubuntu0.16.04.1

On Friday, June 23, 2017 at 10:32:45 AM UTC+8, Xuefer H wrote:

Mauro Rossi

unread,
Aug 15, 2017, 8:45:42 AM8/15/17
to Android-x86
Hi, do you have "crash test dummies" instructions  on how to collect dmesg and logcat/dumpsys SurfaceFlinger?

In this case you could boot and (virtual)Eth0 will work, but is there a way to collect dmesg logcat when android-x86 it may not boot?

Do you see the number of buffers grow in big numbers?

Do you have the tombstone_xx files from /data/tombstones ?

Do you have also the output of logcat for your case showing the SIGSEGV SIGABRT debug output?
Could you please also collect addr2line -Cfe output per each mesa backtrace point?

e.g.
addr2line -Cfe out/target/product/x86_64/symbols/system/lib64/dri/gallium_dri.so
[enter address of each backtrace point not already visible in the DEBUG lines in logcat ouput]

same for any other library in this list:

addr2line -Cfe out/target/product/x86_64/symbols/system/lib64/egl/libGLES_mesa.so
[...]

addr2line -Cfe out/target/product/x86_64/symbols/system/lib64/libsurfaceflinger.so
[...]

addr2line -Cfe out/target/product/x86_64/symbols/system/bin/surfaceflinger
[...]

The output of addr2line should guve us clues about the actual code lines causing the problem

If it worked in 17.1.5 we may see what was changed in 17.2 and mesa-dev
but was it working with 17.1.5 in the first place?

Cheers

Mauro

Mauro Rossi

unread,
Aug 15, 2017, 8:50:13 AM8/15/17
to Android-x86
Forgot to say:  marshmallow-x86 has mesa 17.0.4 in order to try recent versions have you at least checked out x86/nougat-x86 branch of external/libdrm ?

Mauro

Xuefer H

unread,
Aug 15, 2017, 8:53:46 AM8/15/17
to Android-x86
there wasn't any crash but plainly screen flicker/not updating, and full of same error in dmesg log. logcat isn't updating much but just some noise
can't do any addr2line without any crashing

it's current 6.0 android-x86-r3 that can reproduce the problem
with older version it seems worse. e.g.: in r2 it failed to boot

i'll give any possible combination a try

Chih-Wei Huang

unread,
Aug 16, 2017, 1:09:33 AM8/16/17
to Android-x86
2017-08-15 20:45 GMT+08:00 Mauro Rossi <issor...@gmail.com>:
>
> If it worked in 17.1.5 we may see what was changed in 17.2 and mesa-dev
> but was it working with 17.1.5 in the first place?

All 17.1.2, 17.1.5 and 17.1.6 work for me.
Tested on a Windows 10 host with
VMware Workstation 12.5.7.


--
Chih-Wei
Android-x86 project
http://www.android-x86.org

Xuefer H

unread,
Aug 16, 2017, 10:09:01 PM8/16/17
to Android-x86
yeah, you're born with magic

it won't reproduce for some minutes, switch to text console make it easier to reproduce
i'd like to see anyone else try vmware on it. vmware is easier for most people to test than the real machine. 

Mauro Rossi

unread,
Aug 17, 2017, 8:28:54 AM8/17/17
to Android-x86



it won't reproduce for some minutes, switch to text console make it easier to reproduce
i'd like to see anyone else try vmware on it. vmware is easier for most people to test than the real machine. 

Hi, how to enable the 3D acceleration in vmware player?
Is it possible without installing the vmware tools in the guest?
I'm afraid I've interrupted some vmware host library installation

Could you please advise?
Thanks

Xuefer H

unread,
Aug 17, 2017, 8:51:07 AM8/17/17
to Android-x86
Right click on one of the VM that run android-x86 -> Settings -> Display -> Accelerate 3D graphics
ignore the warning about vmware tools, it never support android/x86 but vice vesa android/x86 need to support this 3d accelerator like vmware tools do. which is kernel+libdrm+mesa+surfaceflinger... whatever you know better than i do

Mauro Rossi

unread,
Aug 17, 2017, 4:52:41 PM8/17/17
to Android-x86


Il giorno mercoledì 16 agosto 2017 07:09:33 UTC+2, Chih-Wei Huang ha scritto:
2017-08-15 20:45 GMT+08:00 Mauro Rossi <issor...@gmail.com>:
>
> If it worked in 17.1.5 we may see what was changed in 17.2 and mesa-dev
> but was it working with 17.1.5 in the first place?

All 17.1.2, 17.1.5 and 17.1.6 work for me.
Tested on a Windows 10 host with
VMware Workstation 12.5.7.

Hi Chih-Wei,

on Ubuntu host I get different results
VMware player writes a warning that 3D acceleration is disabled
and then SurfaceFlinger sends a SIGABRT because he did not get the required fd,
even if the driver name is recognized as vmwgfx

Do I need to install some livrary in the host or to modify some vmware player configuration (or config file)
to have "real HW acceleration" ?

Thanks for any info

Mauro
Screenshot from 2017-08-17 22-49-03.png
Screenshot from 2017-08-17 22-39-27.png
Screenshot from 2017-08-17 22-39-27.png

Xuefer H

unread,
Aug 17, 2017, 7:36:35 PM8/17/17
to Android-x86
That exactly i know
Your host graphic hardware do not support 3D, or your driver on the host is blacklisted by vmware, which mean the driver is proven to be unstable
in case you're using nouveau (opensource driver) for nvidia card, install nvidia closed source binary driver instead. google around on how to disable loading nouveau and install closed source one on console with X server is stopped

Mauro Rossi

unread,
Aug 18, 2017, 1:13:08 PM8/18/17
to Android-x86


Il giorno venerdì 18 agosto 2017 01:36:35 UTC+2, Xuefer H ha scritto:
That exactly i know
Your host graphic hardware do not support 3D, or your driver on the host is blacklisted by vmware, which mean the driver is proven to be unstable
in case you're using nouveau (opensource driver) for nvidia card, install nvidia closed source binary driver instead. google around on how to disable loading nouveau and install closed source one on console with X server is stopped

There is no need to install nvidia proprietary driver

I edited the file ~/.vmware/preferences (created after installation) and added the following line

mks.gl.allowBlacklistedDrivers = “TRUE”

Reference:

Nice toy VMwareplayer with 3D acceleration.
M.

Xuefer H

unread,
Aug 18, 2017, 9:57:10 PM8/18/17
to Android-x86
exactly, lifting blacklist is a way. but there's a reason for the blacklist. nouveau is unstable for me even not running vmware. X server stuck after a few minutes or hours. not happening with nvidia driver. it can be combination of kernel/Xserver/libs/which-nv-driver/nv-card blahblah but i haven't figure out other factor except nouveau-vs-nvidia driver. even though, it is not relative to the problem i discuss in this thread. can you reproduce it yet?

Mauro Rossi

unread,
Aug 19, 2017, 4:00:38 PM8/19/17
to Android-x86


Il giorno venerdì 18 agosto 2017 19:13:08 UTC+2, Mauro Rossi ha scritto:


Il giorno venerdì 18 agosto 2017 01:36:35 UTC+2, Xuefer H ha scritto:
That exactly i know
Your host graphic hardware do not support 3D, or your driver on the host is blacklisted by vmware, which mean the driver is proven to be unstable
in case you're using nouveau (opensource driver) for nvidia card, install nvidia closed source binary driver instead. google around on how to disable loading nouveau and install closed source one on console with X server is stopped

There is no need to install nvidia proprietary driver

I edited the file ~/.vmware/preferences (created after installation) and added the following line

mks.gl.allowBlacklistedDrivers = “TRUE”

Well it has to be with the following double quotes, because the one I pasted in the previous post do not work 

Mauro Rossi

unread,
Aug 20, 2017, 6:44:36 PM8/20/17
to Android-x86


Il giorno sabato 19 agosto 2017 03:57:10 UTC+2, Xuefer H ha scritto:
exactly, lifting blacklist is a way. but there's a reason for the blacklist. nouveau is unstable for me even not running vmware. X server stuck after a few minutes or hours. not happening with nvidia driver. it can be combination of kernel/Xserver/libs/which-nv-driver/nv-card blahblah but i haven't figure out other factor except nouveau-vs-nvidia driver. even though, it is not relative to the problem i discuss in this thread. can you reproduce it yet?

The problem you see does not appear in android-x86 7.1
svga driver works very smoothly with 3D acceleration with both nouveau and radeon

Logs in the attachment
Mauro


PS: The current main issue with svga is that RGBA pipe format is a supported but RGBX is not, 
even if they have indeed the same memory footprint. 

For this reason Unity Benchmark and Rajawali show black 3D renders.

Hacking gralloc_drm_pipe.c in this way it is even possible to see the 3D renders,
i tried it with mesa-dev, but the 2D texture are still black.

diff --git a/gralloc_drm_pipe.c b/gralloc_drm_pipe.c
index 4fff6f1..90e9a6c 100644
--- a/gralloc_drm_pipe.c
+++ b/gralloc_drm_pipe.c
@@ -71,7 +71,7 @@ static enum pipe_format get_pipe_format(int format)
                fmt = PIPE_FORMAT_R8G8B8A8_UNORM;
                break;
        case HAL_PIXEL_FORMAT_RGBX_8888:
-               fmt = PIPE_FORMAT_R8G8B8X8_UNORM;
+               fmt = PIPE_FORMAT_R8G8B8A8_UNORM;
                break;
        case HAL_PIXEL_FORMAT_RGB_888:
                fmt = PIPE_FORMAT_R8G8B8_UNORM;

The real solutions needs the support of RGBX in svga driver in mesa
and we may even see 2D textures, i.e. having vmware player working in 100% of Use Cases (for non commercial purposes only...)

Mauro

Mauro Rossi

unread,
Aug 20, 2017, 6:46:48 PM8/20/17
to Android-x86


Il giorno lunedì 21 agosto 2017 00:44:36 UTC+2, Mauro Rossi ha scritto:


Il giorno sabato 19 agosto 2017 03:57:10 UTC+2, Xuefer H ha scritto:
exactly, lifting blacklist is a way. but there's a reason for the blacklist. nouveau is unstable for me even not running vmware. X server stuck after a few minutes or hours. not happening with nvidia driver. it can be combination of kernel/Xserver/libs/which-nv-driver/nv-card blahblah but i haven't figure out other factor except nouveau-vs-nvidia driver. even though, it is not relative to the problem i discuss in this thread. can you reproduce it yet?

The problem you see does not appear in android-x86 7.1
svga driver works very smoothly with 3D acceleration with both nouveau and radeon

Logs in the attachment
Mauro

and here is the attachment
M.
logs_vmwgfx_mesa-17.1.tar.gz

Xuefer H

unread,
Aug 20, 2017, 9:58:25 PM8/20/17
to Android-x86
thanks. i'm not sure if i have black 3D render issue. how did you reproduce it?
is there any suggestion on how to make android 6 fix this problem like it in 7? i don't want to go for 7 as it's not as stable as 6 in android-x86 yet

Xuefer H

unread,
Aug 20, 2017, 10:00:48 PM8/20/17
to Android-x86
secondly, can you please kindly try to reproduce it in 6? you don't have to recompile everything. the one release on android-x86.org is confirmed to be reproduced by me
Message has been deleted

Mauro Rossi

unread,
Aug 21, 2017, 3:59:01 PM8/21/17
to Android-x86


Il giorno lunedì 21 agosto 2017 03:58:25 UTC+2, Xuefer H ha scritto:
thanks. i'm not sure if i have black 3D render issue. how did you reproduce it?

These apps are good for 2D and 3D textures tests

Rajawali examples app
Basemark ES2 app

On mesa 17.0.4 coming with marshmallow-x86 you would preliminary cherry-pick of the following commit
and the test app for that issues is Gears by Jeff Boody

 
is there any suggestion on how to make android 6 fix this problem like it in 7? i don't want to go for 7 as it's not as stable as 6 in android-x86 yet

? kernel 4.9 and mesa 17.1.7 ?

NOTE: in case you have issue with building mesa 17.1.x you may need to disable radeonsi and swrast drivers in BoardConfig.mk
to decouple mesa build from llvm

Mauro Rossi

unread,
Aug 21, 2017, 4:17:57 PM8/21/17
to Android-x86


Il giorno lunedì 21 agosto 2017 04:00:48 UTC+2, Xuefer H ha scritto:
secondly, can you please kindly try to reproduce it in 6? you don't have to recompile everything. the one release on android-x86.org is confirmed to be reproduced by me

When I may have some time, but no promises

Mauro

Xuefer H

unread,
Aug 22, 2017, 9:54:15 AM8/22/17
to Android-x86
similar problem. it starts to blink, raising the same problem as this topic title. then the main area is black while the system UI (status bar, nav bar, quick setting tiles) is visible
pressing "Recently" button animation title bar only, no preview screenshot of the app, no list is shown. title bar is shown only during animation

Xuefer H

unread,
Aug 22, 2017, 10:26:49 AM8/22/17
to Android-x86
08-23 06:18:46.254 10325 10354 I OMXClient: Using client-side OMX mux.
08-23 06:18:46.261  6156  6552 I StatusBarManagerService: registerStatusBar bar=com.android.internal.statusbar.IStatusBar$Stub$Proxy@748bbbd
08-23 06:18:46.285  6156  6276 D WifiService: New client listening to asynchronous messages
08-23 06:18:46.318  6156  6195 D BluetoothManagerService: Added callback: android.bluetooth.IBluetoothManagerCallback$Stub$Proxy@c6ef62:true
08-23 06:18:46.321 10325 10325 D LocalBluetoothProfileManager: Adding local MAP profile
08-23 06:18:46.321 10325 10325 D BluetoothMap: Create BluetoothMap proxy object
08-23 06:18:46.323 10325 10325 D LocalBluetoothProfileManager: LocalBluetoothProfileManager construction complete
08-23 06:18:46.324  6156  6175 D ConnectivityService: listenForNetwork for Listen from uid/pid:10017/10325 for NetworkRequest [ id=82, legacyType=-1, [] ]
08-23 06:18:46.328 10325 10325 I CameraManagerGlobal: Connecting to camera service
08-23 06:18:46.346 10325 10365 D OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
08-23 06:18:46.346 10325 10365 D OpenGLRenderer: profile bars disabled
08-23 06:18:46.346 10325 10365 D OpenGLRenderer: ambientRatio = 1.50
08-23 06:18:46.352 10325 10325 I GRALLOC-DRM: create pipe for driver vmwgfx
08-23 06:18:46.352 10325 10325 E GRALLOC-PIPE: failed to allocate pipe buffer
08-23 06:18:46.352 10325 10325 W GraphicBufferMapper: registerBuffer(0x7f726783de80) failed -22 (Invalid argument)
08-23 06:18:46.352 10325 10325 E GraphicBuffer: unflatten: registerBuffer failed: Invalid argument (-22)
08-23 06:18:46.355 10325 10325 D PhoneStatusBar: disable: < expand icons alerts system_info back home recent clock search quick_settings >
08-23 06:18:46.368 10325 10325 D PhoneStatusBar: heads up is enabled
08-23 06:18:46.371 10325 10325 W KeyguardUpdateMonitor: invalid subId in handleSimStateChange()
08-23 06:18:46.371 10325 10325 W KeyguardUpdateMonitor: invalid subId in handleServiceStateChange()
08-23 06:18:46.372  6156  6276 D WifiService: New client listening to asynchronous messages
08-23 06:18:46.373 10325 10325 D ViewRootImpl: changeCanvasOpacity: opaque=true
08-23 06:18:46.395 10325 10365 I EGL-DRI2: found extension DRI_Core version 1
08-23 06:18:46.395 10325 10365 I EGL-DRI2: found extension DRI_DRI2 version 4
08-23 06:18:46.396 10325 10365 I EGL-DRI2: found extension DRI_TexBuffer version 2
08-23 06:18:46.396 10325 10365 I EGL-DRI2: found extension DRI2_Flush version 4
08-23 06:18:46.396 10325 10365 I EGL-DRI2: found extension DRI_IMAGE version 12
08-23 06:18:46.396 10325 10365 I EGL-DRI2: found extension DRI_RENDERER_QUERY version 1
08-23 06:18:46.396 10325 10365 I EGL-DRI2: found extension DRI_CONFIG_QUERY version 1
08-23 06:18:46.396 10325 10365 I EGL-DRI2: found extension DRI2_Fence version 2
08-23 06:18:46.396 10325 10365 I EGL-DRI2: found extension DRI2_Interop version 108-23 06:18:46.396 10325 10365 I OpenGLRenderer: Initialized EGL, version 1.4
08-23 06:18:46.396 10325 10365 W OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
08-23 06:18:46.398 10325 10365 W OpenGLRenderer: Error creating image (0x300c)
08-23 06:18:46.398 10325 10365 W OpenGLRenderer: Could not create atlas image
08-23 06:18:46.398 10325 10365 F libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8 in tid 10365 (RenderThread)
08-23 06:18:46.499  1867  1867 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-23 06:18:46.499  1867  1867 F DEBUG   : Build fingerprint: 'x86_64_arm/x86_64_arm/x86_64_arm:6.0.1/MOB31T/xuefer08221453:userdebug/by:Xuefer,test-keys'
08-23 06:18:46.499  1867  1867 F DEBUG   : Revision: '0'
08-23 06:18:46.499  1867  1867 F DEBUG   : ABI: 'x86_64'
08-23 06:18:46.499  1867  1867 F DEBUG   : pid: 10325, tid: 10365, name: RenderThread  >>> com.android.systemui <<<
08-23 06:18:46.500  1867  1867 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8
08-23 06:18:46.500  1867  1867 E DEBUG   : AM write failed: Broken pipe
08-23 06:18:46.505  1867  1867 F DEBUG   :     rax 0000000000000000  rbx 00007f726a1fd940  rcx 000000000000003d  rdx 0000000000000000
08-23 06:18:46.505  1867  1867 F DEBUG   :     rsi 0000000000000010  rdi 000000000000000b
08-23 06:18:46.505  1867  1867 F DEBUG   :     r8  0000000000000001  r9  0000000000000003  r10 0000000000002721  r11 0000000000000202
08-23 06:18:46.505  1867  1867 F DEBUG   :     r12 00007f72683b9000  r13 00007f7266b3f1c0  r14 00007f7274d99a70  r15 00007f726a1fd940
08-23 06:18:46.505  1867  1867 F DEBUG   :     cs  0000000000000033  ss  000000000000002b
08-23 06:18:46.505  1867  1867 F DEBUG   :     rip 00007f727d3898f4  rbp 00007f7266b3f220  rsp 00007f7266b3f190  eflags 0000000000010246
08-23 06:18:46.506  1867  1867 F DEBUG   :
08-23 06:18:46.506  1867  1867 F DEBUG   : backtrace:
08-23 06:18:46.506  1867  1867 F DEBUG   :     #00 pc 00000000000378f4  /system/lib64/libhwui.so (_ZN7android10uirenderer10AssetAtlas4initENS_2spINS_13GraphicBufferEEEPli+180)
08-23 06:18:46.506  1867  1867 F DEBUG   :     #01 pc 000000000002d01c  /system/lib64/libhwui.so
08-23 06:18:46.506  1867  1867 F DEBUG   :     #02 pc 00000000000280ee  /system/lib64/libhwui.so
08-23 06:18:46.506  1867  1867 F DEBUG   :     #03 pc 000000000002dc1f  /system/lib64/libhwui.so
08-23 06:18:46.506  1867  1867 F DEBUG   :     #04 pc 000000000002dada  /system/lib64/libhwui.so
08-23 06:18:46.506  1867  1867 F DEBUG   :     #05 pc 0000000000030e68  /system/lib64/libhwui.so (_ZN7android10uirenderer12renderthread12RenderThread10threadLoopEv+136)
08-23 06:18:46.506  1867  1867 F DEBUG   :     #06 pc 0000000000017412  /system/lib64/libutils.so (_ZN7android6Thread11_threadLoopEPv+370)
08-23 06:18:46.506  1867  1867 F DEBUG   :     #07 pc 00000000000a6873  /system/lib64/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+83)
08-23 06:18:46.506  1867  1867 F DEBUG   :     #08 pc 0000000000085b0e  /system/lib64/libc.so (_ZL15__pthread_startPv+46)
08-23 06:18:46.506  1867  1867 F DEBUG   :     #09 pc 00000000000293fb  /system/lib64/libc.so (__start_thread+11)
08-23 06:18:46.506  1867  1867 F DEBUG   :     #10 pc 000000000001cb75  /system/lib64/libc.so (__bionic_clone+53)
08-23 06:18:46.575  1867  1867 F DEBUG   :
08-23 06:18:46.575  1867  1867 F DEBUG   : Tombstone written to: /data/tombstones/tombstone_04


this is when blinking happens

Xuefer H

unread,
Aug 23, 2017, 5:09:31 AM8/23/17
to Android-x86
with kernel 4.12 4.13 it reboot immediately after cdrom boot with menu selected, emergency remount+reboot
with 4.12, it boots, it seems stable if i stay out of console Ctrl+Alt+F1. but surfaceflinger may go black if i stay at console F1 and keep "top" command running


On Friday, June 23, 2017 at 10:32:45 AM UTC+8, Xuefer H wrote:

Xuefer H

unread,
Aug 23, 2017, 7:34:48 AM8/23/17
to Android-x86
it looks switching to console will any any android/GUI request to the 3D render/api
Reply all
Reply to author
Forward
0 new messages