weston-launch and virtual terminals

Kalrish Bäakjen kalrish.antrax at gmail.com
Sun Dec 8 12:53:34 PST 2013


For some time I have had FBCON and the VGA console disabled in the kernel,
as kmscon works really great. However, it seems that the traditional
in-kernel console is a requirement for weston-launch; without it, it will
claim that it "must be run from a virtual terminal". I've tried several
combinations of commands, putting some sudo's in the mess, but they all

$ sudo openvt -v -c 5 -- /usr/bin/weston-launch --tty=/dev/tty5
--user=kalrish -- --log=weston.log

When looking at weston.log:

Date: 2013-12-08 CET
[21:29:18.513] weston 1.3.1
               Bug reports to:
[21:29:18.514] OS: Linux, 3.12.1-1hf, #1 SMP PREEMPT Sat Nov 23 15:07:10
CET 2013, x86_64
[21:29:18.514] Using config file '/home/kalrish/.config/weston.ini'
[21:29:18.514] Loading module '/usr/lib/weston/drm-backend.so'
[21:29:18.516] initializing drm backend
[21:29:18.517] using /dev/dri/card0
[21:29:18.612] Chosen EGL config details:
               RGBA bits: 8 8 8 0
               swap interval range: 0 - 0
[21:29:18.645] EGL version: 1.4 (DRI2)
[21:29:18.645] EGL vendor: Mesa Project
[21:29:18.645] EGL client APIs: OpenGL OpenGL_ES OpenGL_ES2 OpenGL_ES3
[21:29:18.645] EGL extensions: EGL_MESA_drm_image
               EGL_KHR_image_base EGL_KHR_gl_renderbuffer_image
               EGL_KHR_surfaceless_context EGL_KHR_create_context
[21:29:18.645] GL version: OpenGL ES 3.0 Mesa 10.0.0-rc2 (git-866ce39)
[21:29:18.645] GLSL version: OpenGL ES GLSL ES 3.0
[21:29:18.645] GL vendor: X.Org
[21:29:18.645] GL renderer: Gallium 0.4 on AMD RS780
[21:29:18.645] GL extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays
               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_stencil8 GL_OES_texture_3D GL_OES_texture_npot
               GL_OES_EGL_image GL_OES_depth_texture
               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_OES_surfaceless_context GL_EXT_color_buffer_float
[21:29:18.645] GL ES 2 renderer features:
               read-back format: BGRA
               wl_shm sub-image to texture: yes
               EGL Wayland extension: yes
[21:29:18.645] Failed to initialize backlight
[21:29:18.645] EDID data 'AUO', '', ''
[21:29:18.645] Output LVDS1, (connector 16, crtc 11)
  mode 1280x800 at 60.0, preferred, current
  mode 1280x720 at 59.9
  mode 1152x768 at 59.8
  mode 1024x768 at 59.9
  mode 800x600 at 59.9
  mode 848x480 at 59.7
  mode 720x480 at 59.7
  mode 640x480 at 59.4
[21:29:18.646] launching '/usr/lib/weston/weston-keyboard'
[21:29:18.658] input device Power Button, /dev/input/event2 is a keyboard
[21:29:18.659] input device Sleep Button, /dev/input/event0 is a keyboard
[21:29:18.659] input device AT Translated Set 2 keyboard, /dev/input/event3
is a keyboard
[21:29:18.660] input device SynPS/2 Synaptics TouchPad, /dev/input/event6
is a touchpad
[21:29:18.660] input device SynPS/2 Synaptics TouchPad, /dev/input/event6
is a pointer caps = absolute-motion button
[21:29:18.660] Loading module '/usr/lib/weston/desktop-shell.so'
[21:29:18.660] Compositor capabilities:
               arbitrary surface rotation: yes
               screen capture uses y-flip: yes
[21:29:18.660] libwayland: using socket /run/user/1000/wayland-0
[21:29:18.684] set mode failed: Permission denied
[21:29:18.684] caught signal: 11
[21:29:18.685]   [00000000004099aa]  --  (/usr/bin/weston)
[21:29:18.685]   [0000000000409a17]  --  (/usr/bin/weston)
[21:29:18.685]   [00007f1af34def10]  --  (/usr/lib/libc.so.6)
[21:29:18.685]   [00007f1af12a9958]  --  (/usr/lib/weston/drm-backend.so)
[21:29:18.685]   [00007f1af12aa034]  --  (/usr/lib/weston/drm-backend.so)
[21:29:18.685]   [000000000040d691]  weston_output_finish_frame
[21:29:18.685]   [00007f1af12a950f]  --  (/usr/lib/weston/drm-backend.so)
[21:29:18.685]   [00007f1af437a6cc]  wl_event_loop_dispatch_idle
[21:29:18.685]   [00007f1af437a709]  wl_event_loop_dispatch
[21:29:18.685]   [00007f1af4378dc5]  wl_display_run
[21:29:18.685]   [0000000000408765]  --  (/usr/bin/weston)
[21:29:18.685]   [00007f1af34cbb55]  __libc_start_main  (/usr/lib/libc.so.6)
[21:29:18.685]   [0000000000408989]  --  (/usr/bin/weston)

I'm using Mesa 10.0-rc2 on ArchLinux, with a Radeon HD 3200. However, I
don't think that libraries are the problem; it works when I try on the
default kernel, on an agetty-console.

I think that it should be possible to launch a DRM-backed Weston with just
$ weston-launch --tty=/path/to/tty
with an optional sudo prepended and the --user option to indicate which
user to login to.

As a note, I cloned the Weston git repository and did
$ git grep -n 'set mode failed'
src/compositor-drm.c:606:                       weston_log("set mode
failed: %m\n");
Looking at the code, it seems it is failing at drmModeSetCrtc. I think it
is because I don't have enough permissions? Well, I'm pretty sure I had put
enough sudo's, but anyway:
$ groups
wheel video audio systemd-journal kalrish weston-launch
$ ls -l /dev/dri
total 0
crw-rw----+ 1 root video 226,  0 Dec  8 21:06 card0
crw-rw----   1 root video 226, 64 Dec  8 21:06 controlD64

I'm sorry I can't be of more help; I'm not a developer. I'm not even sure
if this is intended behavior; if indeed it is, please excuse me. Thanks for
your time, and, if you need more details, please ask. Best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20131208/5417b54c/attachment.html>

More information about the wayland-devel mailing list