<div dir="ltr">Hello,<div><br></div><div>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 segfault.</div>
<div><br></div><div>$ sudo openvt -v -c 5 -- /usr/bin/weston-launch --tty=/dev/tty5 --user=kalrish -- --log=weston.log</div><div><br></div><div>When looking at weston.log:</div><div><br></div><div><div><div>Date: 2013-12-08 CET</div>
<div>[21:29:18.513] weston 1.3.1</div><div> <a href="http://wayland.freedesktop.org/">http://wayland.freedesktop.org/</a></div><div> Bug reports to: <a href="https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=1.3.1">https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=1.3.1</a></div>
<div> Build: </div><div>[21:29:18.514] OS: Linux, 3.12.1-1hf, #1 SMP PREEMPT Sat Nov 23 15:07:10 CET 2013, x86_64</div><div>[21:29:18.514] Using config file '/home/kalrish/.config/weston.ini'</div><div>
[21:29:18.514] Loading module '/usr/lib/weston/drm-backend.so'</div><div>[21:29:18.516] initializing drm backend</div><div>[21:29:18.517] using /dev/dri/card0</div><div>[21:29:18.612] Chosen EGL config details:</div>
<div> RGBA bits: 8 8 8 0</div><div> swap interval range: 0 - 0</div><div>[21:29:18.645] EGL version: 1.4 (DRI2)</div><div>[21:29:18.645] EGL vendor: Mesa Project</div><div>[21:29:18.645] EGL client APIs: OpenGL OpenGL_ES OpenGL_ES2 OpenGL_ES3 </div>
<div>[21:29:18.645] EGL extensions: EGL_MESA_drm_image EGL_WL_bind_wayland_display</div><div> EGL_KHR_image_base EGL_KHR_gl_renderbuffer_image</div><div> EGL_KHR_surfaceless_context EGL_KHR_create_context</div>
<div> EGL_EXT_buffer_age</div><div>[21:29:18.645] GL version: OpenGL ES 3.0 Mesa 10.0.0-rc2 (git-866ce39)</div><div>[21:29:18.645] GLSL version: OpenGL ES GLSL ES 3.0</div><div>[21:29:18.645] GL vendor: X.Org</div>
<div>[21:29:18.645] GL renderer: Gallium 0.4 on AMD RS780</div><div>[21:29:18.645] GL extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays</div><div> GL_EXT_texture_filter_anisotropic</div><div> GL_EXT_texture_format_BGRA8888 GL_OES_depth24</div>
<div> GL_OES_element_index_uint GL_OES_fbo_render_mipmap</div><div> GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_standard_derivatives</div><div> GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_npot</div>
<div> GL_OES_EGL_image GL_OES_depth_texture</div><div> GL_OES_packed_depth_stencil GL_EXT_texture_type_2_10_10_10_REV</div><div> GL_OES_get_program_binary GL_APPLE_texture_max_level</div>
<div> GL_EXT_discard_framebuffer GL_EXT_read_format_bgra</div><div> GL_NV_fbo_color_attachments GL_OES_EGL_image_external</div><div> GL_OES_vertex_array_object GL_EXT_texture_rg</div>
<div> GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer</div><div> GL_EXT_map_buffer_range GL_OES_depth_texture_cube_map</div><div> GL_OES_surfaceless_context GL_EXT_color_buffer_float</div>
<div>[21:29:18.645] GL ES 2 renderer features:</div><div> read-back format: BGRA</div><div> wl_shm sub-image to texture: yes</div><div> EGL Wayland extension: yes</div><div>[21:29:18.645] Failed to initialize backlight</div>
<div>[21:29:18.645] EDID data 'AUO', '', ''</div><div>[21:29:18.645] Output LVDS1, (connector 16, crtc 11)</div><div> mode 1280x800@60.0, preferred, current</div><div> mode 1280x720@59.9</div><div>
mode 1152x768@59.8</div><div> mode 1024x768@59.9</div><div> mode 800x600@59.9</div><div> mode 848x480@59.7</div><div> mode 720x480@59.7</div><div> mode 640x480@59.4</div><div>[21:29:18.646] launching '/usr/lib/weston/weston-keyboard'</div>
<div>[21:29:18.658] input device Power Button, /dev/input/event2 is a keyboard</div><div>[21:29:18.659] input device Sleep Button, /dev/input/event0 is a keyboard</div><div>[21:29:18.659] input device AT Translated Set 2 keyboard, /dev/input/event3 is a keyboard</div>
<div>[21:29:18.660] input device SynPS/2 Synaptics TouchPad, /dev/input/event6 is a touchpad</div><div>[21:29:18.660] input device SynPS/2 Synaptics TouchPad, /dev/input/event6 is a pointer caps = absolute-motion button</div>
<div>[21:29:18.660] Loading module '/usr/lib/weston/desktop-shell.so'</div><div>[21:29:18.660] Compositor capabilities:</div><div> arbitrary surface rotation: yes</div><div> screen capture uses y-flip: yes</div>
<div>[21:29:18.660] libwayland: using socket /run/user/1000/wayland-0</div><div>[21:29:18.684] set mode failed: Permission denied</div><div>[21:29:18.684] caught signal: 11</div><div>[21:29:18.685] [00000000004099aa] -- (/usr/bin/weston)</div>
<div>[21:29:18.685] [0000000000409a17] -- (/usr/bin/weston)</div><div>[21:29:18.685] [00007f1af34def10] -- (/usr/lib/libc.so.6)</div><div>[21:29:18.685] [00007f1af12a9958] -- (/usr/lib/weston/drm-backend.so)</div>
<div>[21:29:18.685] [00007f1af12aa034] -- (/usr/lib/weston/drm-backend.so)</div><div>[21:29:18.685] [000000000040d691] weston_output_finish_frame (/usr/bin/weston)</div><div>[21:29:18.685] [00007f1af12a950f] -- (/usr/lib/weston/drm-backend.so)</div>
<div>[21:29:18.685] [00007f1af437a6cc] wl_event_loop_dispatch_idle (/usr/lib/libwayland-server.so.0)</div><div>[21:29:18.685] [00007f1af437a709] wl_event_loop_dispatch (/usr/lib/libwayland-server.so.0)</div><div>[21:29:18.685] [00007f1af4378dc5] wl_display_run (/usr/lib/libwayland-server.so.0)</div>
<div>[21:29:18.685] [0000000000408765] -- (/usr/bin/weston)</div><div>[21:29:18.685] [00007f1af34cbb55] __libc_start_main (/usr/lib/libc.so.6)</div><div>[21:29:18.685] [0000000000408989] -- (/usr/bin/weston)</div>
</div></div><div><br></div><div>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.</div>
<div><br></div><div>I think that it should be possible to launch a DRM-backed Weston with just</div><div>$ weston-launch --tty=/path/to/tty</div><div>with an optional sudo prepended and the --user option to indicate which user to login to.</div>
<div><br></div><div>As a note, I cloned the Weston git repository and did</div><div>$ git grep -n 'set mode failed'</div><div>src/compositor-drm.c:606: weston_log("set mode failed: %m\n");</div>
<div>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:</div><div>$ groups</div><div>
wheel video audio systemd-journal kalrish weston-launch</div><div>$ ls -l /dev/dri</div><div>total 0</div><div>crw-rw----+ 1 root video 226, 0 Dec 8 21:06 card0</div><div>crw-rw---- 1 root video 226, 64 Dec 8 21:06 controlD64</div>
<div><br></div><div>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,</div>
<div>Kalrish</div></div>