projectacrn / acrn-hypervisor

Project ACRN hypervisor
BSD 3-Clause "New" or "Revised" License
1.1k stars 506 forks source link

AGL as User OS - Weston GUI not starting #4148

Open KalevGonvick opened 4 years ago

KalevGonvick commented 4 years ago

Hi I am having an issue with starting the Weston GUI on our AGL UOS.

There are no errors when launching the UOS. We followed this guide. Changing the weston.ini and rebooting has no effect.

The SOS is built from source for the apl-up2 board using the SDC scenario. I am not sure if this would have any effect, but the guide uses ACRN Hypervisor release 1.3, while we used 1.0.

SIDE NOTE: Should the AGL VM have afm-utils already installed? I can't seem to find it.

Edit: I have looked back through the startup and noticed there actually are a few errors. We just modified the NUC UOS startup script to work for the UP2 board, but I think we are missing some parameters.

Is there a way to change the apl-ups script found here to launch a single AGL UOS?

Mingyuan18 commented 4 years ago

[External_System_ID] ACRN-5783

fuzhongl commented 4 years ago

@KalevGonvick Please share following log: uname -a and cat /proc/cmdline both in sos and uos Thanks!

gvancuts commented 4 years ago

@KalevGonvick , in addition the details asked by @fuzhongl , can you also explain how you installed version 1.0 of ACRN?

I believe the launch script you are using is really meant for systems running SBL (and launching a User VM using vSBL), @fuzhongl , can you confirm (or infirm) this? What Bios version is on your UP2.

You may also need to adjust all display output from the tutorial you followed as you're using an UP2 and the tutorial is for a NUC.

fuzhongl commented 4 years ago

I believe the launch script you are using is really meant for systems running SBL (and launching a User VM using vSBL), @fuzhongl , can you confirm (or infirm) this? What Bios version is on your UP2.

@gvancuts You are right, KalevGonvick is launching a User VM using vSBL.

@KalevGonvick Could you please try with UEFI version; instead of SBL? Thanks!

KalevGonvick commented 4 years ago

@fuzhongl @gvancuts

gvancuts commented 4 years ago

Hi @KalevGonvick , I assume that the AGL User VM starts up correctly, am I right? Is the issue that you do not see the Weston UI? If true, we need to look at the AcrnGT parameters, they are documented here. And we also need to check the content of the weston.ini file. Do you have any logs of what happens inside the User OS (weston log, journalctl)?

KalevGonvick commented 4 years ago

The AGL UOS Seems to launch fine. There is definitely an issue with Weston not being able to launch.

Here is the log:

