giucam / orbital

A Wayland compositor based on Weston and Qt
GNU General Public License v3.0
158 stars 17 forks source link

Weston doesn't like --nuclear-client or --session-file... #12

Closed epitron closed 9 years ago

epitron commented 10 years ago

Hi there!

I just built orbital and all of its dependencies from the AUR (weston-git, wayland-git, nuclear-git, orbital-git), and it's not able to start up when I run the orbital script:

$ orbital
Date: 2014-08-12 EDT
[14:58:39.728] weston 1.5.90
               http://wayland.freedesktop.org/
               Bug reports to: https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=1.5.90
               Build: 1.4.93-75-g886b009 screenshooter: Add a missing return; in an error path (2014-08-08 14:59:48 -0700)
[14:58:39.728] OS: Linux, 3.12.9-1-ARCH, #1 SMP PREEMPT Sun Aug 10 01:27:13 EDT 2014, x86_64
[14:58:39.728] Starting with no config file.
[14:58:39.728] Loading module '/usr/lib/weston/x11-backend.so'
[14:58:39.738] initializing x11 backend
[14:58:39.743] Loading module '/usr/lib/weston/gl-renderer.so'
[14:58:39.772] warning: EGL_EXT_buffer_age not supported. Performance could be affected.
[14:58:39.772] warning: EGL_EXT_swap_buffers_with_damage not supported. Performance could be affected.
[14:58:39.772] Using gl renderer
[14:58:39.772] launching '/usr/lib/weston/weston-keyboard'
[14:58:39.864] EGL version: 1.4 (DRI2)
[14:58:39.864] EGL vendor: Mesa Project
[14:58:39.865] EGL client APIs: OpenGL OpenGL_ES OpenGL_ES2 OpenGL_ES3 
[14:58:39.865] EGL extensions: EGL_MESA_drm_image EGL_MESA_configless_context
               EGL_WL_bind_wayland_display EGL_KHR_image_base
               EGL_KHR_image_pixmap EGL_KHR_image 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_NOK_swap_region EGL_NOK_texture_from_pixmap
               EGL_EXT_image_dma_buf_import EGL_NV_post_sub_buffer
[14:58:39.866] GL version: OpenGL ES 3.0 Mesa 10.2.5
[14:58:39.866] GLSL version: OpenGL ES GLSL ES 3.0
[14:58:39.866] GL vendor: X.Org
[14:58:39.866] GL renderer: Gallium 0.4 on AMD RV730
[14:58:39.866] 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_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_ANGLE_texture_compression_dxt3
               GL_ANGLE_texture_compression_dxt5 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
               GL_EXT_separate_shader_objects GL_EXT_shader_integer_mix
[14:58:39.869] GL ES 2 renderer features:
               read-back format: BGRA
               wl_shm sub-image to texture: yes
               EGL Wayland extension: yes
[14:58:39.869] Chosen EGL config details:
               RGBA bits: 8 8 8 0
               swap interval range: 0 - 1000
[14:58:39.869] x11 output 1024x640, window id 48234501
[14:58:39.869] fatal: unhandled option: --nuclear-client=/usr/libexec/startorbital
[14:58:39.869] fatal: unhandled option: --session-file=/home/epi/.config/orbital/session
Failed to process Wayland connection: Connection reset by peer
failed to create display: Connection reset by peer

Those two unhandled options (--nuclear-client and --session-file) don't seem to be part of weston. Are they supposed to be added by nuclear-desktop-shell.so?

giucam commented 10 years ago

Yes. It seems like Weston didn't load nuclear. Do you have a different shell module specified in weston.ini?

epitron commented 10 years ago

Nope! I tried it with and without a weston.ini file - same problem.

Which version of weston are you developing against?

iBelieve commented 10 years ago

I'm running into this issue as well. An ideas how to fix it?

giucam commented 10 years ago

Can you paste your generated 'orbital' script?

iBelieve commented 10 years ago
#!/bin/sh

socket=0
tmppath="$XDG_CACHE_HOME"
if [ -z "$tmppath" ]; then
    tmppath="$HOME/.cache"
fi
tmppath="$tmppath/orbital"
mkdir -p $tmppath >/dev/null

configpath="$XDG_CONFIG_HOME"
if [ -z "$configpath" ]; then
    configpath="$HOME/.config"
fi
configpath="$configpath/orbital"
mkdir -p $configpath > /dev/null

while getopts S:v name
do
    case $name in
    S)  if [ $OPTARG -eq $OPTARG 2> /dev/null ]; then
            socket="$OPTARG"
        else
            echo "Invalid socket number. Must be an integer."
            exit 1
        fi;;
    v)  echo "Version: 0.1"
        exit 0;;
    ?)  printf "Usage: %s: [-Svalue]\n" $0
        exit 2;;
    esac
done

logfile="$tmppath/orbital-$socket.log"
out="$tmppath/orbital-$socket.out"
err="$tmppath/orbital-$socket.err"

function watch() {
    IFS=''
    while read a; do
    echo "$a"
    echo "$2$a" >>$logfile
    done < "$1"
}

rm $logfile $out $err > /dev/null 2>&1
mkfifo $out $err
trap 'rm "$out" "$err"' EXIT

exec 4<>"$out"
exec 5<>"$err"

(watch "$out" "stdout: " >&1) &
pidout=$!
(watch "$err" "stderr: " >&2) &
piderr=$!

exec 1>&4
exec 2>&5

plugin="/usr/lib/nuclear-shell/nuclear-desktop-shell.so"
if [ "0.1" == "0.0.1" ]; then
    plugin="/usr/lib/nuclear-shell/nuclear-shell.so"
fi
args="--shell=$plugin --nuclear-client=/usr/libexec/startorbital --session-file=$configpath/session -Swayland-$socket"

if [ -z "$DBUS_SESSION_BUS_ADDRESS" ] && type dbus-launch >/dev/null; then
    eval `dbus-launch --sh-syntax`
fi

export QT_QPA_PLATFORM="wayland"
export XDG_CURRENT_DESKTOP="orbital"

if [ -z "$DISPLAY" ]; then
    stdbuf -oL -eL weston-launch -- $args
else
    stdbuf -oL -eL weston $args
fi

if [[ $DBUS_SESSION_BUS_PID ]]; then
    kill $DBUS_SESSION_BUS_PID
fi
giucam commented 10 years ago

And is the plugin really there?

iBelieve commented 10 years ago

Yes:

$ ls /usr/lib/nuclear-shell/nuclear-desktop-shell.so 
/usr/lib/nuclear-shell/nuclear-desktop-shell.so
epitron commented 10 years ago

What happens if weston encounters an error while loading a shell extension? Does it silently skip loading that module and continue its startup process? Judging by its console output, weston looks like it's not even trying to load the module.

n3rdopolis commented 10 years ago

It looks like I am having this issue too. It used to work, I think it might be some change in Weston that makes it read all arguments before loading any modules if I was to guess?

coldnew commented 10 years ago

This problem is due to following commit in mailing list. http://lists.freedesktop.org/archives/wayland-devel/2012-July/004616.html

I remove the argument check and run orbital fine :). (with weston 1.6)

giucam commented 9 years ago

That commit is really odd, it surely isn't the issue. I still don't know what the problem was, anyway now orbital has a different architecture so this bug doesn't happen anymore.