Hey, bros! I have been working to launch weston for almost a week, and now, after beating bazillions of small issues I must admit that I am really frustrated by a new thing that I cannot best. It's obviously that weston doesn't launch. Why, you ask? What's the matter? The answer is not so simple. After running weston --log=filename.txt I got the following output: ------------------------------------------------------------------------ Date: 2013-12-08 CET [12:01:56.511] weston 1.3.90 http://wayland.freedesktop.org/ Bug reports to: https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=1.3.90 Build: 1.3.0-286-g1e65840-dirty simple-egl: Add option to allow not syncing to compositor repaint cycle (2013-12-07 22:26:23 -0800) [12:01:56.511] OS: Linux, 3.11.0-12-generic, #19-Ubuntu SMP Wed Oct 9 16:20:46 UTC 2013, x86_64 [12:01:56.511] warning: XDG_RUNTIME_DIR "/tmp/weston-runtime-dir" is not configured correctly. Unix access mode must be 0700 but is 755, and XDG_RUNTIME_DIR must be owned by the user, but is owned by UID 1000. Refer to your distribution on how to get it, or http://www.freedesktop.org/wiki/Specifications/basedir-spec on how to implement it. [12:01:56.511] Using config file '/home/marcin/.config/weston.ini' [12:01:56.512] Loading module '/usr/local/lib/weston/drm-backend.so' [12:01:56.512] initializing drm backend [12:01:56.512] using /dev/dri/card0 [12:01:56.512] Loading module '/usr/local/lib/weston/gl-renderer.so' [12:01:56.556] Chosen EGL config details: RGBA bits: 8 8 8 0 swap interval range: 0 - 0 [12:01:56.557] EGL version: 1.4 (DRI2) [12:01:56.557] EGL vendor: Mesa Project [12:01:56.557] EGL client APIs: OpenGL OpenGL_ES OpenGL_ES2 [12:01:56.557] EGL extensions: EGL_MESA_drm_image EGL_WL_bind_wayland_display EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_surfaceless_context EGL_KHR_create_context EGL_EXT_buffer_age [12:01:56.557] GL version: OpenGL ES 3.0 Mesa 9.2.1 [12:01:56.557] GLSL version: OpenGL ES GLSL ES 3.0 [12:01:56.557] GL vendor: nouveau [12:01:56.557] GL renderer: Gallium 0.4 on NVE4 [12:01:56.557] GL extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_filter_anisotropic GL_EXT_texture_format_BGRA8888 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_npot 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_NV_fbo_color_attachments GL_OES_EGL_image_external GL_OES_vertex_array_object GL_EXT_texture_rg GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer GL_EXT_map_buffer_range GL_OES_depth_texture_cube_map GL_EXT_color_buffer_float [12:01:56.557] GL ES 2 renderer features: read-back format: BGRA wl_shm sub-image to texture: yes EGL Wayland extension: yes [12:01:56.557] Failed to initialize backlight [12:01:56.557] EDID data 'IVM', 'PL2377', '111383112041' [12:01:56.557] Output DVI1, (connector 17, crtc 13) mode 1920x1080@60.0, preferred, current mode 1600x1200@60.0 mode 1680x1050@59.9 mode 1280x1024@75.0 mode 1280x1024@60.0 mode 1440x900@75.0 mode 1440x900@59.9 mode 1152x864@75.0 mode 1280x720@60.0 mode 1024x768@75.1 mode 1024x768@70.1 mode 1024x768@60.0 mode 832x624@74.6 mode 800x600@75.0 mode 800x600@72.2 mode 800x600@60.3 mode 800x600@56.2 mode 640x480@75.0 mode 640x480@72.8 mode 640x480@66.7 mode 640x480@60.0 mode 720x400@70.1 [12:01:56.686] launching '/usr/local/libexec/weston-keyboard' [12:01:56.689] creating a keymap file for 45158 bytes failed: No such file or directory [12:01:56.706] failed to create input device '/dev/input/event1'. [12:01:56.706] input device Power Button, /dev/input/event0 is a keyboard [12:01:56.706] input device HID 04f3:0103, /dev/input/event2 is a keyboard [12:01:56.706] input device HID 04f3:0103, /dev/input/event3 is a keyboard [12:01:56.706] device /dev/input/event4 is a joystick, ignoring [12:01:56.722] not using input device '/dev/input/event4'. [12:01:56.722] device /dev/input/event15 is a joystick, ignoring [12:01:56.734] not using input device '/dev/input/event15'. [12:01:56.734] input device HP HP Link-5 micro dongle, /dev/input/event5 is a keyboard [12:01:56.734] input device HP HP Link-5 micro dongle, /dev/input/event6 is a pointer caps = relative-motion button [12:01:56.734] input device HP HP Link-5 micro dongle, /dev/input/event6 is a keyboard [12:01:56.734] Loading module '/usr/local/lib/weston/desktop-shell.so' [12:01:56.734] Compositor capabilities: arbitrary surface rotation: yes screen capture uses y-flip: yes [12:01:56.734] libwayland: using socket /tmp/weston-runtime-dir/wayland-0 [12:01:56.765] launching '/usr/local/libexec/weston-desktop-shell' [12:01:56.765] libwayland: disconnect from client 0x167dee0 [12:01:56.765] input_method died, respawning... [12:01:56.765] launching '/usr/local/libexec/weston-keyboard' [12:01:56.767] libwayland: disconnect from client 0x17d0ed0 [12:01:56.767] /usr/local/libexec/weston-desktop-shell died, respawning... [12:01:56.767] launching '/usr/local/libexec/weston-desktop-shell' [12:01:56.767] libwayland: disconnect from client 0x17cd0a0 [12:01:56.767] input_method died, respawning... [12:01:56.767] launching '/usr/local/libexec/weston-keyboard' [12:01:56.768] libwayland: disconnect from client 0x17cfb10 [12:01:56.768] /usr/local/libexec/weston-desktop-shell died, respawning... [12:01:56.768] launching '/usr/local/libexec/weston-desktop-shell' [12:01:56.769] libwayland: disconnect from client 0x167dee0 [12:01:56.769] input_method died, respawning... [12:01:56.769] launching '/usr/local/libexec/weston-keyboard' [12:01:56.769] libwayland: disconnect from client 0x17d0ed0 [12:01:56.769] /usr/local/libexec/weston-desktop-shell died, respawning... [12:01:56.769] launching '/usr/local/libexec/weston-desktop-shell' [12:01:56.770] libwayland: disconnect from client 0x17cd0a0 [12:01:56.770] input_method died, respawning... [12:01:56.770] launching '/usr/local/libexec/weston-keyboard' [12:01:56.770] libwayland: disconnect from client 0x17cfb10 [12:01:56.770] /usr/local/libexec/weston-desktop-shell died, respawning... [12:01:56.771] launching '/usr/local/libexec/weston-desktop-shell' [12:01:56.771] libwayland: disconnect from client 0x167dee0 [12:01:56.771] input_method died, respawning... [12:01:56.771] launching '/usr/local/libexec/weston-keyboard' [12:01:56.772] libwayland: disconnect from client 0x17d0ed0 [12:01:56.772] /usr/local/libexec/weston-desktop-shell died, respawning... [12:01:56.772] launching '/usr/local/libexec/weston-desktop-shell' [12:01:56.772] libwayland: disconnect from client 0x17cd0a0 [12:01:56.772] input_method died, giving up. [12:01:56.773] libwayland: disconnect from client 0x17cfb10 [12:01:56.773] /usr/local/libexec/weston-desktop-shell died, giving up. [12:02:03.780] caught signal: 11 [12:02:03.780] 0: weston (on_caught_signal+0x17) [0x408e87] [12:02:03.780] 1: /lib/x86_64-linux-gnu/libpthread.so.0 (__restore_rt+0x0) [0x7f1696162baf] [12:02:03.780] 2: /usr/lib/x86_64-linux-gnu/libxkbcommon.so.0 (xkb_state_update_key+0x14) [0x7f1696ac9b74] [12:02:03.781] 3: weston (update_modifier_state+0x36) [0x40ff46] [12:02:03.781] 4: /usr/local/lib/weston/drm-backend.so (evdev_device_data+0xe4) [0x7f1695550c74] [12:02:03.781] 5: /usr/local/lib/libwayland-server.so.0 (wl_event_loop_dispatch+0x62) [0x7f1696fa3cd2] [12:02:03.781] 6: weston (weston_compositor_read_input+0x12) [0x408312] [12:02:03.781] 7: /usr/local/lib/libwayland-server.so.0 (wl_event_loop_dispatch+0x62) [0x7f1696fa3cd2] [12:02:03.781] 8: /usr/local/lib/libwayland-server.so.0 (wl_display_run+0x25) [0x7f1696fa22e5] [12:02:03.781] 9: weston (main+0x5e7) [0x4076d7] [12:02:03.782] 10: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xf5) [0x7f1695dacde5] [12:02:03.782] 11: weston (_start+0x29) [0x407910] [12:02:03.782] 12: ? (?+0x29) [0x29] ------------------------------------------------------------------------ I wanted to find a fix, but honestly, I didn't even know what to ask on Google... Anyways, the story leading up to this moment is quite long, so I'll spare you the details, I just want you to know a few crucial things: 1. After running 'sudo weston' I'm getting a completely black screen and after clicking, or pressing a key on my keyboard weston outputs the above and quits. 2. I actually modified weston to make it work. With the original binary (sudo apt-get install weston, I'm on Linux Mint 16) I have been constantly getting the error XDG_RUNTIME_DIR not set and I couldn't resolve it, so I downloaded the sources from git and where it said char* dir = getenv("XDG_RUNTIME_DIR"); I entered char* dir = "/tmp/weston-runtime-dir"; and with this it moved forward. Same happened with wayland. 3. I followed the tutorial on building Wayland and Weston from wayland.freedesktop.org almost to the letter, with 2 exceptions: I apt-get'ed most of the dependencies instead of building them from source and while building mesa I had to add --disable-dri3 as an option to autogen.sh, because I really couldn't find the goddamn library. Tried to compile it, tried to apt-get, tried to find it on google, finally somebody said: disable it, nobody uses it anyways. Well, I hope you guys didn't use it :) 4. I'll be pretty open about this - I'm a total Linux noob. Most of you probably figured it out at the "I'm on Linux Mint" part :) If the bug I encountered is pretty obvious to fix and I missed it - sorry, I have really no idea what to do :) Please, help me. I'd really like to play around with Weston, maybe modify it for a bit, create something new... But I'm totally stuck with this. Regards from Poland Marcin
And also sorry for my English. It's really late ;)
Well, I looks like the actual bug in this report is the segfault as fallout from not being able to create the file for a keymap. That would be worth to fix somehow, if it still happens on the master branch in git. As for running weston on DRM, the normal way is to use weston-launch, which is setuid-root. Also, revert your XDG_RUNTIME_DIR hack, all Wayland apps will be looking for it. It's better to get XDG_RUNTIME_DIR actually set to a directory that exists and you have write permissions to.
Of course, I tried to boot it with weston-launch too. Same result, only I didn't get the log file, so I launched weston the other way to obtain it. As for my XDG_RUNTIME_DIR hack, it was absolutely necessary to make weston do anything except displaying: fatal: environment variable XDG_RUNTIME_DIR is not set. It's pretty obvious that I was actually setting it, creating the dir with chmod 0700 and everything, but it didn't work. I also don't think that it's particularly weston's fault though, as all you did was call the getenv() function, so that may be VERY hard to fix. Actually, I even got to the point with XDG not set by using apt-get the package manager... The whole point of compiling weston from source was to hack it :)
weston runs on X and on DRM for most people, I suspect have a build problem or somesuch in there. I'll downgrade this to just 'normal' instead of 'blocker'.
You really absolutely must solve the XDG_RUNTIME_DIR not set issue first. I think there are multiple places that explicitly look at the env var in every Wayland program, and missing it is fatal. The weston error message "creating a keymap file for 45158 bytes failed: No such file or directory" suggest that you missed a place in your hacks. Look at the XDG_RUNTIME_DIR setup in http://wayland.freedesktop.org/building.html . If you are using some older version of Weston, weston-launch will clear the current environment before executing 'weston' through the login shell. That means you have to edit the login shell startup scripts to set XDG_RUNTIME_DIR, as instructed. If you are using a recent version of Weston, then weston-launch apparently does not clear the current environment, if you do not pass any options to weston-launch. That means that simply 'export XDG_RUNTIME_DIR=/...' from the running shell is enough. While using weston-launch, you pass options to weston like this: $ weston-launch -- --my-weston-option Notice the extra -- in between, which is documented in 'weston-launch --help'. A good way to catch the weston log is to use $ weston-launch > log.txt 2>&1 so you get both stdout and stderr of everything running under weston-launch into the file. If you set XDG_RUNTIME_DIR to point to directory on a tmpfs like it should, you need to re-create the directory every time you boot, since tmpfs loses all its content on shutdown.
Closing this unless there's better information available. Nobody else seems to have trouble running weston.
I seem to have a similar problem, just without those warnings and a stock install of wayland 1.5.0 on ArchLinux. I can't seem to find this problem anywhere else. Here's my log (I ran 'weston --log=weston.log'): Date: 2014-10-06 CEST [14:40:12.024] weston 1.5.0 http://wayland.freedesktop.org/ Bug reports to: https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=1.5.0 Build: 1.4.93 configure.ac: Bump version 1.4.93 (2014-05-12 12:51:52 -0700) [14:40:12.024] OS: Linux, 3.16.3-1-ARCH, #1 SMP PREEMPT Wed Sep 17 21:54:13 CEST 2014, x86_64 [14:40:12.024] Starting with no config file. [14:40:12.024] Loading module '/usr/lib/weston/x11-backend.so' [14:40:12.048] initializing x11 backend [14:40:12.049] Loading module '/usr/lib/weston/gl-renderer.so' [14:40:12.053] warning: EGL_EXT_swap_buffers_with_damage not supported. Performance could be affected. [14:40:12.053] Using gl renderer [14:40:12.053] launching '/usr/lib/weston/weston-keyboard' [14:40:12.179] EGL version: 1.4 [14:40:12.179] EGL vendor: NVIDIA [14:40:12.179] EGL client APIs: OpenGL_ES [14:40:12.179] EGL extensions: EGL_NV_system_time EGL_KHR_surfaceless_context EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_config_attribs EGL_KHR_fence_sync EGL_NV_sync EGL_KHR_reusable_sync EGL_KHR_create_context EGL_EXT_create_context_robustness EGL_KHR_stream EGL_KHR_stream_fifo EGL_KHR_stream_producer_eglsurface EGL_KHR_stream_consumer_gltexture EGL_NV_stream_sync EGL_KHR_get_all_proc_addresses EGL_IMG_context_priority EGL_NV_post_sub_buffer EGL_KHR_image_pixmap EGL_EXT_buffer_age [14:40:12.179] GL version: OpenGL ES 3.1 NVIDIA 343.22 [14:40:12.179] GLSL version: OpenGL ES GLSL ES 3.10 [14:40:12.179] GL vendor: NVIDIA Corporation [14:40:12.179] GL renderer: GeForce GTX 670/PCIe/SSE2 [14:40:12.179] GL extensions: GL_EXT_blend_minmax GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_EXT_copy_image GL_EXT_debug_label GL_EXT_draw_buffers_indexed GL_EXT_frag_depth GL_EXT_geometry_point_size GL_EXT_geometry_shader GL_EXT_gpu_shader5 GL_EXT_map_buffer_range GL_EXT_occlusion_query_boolean GL_EXT_robustness GL_EXT_separate_shader_objects GL_EXT_shader_implicit_conversions GL_EXT_shader_integer_mix GL_EXT_shader_io_blocks GL_EXT_shadow_samplers GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_tessellation_point_size GL_EXT_tessellation_shader GL_EXT_texture_border_clamp GL_EXT_texture_buffer GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map_array GL_EXT_texture_filter_anisotropic GL_EXT_texture_format_BGRA8888 GL_EXT_texture_rg GL_EXT_texture_sRGB_decode GL_EXT_texture_storage GL_EXT_texture_view GL_EXT_unpack_subimage GL_KHR_debug GL_NV_bgr GL_NV_bindless_texture GL_NV_blend_equation_advanced GL_NV_copy_buffer GL_NV_copy_image GL_NV_draw_buffers GL_NV_draw_instanced GL_NV_draw_texture GL_NV_EGL_stream_consumer_external GL_NV_explicit_attrib_location GL_NV_fbo_color_attachments GL_NV_framebuffer_blit GL_NV_framebuffer_multisample GL_NV_generate_mipmap_sRGB GL_NV_instanced_arrays GL_NV_occlusion_query_samples GL_NV_non_square_matrices GL_NV_pack_subimage GL_NV_packed_float GL_NV_packed_float_linear GL_NV_pixel_buffer_object GL_NV_read_buffer GL_NV_read_depth GL_NV_read_depth_stencil GL_NV_read_stencil GL_NV_secure_context GL_NV_shadow_samplers_array GL_NV_shadow_samplers_cube GL_NV_sRGB_formats GL_NV_texture_array GL_NV_texture_border_clamp GL_NV_texture_compression_latc GL_NV_texture_compression_s3tc GL_NV_texture_compression_s3tc_update GL_NV_timer_query GL_KHR_blend_equation_advanced GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_depth32 GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_get_program_binary GL_OES_mapbuffer GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_OES_sample_shading GL_OES_sample_variables GL_OES_shader_image_atomic GL_OES_shader_multisample_interpolation GL_OES_standard_derivatives GL_OES_surfaceless_context GL_OES_texture_npot GL_OES_texture_float GL_OES_texture_float_linear GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_stencil8 GL_OES_texture_storage_multisample_2d_array GL_OES_vertex_array_object GL_OES_vertex_half_float [14:40:12.179] GL ES 2 renderer features: read-back format: RGBA wl_shm sub-image to texture: yes EGL Wayland extension: no [14:40:12.179] Chosen EGL config details: RGBA bits: 8 8 8 0 swap interval range: 0 - 200 [14:40:12.179] x11 output 1024x640, window id 44040197 [14:40:12.179] Loading module '/usr/lib/weston/desktop-shell.so' [14:40:12.180] Compositor capabilities: arbitrary surface rotation: yes screen capture uses y-flip: yes [14:40:12.180] launching '/usr/lib/weston/weston-desktop-shell' [14:40:12.199] input_method died, respawning... [14:40:12.199] launching '/usr/lib/weston/weston-keyboard' [14:40:12.210] /usr/lib/weston/weston-desktop-shell died, respawning... [14:40:12.210] launching '/usr/lib/weston/weston-desktop-shell' [14:40:12.243] input_method died, respawning... [14:40:12.243] launching '/usr/lib/weston/weston-keyboard' [14:40:12.303] /usr/lib/weston/weston-desktop-shell died, respawning... [14:40:12.303] launching '/usr/lib/weston/weston-desktop-shell' [14:40:12.384] input_method died, respawning... [14:40:12.384] launching '/usr/lib/weston/weston-keyboard' [14:40:12.469] /usr/lib/weston/weston-desktop-shell died, respawning... [14:40:12.469] launching '/usr/lib/weston/weston-desktop-shell' [14:40:12.539] input_method died, respawning... [14:40:12.539] launching '/usr/lib/weston/weston-keyboard' [14:40:12.634] /usr/lib/weston/weston-desktop-shell died, respawning... [14:40:12.634] launching '/usr/lib/weston/weston-desktop-shell' [14:40:12.758] input_method died, respawning... [14:40:12.758] launching '/usr/lib/weston/weston-keyboard' [14:40:12.851] /usr/lib/weston/weston-desktop-shell died, respawning... [14:40:12.851] launching '/usr/lib/weston/weston-desktop-shell' [14:40:12.921] input_method died, giving up.
The NVIDIA drivers do not support Wayland; I suggest starting Weston with weston-launch -- --use-pixman (not a typo: duplicated double dashes, separated by a space), and recompiling with --with-cairo=image. This will get you an all-software-rendering setup.
Korbinian, did you perhaps build weston with --with-cairo=gl or --with-cairo=gles2? If you (well, Arch) did, then it's no wonder weston-desktop-shell and others cannot run. The Nvidia proprietary drivers simply do not support running Wayland EGL clients. The stderr output might have contained more info on why they failed, since at some level weston-desktop-shell should be able to deal with EGL failure, but maybe it just crashed instead. A solution to that is to build Weston with --with-cairo=image, or moving to Nouveau. The original bug here had nothing in common with your problem. If you want to keep investigating this, please open a new bug.
Thank you very much, sorry I didn't know about this.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.