[14:22:29.125] Command line: /usr/bin/weston --idle-time=0 --tty=1 --log=/run/platform/display/weston.log [14:22:29.125] OS: Linux, 4.19.68-uos, #1 SMP PREEMPT Thu Nov 28 03:12:45 UTC 2019, x86_64 [14:22:29.125] warning: XDG_RUNTIME_DIR "/run/platform/display" is not configured correctly. Unix access mode must be 0700 (current mode is 770), and must be owned by the user (current owner is UID 200). Refer to your distribution on how to get it, or http://www.freedesktop.org/wiki/Specifications/basedir-spec on how to implement it. [14:22:29.133] Using config file '/etc/xdg/weston/weston.ini' [14:22:29.141] Output repaint window is 7 ms maximum. [14:22:29.143] Loading module '/usr/lib/libweston-2/drm-backend.so' [14:22:29.215] initializing drm backend [14:22:29.225] logind: not running in a systemd session [14:22:29.225] logind: cannot setup systemd-logind helper (-61), using legacy fallback [14:22:29.265] using /dev/dri/card0 [14:22:29.276] Loading module '/usr/lib/libweston-2/gl-renderer.so' [14:22:29.547] EGL client extensions: EGL_EXT_client_extensions EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_KHR_debug EGL_EXT_platform_wayland EGL_MESA_platform_gbm [14:22:29.558] warning: neither EGL_EXT_swap_buffers_with_damage or EGL_KHR_swap_buffers_with_damage is supported. Performance could be affected. [14:22:29.558] EGL_KHR_surfaceless_context available [14:22:29.648] EGL version: 1.4 (DRI2) [14:22:29.648] EGL vendor: Mesa Project [14:22:29.648] EGL client APIs: OpenGL OpenGL_ES [14:22:29.648] EGL extensions: EGL_ANDROID_native_fence_sync EGL_EXT_buffer_age EGL_EXT_image_dma_buf_import EGL_KHR_config_attribs EGL_KHR_create_context EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_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_reusable_sync EGL_KHR_surfaceless_context EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_image_dma_buf_export EGL_WL_bind_wayland_display [14:22:29.648] GL version: OpenGL ES 3.2 Mesa 17.1.7 [14:22:29.648] GLSL version: OpenGL ES GLSL ES 3.20 [14:22:29.648] GL vendor: Intel Open Source Technology Center [14:22:29.648] GL renderer: Mesa DRI Intel(R) HD Graphics 505 (Broxton) [14:22:29.648] GL extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_filter_anisotropic GL_EXT_texture_compression_dxt1 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_standard_derivatives GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_float_linear GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_EXT_texture_sRGB_decode GL_OES_EGL_image GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_type_2_10_10_10_REV 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_OES_viewport_array GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_EXT_robustness GL_EXT_texture_rg 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_robustness GL_KHR_texture_compression_astc_ldr GL_OES_depth_texture_cube_map GL_OES_surfaceless_context GL_EXT_color_buffer_float GL_EXT_separate_shader_objects GL_EXT_shader_framebuffer_fetch GL_EXT_shader_integer_mix GL_EXT_tessellation_point_size GL_EXT_tessellation_shader GL_INTEL_conservative_rasterization GL_INTEL_performance_query GL_ANDROID_extension_pack_es31a GL_EXT_compressed_ETC1_RGB8_sub_texture GL_EXT_copy_image GL_EXT_draw_buffers_indexed GL_EXT_draw_elements_base_vertex GL_EXT_gpu_shader5 GL_EXT_polygon_offset_clamp GL_EXT_primitive_bounding_box GL_EXT_shader_io_blocks GL_EXT_texture_border_clamp GL_EXT_texture_buffer GL_EXT_texture_cube_map_array GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_KHR_context_flush_control GL_KHR_robust_buffer_access_behavior GL_NV_image_formats GL_OES_copy_image GL_OES_draw_buffers_indexed GL_OES_draw_elements_base_vertex GL_OES_gpu_shader5 GL_OES_primitive_bounding_box GL_OES_sample_shading GL_OES_sample_variables GL_OES_shader_io_blocks GL_OES_shader_multisample_interpolation GL_OES_tessellation_point_size GL_OES_tessellation_shader GL_OES_texture_border_clamp GL_OES_texture_buffer GL_OES_texture_cube_map_array GL_OES_texture_stencil8 GL_OES_texture_storage_multisample_2d_array GL_EXT_blend_func_extended GL_EXT_buffer_storage GL_EXT_geometry_point_size GL_EXT_geometry_shader GL_EXT_shader_samples_identical GL_KHR_texture_compression_astc_sliced_3d GL_OES_geometry_point_size GL_OES_geometry_shader GL_OES_shader_image_atomic GL_EXT_clip_cull_distance GL_MESA_shader_integer_functions [14:22:29.648] GL ES 2 renderer features: read-back format: BGRA wl_shm sub-image to texture: yes EGL Wayland extension: yes [14:22:29.656] event0 - [14:22:29.656] Power Button: [14:22:29.656] is tagged by udev as: Keyboard [14:22:29.656] event0 - [14:22:29.656] Power Button: [14:22:29.656] device is a keyboard [14:22:30.205] No currently active connector found. [14:22:30.205] Registered plugin API 'weston_drm_output_api_v1' of size 24 [14:22:30.205] Compositor capabilities: arbitrary surface rotation: yes screen capture uses y-flip: yes presentation clock: CLOCK_MONOTONIC, id 1 presentation clock resolution: 0.000000001 s [14:22:30.206] Loading module '/usr/lib/weston/desktop-shell.so' [14:22:30.210] launching '/usr/libexec/weston-keyboard' [14:22:30.212] Loading module '/usr/lib/weston/systemd-notify.so' [14:22:30.229] launching '/usr/libexec/weston-desktop-shell'

