Lima fails with white screen in master. 19.1 is ok
In sailfish on the pinephone, we are using lima 19.1.4 relatively successfully. However, when updating to a more recent version in a hope to fix various rendering issues, we hit a problem.
To simplify, I built kmscube to test the mesa install.
Running kmscube with master results in a white screen.
I bisected over about 8 hours (!) and found the culprit to be this commit: mesa/mesa@cf1ab4b9
I double checked the previous commit which shows kmscube ok: mesa/mesa@443c5a3c
Userspace is 32bit, and compiler is gcc version 4.9.4 20160726 (Mer 4.9.4-1) (Linaro GCC 4.9-2017.01)
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Developer
I might have an environment to reproduce 32-bit userspace on 64-bit kernel issues. If you can manage to get an apitrace I can try to reproduce it.
- Developer
FWIW since you mention kmscube, kmscube works fine for me on my 32-bit userspace 64-bit kernel environment.
- Developer
Well on my testing kmscube works with 32-bit userspace and 64-bit kernel on a recent distribution, so I think we can rule out a bug because of that. So I believe all you can do is try another distribution or gradually upgrade parts of the distribution you are using to find what is broken.
I tried this with a fedora 30 armv7hfp container. If you can't install another distribution on your platform, can you find a way to install docker on it and try it on a container?
- Developer
I suggest to completely disregard the "offending" commit as it has been there for a long time, is completely unrelated to the issue and it is unlikely we can do anything about it.
- Developer
Are you using ccache? If so could you completely clear it and try a recent build from master?
- Developer
Sorry at this point this is such a specific issue that I don't have so much interest in doing something like that. A general 32-bit on 64-bit bug would be interesting to lima but this seems like just an environment dependent thing we can't support. I'm afraid you will have to come up with a more standard environment to have something others can reproduce on their own on git master builds (regardless of 32-bit and 64-bit combination now).
- Developer
So, any update?
If I was to try to reproduce this, do I need a pinephone with sailfish OS?
Not much of an update. Neochapay has got mesa master working with mer, sailfish 'upstream'. He has the benefit of gcc8 and an aarch64 rootfs. Im still waiting for him to try his work on regular sailfish. A pinephone with sailfish would be the ideal environment, is that something youd be willing to try?
Attached output of LIMA_DEBUG=dump ./kmscube -D/dev/dri/card1 on Pinephone with sailfish Mesa is as below: Using display 0x803a20 with EGL version 1.4
EGL information: version: "1.4" vendor: "Mesa Project" client extensions: "EGL_EXT_client_extensions EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_KHR_debug EGL_EXT_platform_wayland EGL_MESA_platform_gbm EGL_EXT_platform_device" display extensions: "EGL_ANDROID_blob_cache EGL_ANDROID_native_fence_sync EGL_EXT_buffer_age EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_KHR_cl_event2 EGL_KHR_config_attribs EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_no_config_context EGL_KHR_partial_update EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_EXT_pixel_format_float EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_image_dma_buf_export EGL_MESA_query_driver EGL_WL_bind_wayland_display "
OpenGL ES 2.x information: version: "OpenGL ES 2.0 Mesa 20.0.0-devel" shading language version: "OpenGL ES GLSL ES 1.0.16" vendor: "lima" renderer: "Mali400" extensions: "GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_format_BGRA8888 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_EGL_image GL_OES_depth_texture GL_OES_packed_depth_stencil GL_OES_get_program_binary GL_APPLE_texture_max_level GL_EXT_discard_framebuffer GL_EXT_read_format_bgra GL_EXT_frag_depth GL_NV_fbo_color_attachments GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_array_object GL_EXT_occlusion_query_boolean GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer GL_NV_read_depth GL_NV_read_depth_stencil GL_NV_read_stencil GL_EXT_draw_buffers GL_EXT_map_buffer_range GL_KHR_debug GL_KHR_texture_compression_astc_ldr GL_OES_required_internalformat GL_OES_surfaceless_context GL_EXT_separate_shader_objects GL_EXT_compressed_ETC1_RGB8_sub_texture GL_EXT_draw_elements_base_vertex GL_EXT_texture_border_clamp GL_KHR_context_flush_control GL_OES_draw_elements_base_vertex GL_OES_texture_border_clamp GL_KHR_no_error GL_KHR_texture_compression_astc_sliced_3d GL_KHR_parallel_shader_compile "
Edited by Adam Pigg- Developer
I spent few hours setting up 32-bit chroot on archlinux but unfortunately I can't reproduce the bug in it. kmscube works just fine as well as X11.
My meson command is:
meson -Dplatforms=drm,x11,wayland,surfaceless -Ddri-drivers='' -Dgallium-drivers=lima,kmsro -Dvulkan-drivers='' -Dprefix=/home/alarm/usr -Dlibunwind=false -Dglx=dri -Degl=true -Dglvnd=true build
With 19.3.2
LIMA_DEBUG=dump kmscube -D/dev/dri/card1 lima: dump command stream to file lima.dump Using display 0x1723e98 with EGL version 1.4 =================================== EGL information: version: "1.4" vendor: "Mesa Project" client extensions: "EGL_EXT_client_extensions EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_KHR_debug EGL_EXT_platform_wayland EGL_MESA_platform_gbm EGL_EXT_platform_device" display extensions: "EGL_ANDROID_blob_cache EGL_ANDROID_native_fence_sync EGL_EXT_buffer_age EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_KHR_cl_event2 EGL_KHR_config_attribs EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_i" =================================== OpenGL ES 2.x information: version: "OpenGL ES 2.0 Mesa 19.3.2" shading language version: "OpenGL ES GLSL ES 1.0.16" vendor: "lima" renderer: "Mali400" extensions: "GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_format_BGRA8888 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_EGL_image GL_OES_depth_texture GL_OES_packed_depth_stencil GL_OES_get_program_binary GL_APPLE_texture_max_level GL_EXT_discard_framebuffer GL_EXT_read_format_b" ===================================
Edited by Chupligin SergeyWith current master
[nemo@PinePhone ~]$ kmscube -D/dev/dri/card1 Using display 0x1e63760 with EGL version 1.4 =================================== EGL information: version: "1.4" vendor: "Mesa Project" client extensions: "EGL_EXT_client_extensions EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_KHR_debug EGL_EXT_platform_wayland EGL_MESA_platform_gbm EGL_EXT_platform_device" display extensions: "EGL_ANDROID_blob_cache EGL_ANDROID_native_fence_sync EGL_EXT_buffer_age EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_KHR_cl_event2 EGL_KHR_config_attribs EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fen" =================================== OpenGL ES 2.x information: version: "OpenGL ES 2.0 Mesa 20.0.0-devel" shading language version: "OpenGL ES GLSL ES 1.0.16" vendor: "lima" renderer: "Mali400" extensions: "GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_format_BGRA8888 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_stencil8 GL_OES_texture_3D GL_OES_t" ===================================
- Developer
These logs and debug.zip are unfortunately not very helpful. kmscube works fine on master everywhere else. You still need to find the differences that matter between your platform and working platforms. For example master on another operating system where it works.
It is also strange that you need
-D/dev/dri/card1
. On a normal system that should not be needed. Try ensuring that sun4i-drm (or other display driver) loads before lima so it claims card0 and lima card1. Note that things like kmscube need to run on the display driver card node (which calls lima in the backend), not directly the lima node. This should make things easier for other applications too.I'd try reproducing that myself on a pinephone but I don't have one.
@enunes if i run kmscube without any parametrs in strace log i see:
openat(AT_FDCWD, "/dev/dri", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_CLOEXEC|O_DIRECTORY) = 3 fstat64(3, {st_mode=S_IFDIR|0755, st_size=100, ...}) = 0 getdents64(3, /* 5 entries */, 32768) = 144 stat64("/dev/dri/card1", {st_mode=S_IFCHR|0660, st_rdev=makedev(0xe2, 0x1), ...}) = 0 stat64("/sys/dev/char/226:1/device/drm", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 readlink("/sys/dev/char/226:1/device/subsystem", "../../../bus/platform", 4096) = 21 openat(AT_FDCWD, "/sys/dev/char/226:1/device/uevent", O_RDONLY|O_LARGEFILE) = 4 fstat64(4, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0 read(4, "DRIVER=sun4i-drm\nOF_NAME=display"..., 4096) = 209 close(4) = 0 openat(AT_FDCWD, "/sys/dev/char/226:1/device/uevent", O_RDONLY|O_LARGEFILE) = 4 fstat64(4, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0 read(4, "DRIVER=sun4i-drm\nOF_NAME=display"..., 4096) = 209 close(4) = 0 openat(AT_FDCWD, "/sys/dev/char/226:1/device/uevent", O_RDONLY|O_LARGEFILE) = 4 fstat64(4, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0 read(4, "DRIVER=sun4i-drm\nOF_NAME=display"..., 4096) = 209 close(4) = 0 stat64("/dev/dri/card0", {st_mode=S_IFCHR|0660, st_rdev=makedev(0xe2, 0), ...}) = 0 stat64("/sys/dev/char/226:0/device/drm", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 readlink("/sys/dev/char/226:0/device/subsystem", "../../../../bus/platform", 4096) = 24 openat(AT_FDCWD, "/sys/dev/char/226:0/device/uevent", O_RDONLY|O_LARGEFILE) = 4 fstat64(4, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0 read(4, "DRIVER=lima\nOF_NAME=gpu\nOF_FULLN"..., 4096) = 205 close(4) = 0 openat(AT_FDCWD, "/sys/dev/char/226:0/device/uevent", O_RDONLY|O_LARGEFILE) = 4 fstat64(4, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0 read(4, "DRIVER=lima\nOF_NAME=gpu\nOF_FULLN"..., 4096) = 205 close(4) = 0 openat(AT_FDCWD, "/sys/dev/char/226:0/device/uevent", O_RDONLY|O_LARGEFILE) = 4 fstat64(4, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0 read(4, "DRIVER=lima\nOF_NAME=gpu\nOF_FULLN"..., 4096) = 205 close(4) = 0 openat(AT_FDCWD, "/sys/dev/char/226:0/device/uevent", O_RDONLY|O_LARGEFILE) = 4 fstat64(4, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0 read(4, "DRIVER=lima\nOF_NAME=gpu\nOF_FULLN"..., 4096) = 205 close(4) = 0 stat64("/dev/dri/renderD128", {st_mode=S_IFCHR|0660, st_rdev=makedev(0xe2, 0x80), ...}) = 0 stat64("/sys/dev/char/226:128/device/drm", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 readlink("/sys/dev/char/226:128/device/subsystem", "../../../../bus/platform", 4096) = 24 openat(AT_FDCWD, "/sys/dev/char/226:128/device/uevent", O_RDONLY|O_LARGEFILE) = 4 fstat64(4, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0 read(4, "DRIVER=lima\nOF_NAME=gpu\nOF_FULLN"..., 4096) = 205 close(4) = 0 openat(AT_FDCWD, "/sys/dev/char/226:128/device/uevent", O_RDONLY|O_LARGEFILE) = 4 fstat64(4, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0 read(4, "DRIVER=lima\nOF_NAME=gpu\nOF_FULLN"..., 4096) = 205 close(4) = 0 openat(AT_FDCWD, "/sys/dev/char/226:128/device/uevent", O_RDONLY|O_LARGEFILE) = 4 fstat64(4, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0 read(4, "DRIVER=lima\nOF_NAME=gpu\nOF_FULLN"..., 4096) = 205 close(4) = 0 openat(AT_FDCWD, "/sys/dev/char/226:128/device/uevent", O_RDONLY|O_LARGEFILE) = 4 fstat64(4, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0 read(4, "DRIVER=lima\nOF_NAME=gpu\nOF_FULLN"..., 4096) = 205
This correct init ?
Edited by Chupligin SergeyWhen i run LIMA_DEBUG=dump /usr/bin/kmscube i got:
lima: dump command stream to file lima.dump.0000 Using display 0x169d4c8 with EGL version 1.4 =================================== EGL information: version: "1.4" vendor: "Mesa Project" client extensions: "EGL_EXT_client_extensions EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_EXT_platform_base EGL_KHR_clie" display extensions: "EGL_ANDROID_blob_cache EGL_ANDROID_native_fence_sync EGL_EXT_buffer_age EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_impo" =================================== OpenGL ES 2.x information: version: "OpenGL ES 2.0 Mesa 20.0.0-devel" shading language version: "OpenGL ES GLSL ES 1.0.16" vendor: "lima" renderer: "Mali400" extensions: "GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_format_BGRA8888 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_e" =================================== lima: dump command stream to file lima.dump.0001 lima: dump command stream to file lima.dump.0002 lima: dump command stream to file lima.dump.0003 lima: dump command stream to file lima.dump.0004 lima: dump command stream to file lima.dump.0005 lima: dump command stream to file lima.dump.0006 lima: dump command stream to file lima.dump.0007 lima: dump command stream to file lima.dump.0008 lima: dump command stream to file lima.dump.0009 lima: dump command stream to file lima.dump.0010 lima: dump command stream to file lima.dump.0011 lima: dump command stream to file lima.dump.0012 lima: dump command stream to file lima.dump.0013 lima: dump command stream to file lima.dump.0014 lima: dump command stream to file lima.dump.0015 lima: dump command stream to file lima.dump.0016 ---- lima: dump command stream to file lima.dump.0104 lima: dump command stream to file lima.dump.0105 lima: dump command stream to file lima.dump.0106 lima: dump command stream to file lima.dump.0107 lima: dump command stream to file lima.dump.0108 lima: dump command stream to file lima.dump.0109 lima: dump command stream to file lima.dump.0110 lima: dump command stream to file lima.dump.0111 lima: dump command stream to file lima.dump.0112 lima: dump command stream to file lima.dump.0113 lima: dump command stream to file lima.dump.0114 lima: dump command stream to file lima.dump.0115 lima: dump command stream to file lima.dump.0116 lima: dump command stream to file lima.dump.0117 lima: dump command stream to file lima.dump.0118 lima: dump command stream to file lima.dump.0119
I bzipped it