Near the top, it shows the error which might be the cause: [14:22:29.125] warning: XDG_RUNTIME_DIR "/run/platform/display" is not configured correctly. I went to the /run/platform/display directory and it contains 3 files.

Weston.ini looks like this:

[core] shell=ivi-shell.so backend=drm-backend.so require-input=false modules=systemd-notify.so

[output] name=HDMI-A-1 transform=270 [id-agent] default-id-offset=1000

[ivi-shell] ivi-input-module=ivi-input-controller.so ivi-module=ivi-controller.so id-agent-module=simple-id-agent.so

[shell] locking=true panel-position=none

EDIT: It says in the log XDG_RUNTIME_DIR=/run/platform/display is not configured correctly, but when i try the command echo $XDG_RUNTIME_DIR it returns a blank line.

Changing permissions also resets for some reason? I changed the permission level to 700 instead of 770, but it reverts back after reboot.

fuzhongl commented 4 years ago

@KalevGonvick You can see the console of AGL, right? If yes, please try following for Weston GUI: 1) $ vim /etc/xdg/weston/weston.ini Make these changes to weston.ini: Comment ivi-shell.so out Set the name of output is HDMI-A-2(if still not work, try HDMI-A-3) 2) After that, set up an environment variable and restart the weston service: $ export XDG_RUNTIME_DIR=/run/platform/display $ systemctl restart weston

Thanks!

KalevGonvick commented 4 years ago

Hello, sorry for the late reply.

I will be away from home for a week or so, for now I will not be able to try this out.

On Mon, Dec 2, 2019 at 7:28 PM Fuzhong Liu notifications@github.com wrote:

@KalevGonvick https://github.com/KalevGonvick You can see the console of AGL, right? If yes, please try following for Weston GUI:

  1. $ vim /etc/xdg/weston/weston.ini Make these changes to weston.ini: Comment ivi-shell.so out Set the name of output is HDMI-A-2(if still not work, try HDMI-A-3)
  2. After that, set up an environment variable and restart the weston service: $ export XDG_RUNTIME_DIR=/run/platform/display $ systemctl restart weston

Thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/projectacrn/acrn-hypervisor/issues/4148?email_source=notifications&email_token=AFMAD2DAHSPRDLYOIPUNOQTQWWRZRA5CNFSM4JRLWES2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFXU3EI#issuecomment-560942481, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFMAD2D2OTUEFQLIR6YRO7DQWWRZRANCNFSM4JRLWESQ .

ErinRJ commented 4 years ago

Hi Fuzhongl,

Sorry for the late reply again. I'm working with Kalev on this and I currently have the board. We can see the AGL console as a command line type terminal right now.

Steps performed:

  1. "shell=ivi-shell.so" was commented out. HDMI-A-1 was changed to HDMI-A-2, then to HDMI-A-3.
  2. the two commands given to setup the environment variables and restart the weston service were executed. When executing "systemctl restart weston", it doesn't appear to do anything, the console just moves on to the next line as if Enter was pressed. Is there something else we need to do to make the GUI appear after the changes to the weston.ini file are made?

We also tried restarting the UOS once the changes were made, however this made no difference.

Thanks for your time, and happy new year!

Erin

fuzhongl commented 4 years ago

Hi Erin Happy New Year! https://projectacrn.github.io/latest/tutorials/agl-vms.html As said in this link, the ACRN hypervisor is 1.3, not 1.0. and the Clear Linux OS is 31080 We verified this guide on Kaby Lake NUC7i7DNHE; will try it on UP2 later.

Thanks!

KalevGonvick commented 4 years ago

Hi again,

AGL GUI still does not work with the 1.3 hypervisor and Clear Linux 31080. We can only see the base shell.

The same errors occur as the logs above.