unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Wayland setup
@ 2018-03-05 12:59 Thorsten Wilms
  2018-03-05 13:47 ` Andreas Enge
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Thorsten Wilms @ 2018-03-05 12:59 UTC (permalink / raw)
  To: help-guix

Hi!

Potentially switching distributions seemed like a good opportunity to 
try Wayland, especially since I'm playing with the idea of writing a 
schemey WM; doing so based on X11 seems like wasted effort at this point.

I would like to have a system with just a floating-window Wayland 
compositor installed (Weston?) and the least amount of Gnome and Xorg 
dependencies.

My understanding from the documentation is that the default login 
manager Slim doesn't deal with Wayland. The only alternative seems to be 
sddm. %desktop-services would bring in Slim, AFAICS, so I tried to do 
without and list things explicitly.

Surprised to see Wayland handled via xorg service, _trying_ to make 
sense of the documentation, I ended up with
(service xorg-service-type (sddm-configuration (display-server 
"wayland")), but commented it out to get beyond yet another error 
message on the way.

Actually, I would be OK with logging in on a VT and type whatever the 
Wayland equivalent of startx might be.

What's behind (banana-service) vs (service banana-service-type)? Maybe 
I'm a bad reader, but the documentation left me guessing / piecing it 
from examples, which form to use, except that the later seems to allow 
configuration?

I'm also a bit on a loss on what I actually need regarding networking 
services. During installation, "ifconfig enp5s2 up; dhclient -v enp5s2" 
was sufficient. No Wifi here, just one wrong device enp2s0 to avoid.

My attempt:

(use-modules (gnu)
              (gnu packages freedesktop) ; guix suggested this one
              (gnu system nss)
              (gnu services networking))
(use-service-modules admin avahi base dbus desktop mcron networking sddm 
ssh xorg) ; desktop was suggested for elogind
(use-package-modules base idutils bootloaders certs ntp)

(operating-system
   ...
   (packages (cons* wayland
                    weston
                    nss-certs ;for HTTPS access
                    %base-packages))

   (services (cons* ;(colord-service) missing the right service module
                    (elogind-service)
                    (dbus-service)
                    (polkit-service)
                    (service mcron-service-type)
                    (service network-manager-service-type)
                    (service rottlog-service-type)
                    (sddm-service)
                    (service wpa-supplicant-service-type)
                    ;(service xorg-service-type (sddm-configuration 
(display-server "wayland")))
                    %base-services)))

   ;; Allow resolution of '.local' host names with mDNS.
   ;(name-service-switch %mdns-host-lookup-nss))


I was dismayed to see lots of Xorg stuff scroll by and ending up with 
5,6G on the second generation, before even installing any applications.

If one should do a guix pull before init, 
https://www.gnu.org/software/guix/manual/html_node/Proceeding-with-the-Installation.html#Proceeding-with-the-Installation 
should say so. I only recalled having seen that somewhere else, afterwards!


Got collision warnings at the end of init, whatever that means:
-----
;Creating manual page database for 49 packages... done in 6.230 s
;find-files: 
/gnu/store/amxx08a88q2wypk5fwribkvm7qzl84q0-xf86-video-vesa-2.3.4/share/X11/xorg.conf.d: 
No such file or directory
;find-files: 
/gnu/store/drdl1aw2zhp6qlafs5bb0p6mva1sycqw-xf86-video-fbdev-0.4.4/share/X11/xorg.conf.d: 
No such file or directory
;find-files: 
/gnu/store/019ikmqqq5wkdhrlzyighgbinkjc51nl-xf86-video-cirrus-1.5.3/share/X11/xorg.conf.d: 
No such file or directory
;find-files: 
/gnu/store/37gddpml9db3fgp30vrnhgf4h098nbw2-xf86-video-intel-2.99.917-8-c899057/share/X11/xorg.conf.d: 
No such file or directory
;find-files: 
/gnu/store/44knzzw2bl78n0ylaj9q10j2mqs4apy1-xf86-video-mach64-6.9.5/share/X11/xorg.conf.d: 
No such file or directory
;find-files: 
/gnu/store/1l7rjh5c4vfz9d40yn2dyyy433wla8k1-xf86-video-nouveau-1.0.15/share/X11/xorg.conf.d: 
No such file or directory
;find-files: 
/gnu/store/b8a7jcj40rdpwg6cww9xmc28zzkkkr48-xf86-video-nv-2.1.21/share/X11/xorg.conf.d: 
No such file or directory
;find-files: 
/gnu/store/hgnmrhy4p0sv9l64vn14nf3mrxckav4y-xf86-video-sis-0.10.9/share/X11/xorg.conf.d: 
No such file or directory
;find-files: 
/gnu/store/8mncbkqy6cjdj4qzw2q26jk5qs4fl1cx-xf86-input-keyboard-1.9.0/share/X11/xorg.conf.d: 
No such file or directory
;find-files: 
/gnu/store/dfp22bxrpfq2xfwg27f7xi6080wskinb-xf86-input-mouse-1.9.2/share/X11/xorg.conf.d: 
No such file or directory
;warning: collision encountered: 
/gnu/store/hi7gadjf2gc3ma5bzabpkzjzcd89zz87-util-linux-2.30.1/share/man/man8/nologin.8.gz 
/gnu/store/a8arlhcrf70113zw7b3qrwqbqfq2hgj6-shadow-4.5/share/man/man8/nolo$
;warning: arbitrarily choosing 
/gnu/store/hi7gadjf2gc3ma5bzabpkzjzcd89zz87-util-linux-2.30.1/share/man/man8/nologin.8.gz
;warning: collision encountered: 
/gnu/store/hi7gadjf2gc3ma5bzabpkzjzcd89zz87-util-linux-2.30.1/sbin/nologin 
/gnu/store/a8arlhcrf70113zw7b3qrwqbqfq2hgj6-shadow-4.5/sbin/nologin
;warning: arbitrarily choosing 
/gnu/store/hi7gadjf2gc3ma5bzabpkzjzcd89zz87-util-linux-2.30.1/sbin/nologin
;warning: collision encountered: 
/gnu/store/54k4zlx3azmhqydlilysirpqmhvcw8gr-inetutils-1.9.4/bin/ifconfig 
/gnu/store/q588bqj8cshg9cijkm5s18xspc9wkap8-net-tools-1.60-0.479bb4a/bin/ifconfig
;warning: arbitrarily choosing 
/gnu/store/54k4zlx3azmhqydlilysirpqmhvcw8gr-inetutils-1.9.4/bin/ifconfig
;/gnu/store/skrdqdm1xnfphdrk5fc14kg2mj0sfd8h-system
;/gnu/store/19y01m3r6riir52mnkvg8jcq4iynrlg7-grub.cfg
;
;initializing operating system under '/mnt'...
;copying to '/mnt'...
;populating '/mnt'...
---

Any help getting closer to my goal appreciated!

-- 
Thorsten Wilms

thorwil's design for free software:
http://thorwil.wordpress.com/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Wayland setup
  2018-03-05 12:59 Wayland setup Thorsten Wilms
@ 2018-03-05 13:47 ` Andreas Enge
  2018-03-07 13:06 ` Oleg Pykhalov
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: Andreas Enge @ 2018-03-05 13:47 UTC (permalink / raw)
  To: Thorsten Wilms; +Cc: help-guix

Hello,

just a tiny piece of answer, which does not handle your main question:

On Mon, Mar 05, 2018 at 01:59:56PM +0100, Thorsten Wilms wrote:
> I'm also a bit on a loss on what I actually need regarding networking
> services. During installation, "ifconfig enp5s2 up; dhclient -v enp5s2" was
> sufficient. No Wifi here, just one wrong device enp2s0 to avoid.
> 
>                    (service network-manager-service-type)
>                    (service wpa-supplicant-service-type)

In that case, I would simply use
                     (dhcp-client-service)
instead of the two lines above.

Andreas

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Wayland setup
  2018-03-05 12:59 Wayland setup Thorsten Wilms
  2018-03-05 13:47 ` Andreas Enge
@ 2018-03-07 13:06 ` Oleg Pykhalov
  2018-03-11 17:07 ` Thorsten Wilms
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: Oleg Pykhalov @ 2018-03-07 13:06 UTC (permalink / raw)
  To: Thorsten Wilms; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 1971 bytes --]

Hello Thorsten,

Thorsten Wilms <t_w_@freenet.de> writes:

[…]

> My understanding from the documentation is that the default login
> manager Slim doesn't deal with Wayland. The only alternative seems to
> be sddm.

There is a Gnome Display Manager (GDM) service [1], which should be capable
of Wayland, but it requires a work on.

[…]

> What's behind (banana-service) vs (service banana-service-type)? Maybe
> I'm a bad reader, but the documentation left me guessing / piecing it
> from examples, which form to use, except that the later seems to allow
> configuration?

Both of them allow configuration.  The ‘(*-service)’ calls ‘(service
*-service-type)’.  For example, ‘(gdm-service)’ from [1] does this.

Last developed services provides only ‘(service *-service-type)’.

> I'm also a bit on a loss on what I actually need regarding networking
> services. During installation, "ifconfig enp5s2 up; dhclient -v
> enp5s2" was sufficient. No Wifi here, just one wrong device enp2s0 to
> avoid.

‘%desktop-services’ from a desktop template [2] provides a
‘network-manager-service-type’ which should setup a network according to
DHCP server.  Another approach is ‘dhcp-client-service’.

[…]

> If one should do a guix pull before init,
> https://www.gnu.org/software/guix/manual/html_node/Proceeding-with-the-Installation.html#Proceeding-with-the-Installation
> should say so. I only recalled having seen that somewhere else,
> afterwards!

No ‘guix pull’ recommended before ‘guix init’ in the manual.  ‘guix
init’ was tested much more on a Guix release version (without ‘pull’).

I recommend to start with an example template like [2] or with a
smallest configuration as possible.

- [1]  https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/services/xorg.scm?h=master#n623
- [2]  https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/system/examples/desktop.tmpl

Oleg.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Wayland setup
  2018-03-05 12:59 Wayland setup Thorsten Wilms
  2018-03-05 13:47 ` Andreas Enge
  2018-03-07 13:06 ` Oleg Pykhalov
@ 2018-03-11 17:07 ` Thorsten Wilms
  2018-03-12 17:19 ` Thorsten Wilms
  2018-03-14 21:10 ` Thorsten Wilms
  4 siblings, 0 replies; 13+ messages in thread
From: Thorsten Wilms @ 2018-03-11 17:07 UTC (permalink / raw)
  To: help-guix

Hi!

Thank you, Andreas and Oleg.


Aside of additional services, this seems to be the way to get Weston 
with a minimum of stuff installed:

---

(use-modules (gnu)
              (gnu packages freedesktop) ; for wayland
              (gnu packages xorg)) ; for xorg-server-xwayland
(use-service-modules networking)

(operating-system
   ...

   ;; Trying weston-launch as plain user: got told to either run it from
   ;; an active and local (systemd) session, or add the user to  weston-
   ;; launch. weston-launch needs to be created, first:
   (groups (cons (user-group (system? #t) (name "weston-launch"))
                 %base-groups))

   (users (cons (user-account
                 (name "thorwil")
                 (group "users")
                 (supplementary-groups '("audio"
                                         "netdev"
                                         "video"
                                         "weston-launch"
                                         "wheel"))
                 (home-directory "/home/thorwil"))
                %base-user-accounts))

   ;; Globally-installed packages.
   (packages (cons* xorg-server-xwayland wayland weston %base-packages))

   ;; Add service to the baseline
   (services (cons* (console-keymap-service "de-latin1-nodeadkeys")
                    (dhcp-client-service)
                    (simple-service 'etc-additions
                                    etc-service-type
                                    (list `("inputrc" ,(plain-file 
"inputrc" "set bell-style none"))))
                    (gpm-service) ; mouse on the console
                    %base-services)))

---

 From my reading, the command to launch Weston outside of an X session 
is weston-launch. The first attempt led to a message about the 
"weston-launch" group. It would have been nice to have that taken care 
of automatically, though I don't see how that could happen in harmony 
with hand-edited configuration.

The next error: XDG_RUNTIME_DIR not set. 
https://wayland.freedesktop.org/building.html offers this script, which 
I used:

if test -z "${XDG_RUNTIME_DIR}"; then
     export XDG_RUNTIME_DIR=/tmp/${UID}-runtime-dir
     if ! test -d "${XDG_RUNTIME_DIR}"; then
         mkdir "${XDG_RUNTIME_DIR}"
         chmod 0700 "${XDG_RUNTIME_DIR}"
     fi
fi

So now "weston-launch" will lead to no (obvious) effect, except printing 
this one mangled line:
"t it.org/wiki/Specifications/basedir-specis not 
set.n2-weston-3.0.0/bin/weston 2t=weston&version=3.0.0"

Specifying a TTY like "weston-launch -t 2" makes no difference, except 
for "7", in which case the whole system becomes unresponsive after an 
Alt-F7.

I tried with and without this ~/.config/weston.ini:
---
[core]
xwayland=true

[keyboard]
keymap_layout=de-latin1-nodeadkeys

[output]
name=WL1
mode=2560x1600
---

Any ideas? Success stories with any other Wayland compositor outside of 
Gnome?


-- 
Thorsten Wilms

thorwil's design for free software:
http://thorwil.wordpress.com/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Wayland setup
  2018-03-05 12:59 Wayland setup Thorsten Wilms
                   ` (2 preceding siblings ...)
  2018-03-11 17:07 ` Thorsten Wilms
@ 2018-03-12 17:19 ` Thorsten Wilms
  2018-03-12 19:05   ` Gábor Boskovits
  2018-03-14 21:10 ` Thorsten Wilms
  4 siblings, 1 reply; 13+ messages in thread
From: Thorsten Wilms @ 2018-03-12 17:19 UTC (permalink / raw)
  To: help-guix

On rereading Weston documentation, I noticed that weston-launch should 
be setuid. As that hasn't been taken care of, I added to my configuration:

;; weston-launch needs to be setuid:
(setuid-programs (cons #~(string-append #$weston "/bin/weston-launch")
                        %setuid-programs))

Before: `which weston-launch`
=> /run/current-system/profile/bin/weston-launch

Aftwerwards `which weston-launch`
=> /run/setuid-programs/


It makes no difference, though. Still just:
"t it.org/wiki/Specifications/basedir-specis not 
set.n2-weston-3.0.0/bin/weston 2t=weston&version=3.0.0"
but nothing I could find below /var/log, nothing suspicious in dmesg.

Suggestions on how to get at least a sensible error out of it?

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Wayland setup
  2018-03-12 17:19 ` Thorsten Wilms
@ 2018-03-12 19:05   ` Gábor Boskovits
  2018-03-12 20:54     ` Thorsten Wilms
  0 siblings, 1 reply; 13+ messages in thread
From: Gábor Boskovits @ 2018-03-12 19:05 UTC (permalink / raw)
  To: t_w_; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 1139 bytes --]

2018-03-12 18:19 GMT+01:00 Thorsten Wilms <t_w_@freenet.de>:

> On rereading Weston documentation, I noticed that weston-launch should be
> setuid. As that hasn't been taken care of, I added to my configuration:
>
> ;; weston-launch needs to be setuid:
> (setuid-programs (cons #~(string-append #$weston "/bin/weston-launch")
>                        %setuid-programs))
>
> Before: `which weston-launch`
> => /run/current-system/profile/bin/weston-launch
>
> Aftwerwards `which weston-launch`
> => /run/setuid-programs/
>
>
> It makes no difference, though. Still just:
> "t it.org/wiki/Specifications/basedir-specis not
> set.n2-weston-3.0.0/bin/weston 2t=weston&version=3.0.0"
> but nothing I could find below /var/log, nothing suspicious in dmesg.
>
> Suggestions on how to get at least a sensible error out of it?
>
>
>
This still looks like that the XDG_RUNTIME_DIR setting is not correct in
weston-launch.
Could you possibly strace if it tries to open your XDG_RUNTIME_DIR
directory?
By the way, the mangled line you get  is the XDG_RUNTIME_DIR error, and the
wayland
bug report address. I don't know yet what to make out of that...

[-- Attachment #2: Type: text/html, Size: 1749 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Wayland setup
  2018-03-12 19:05   ` Gábor Boskovits
@ 2018-03-12 20:54     ` Thorsten Wilms
  2018-03-13 19:50       ` Thorsten Wilms
  0 siblings, 1 reply; 13+ messages in thread
From: Thorsten Wilms @ 2018-03-12 20:54 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 6765 bytes --]

On 12.03.2018 20:05, Gábor Boskovits wrote:

> This still looks like that the XDG_RUNTIME_DIR setting is not correct in 
> weston-launch.

I found out that the script
---
#! /bin/sh

if test -z "${XDG_RUNTIME_DIR}"; then
     export XDG_RUNTIME_DIR=/tmp/${UID}-runtime-dir
     if ! test -d "${XDG_RUNTIME_DIR}"; then
         mkdir "${XDG_RUNTIME_DIR}"
         chmod 0700 "${XDG_RUNTIME_DIR}"
     fi
fi
---

doesn't work. Are there bashisms in it? I wanted to make it `#! 
/bin/bash`, but the shell claimed that being unknown.

I *thought* I checked with `echo $XDG_RUNTIME_DIR` before and the clear 
error message about it did go away, but when I set XDG_RUNTIME_DIR 
manually and confirmed its existence and mode today, suddenly I got, 
with weston-launch NOT in setuid:

---
thorwil@charly ~$ export XDG_RUNTIME_DIR=/tmp/${UID}-runtime-dir
thorwil@charly ~$ echo $XDG_RUNTIME_DIR
/tmp/1000-runtime-dir
thorwil@charly ~$ mkdir "${XDG_RUNTIME_DIR}"
mkdir: cannot create directory '/tmp/1000-runtime-dir': File exists
thorwil@charly ~$ chmod 0700 "${XDG_RUNTIME_DIR}"
thorwil@charly ~$ weston-launch
Date: 2018-03-12 CET
[21:03:08.884] weston 3.0.0
                http://wayland.freedesktop.org
                Bug reports to: 
https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=3.0.0
                Build: unknown (not built from git or tarball)
[21:03:08.884] Command line: 
/gnu/store/rm8q589057mxqlld1d2zwh5gi9y6cln2-weston-3.0.0/bin/weston
[21:03:08.884] OS: Linux, 4.15.8-gnu, #1 SMP 1, x86_64
[21:03:08.884] Using config file '/home/thorwil/.config/weston.ini'
[21:03:08.885] Output repaint window is 7 ms maximum.
[21:03:08.885] Loading module 
'/gnu/store/rm8q589057mxqlld1d2zwh5gi9y6cln2-weston-3.0.0/lib/libweston-3/drm-backend.so'
[21:03:08.890] initializing drm backend
[21:03:08.890] logind: not running in a systemd session
[21:03:08.890] logind: cannot setup systemd-logind helper (-61), using 
legacy fallback
[21:03:08.891] using /dev/dri/card0
[21:03:08.891] Loading module 
'/gnu/store/rm8q589057mxqlld1d2zwh5gi9y6cln2-weston-3.0.0/lib/libweston-3/gl-renderer.so'
[21:03:09.177] 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_EXT_platform_x11
                EGL_MESA_platform_gbm EGL_MESA_platform_surfaceless
[21:03:09.177] warning: neither EGL_EXT_swap_buffers_with_damage or 
EGL_KHR_swap_buffers_with_damage is supported. Performance could be 
affected.
[21:03:09.177] EGL_KHR_surfaceless_context available
radeon: Failed to allocate a buffer:
radeon:    size      : 65536 bytes
radeon:    alignment : 4096 bytes
radeon:    domains   : 2
radeon:    flags     : 4
radeon: Failed to allocate a buffer:
radeon:    size      : 65536 bytes
radeon:    alignment : 4096 bytes
radeon:    domains   : 2
radeon:    flags     : 4
[21:03:09.185] EGL version: 1.5 (DRI2)
[21:03:09.185] EGL vendor: Mesa Project
[21:03:09.185] EGL client APIs: OpenGL OpenGL_ES
[21:03:09.185] EGL extensions: EGL_EXT_buffer_age
                EGL_EXT_create_context_robustness 
EGL_EXT_image_dma_buf_import
                EGL_KHR_cl_event2 EGL_KHR_config_attribs 
EGL_KHR_create_context
                EGL_KHR_create_context_no_error EGL_KHR_fence_sync
                EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace
                EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image
                EGL_KHR_gl_texture_3D_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
[21:03:09.185] GL version: OpenGL ES 3.0 Mesa 17.3.1
[21:03:09.185] GLSL version: OpenGL ES GLSL ES 3.00
[21:03:09.185] GL vendor: X.Org
[21:03:09.185] GL renderer: AMD RV730 (DRM 2.50.0 / 4.15.8-gnu, LLVM 3.9.1)
[21:03:09.185] 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_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_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_OES_depth_texture_cube_map GL_OES_required_internalformat
                GL_OES_surfaceless_context GL_EXT_color_buffer_float
                GL_EXT_separate_shader_objects GL_EXT_shader_integer_mix
                GL_EXT_base_instance GL_EXT_compressed_ETC1_RGB8_sub_texture
                GL_EXT_copy_image GL_EXT_draw_buffers_indexed
                GL_EXT_draw_elements_base_vertex GL_EXT_polygon_offset_clamp
thorwil@charly ~$ led to create input devices option 'seat', udev device 
property ID_SEAT)itted).).
---

After making weston-launch setuid again:
---
thorwil@charly ~$ weston-launch
thorwil@charly ~$ led to create input devices option 'seat', udev device 
property ID_SEAT)itted).).e is supported. Performance could be affected.
---

?!


> Could you possibly strace if it tries to open your XDG_RUNTIME_DIR 
> directory?

Attached (hope it works on this list).
`strace weston-launch &> starce_weston-launch.txt` does not contain 
"tmp", "runtime" or "XDG", but:
"Error opening device /dev/input/eventX: Permission denied" for X in [0-9].

Guess I have to doublecheck that setuid thing now.


-- 
Thorsten Wilms

thorwil's design for free software:
http://thorwil.wordpress.com/

[-- Attachment #2: strace_weston-launch.txt.bz2 --]
[-- Type: application/x-bzip, Size: 6240 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Wayland setup
  2018-03-12 20:54     ` Thorsten Wilms
@ 2018-03-13 19:50       ` Thorsten Wilms
  2018-03-13 21:22         ` Gábor Boskovits
  0 siblings, 1 reply; 13+ messages in thread
From: Thorsten Wilms @ 2018-03-13 19:50 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 2495 bytes --]

On 12.03.2018 21:54, Thorsten Wilms wrote:
> ---
> #! /bin/sh
> 
> if test -z "${XDG_RUNTIME_DIR}"; then
>      export XDG_RUNTIME_DIR=/tmp/${UID}-runtime-dir
>      if ! test -d "${XDG_RUNTIME_DIR}"; then
>          mkdir "${XDG_RUNTIME_DIR}"
>          chmod 0700 "${XDG_RUNTIME_DIR}"
>      fi
> fi
> ---

Of course it doesn't work, since it runs in its own shell and export 
takes care of children, not parents, sheesh!

I have been pasting the export/mkdir/chmod into the console, instead.

So what's the canonical way to add that to ~/.bash_profile or ~/.bashrc, 
if that seems more appropriate? Or how else to meat those preconditions 
for weston-launch?


Adding my user to the already existing "input" group got rid of "Error 
opening device /dev/input/eventX: Permission denied".

strace revealed another error, "de-latin1-nodeadkeys" in weston.ini 
couldn't be found, going with just "de" causes silence on that front.

Much of the (attached) strace output suggests things go their way, but then:
---
[18:35:32.835] warning: neither EGL_EXT_swap_buffers_with_damage or 
EGL_KHR_swap_buffers_with_damage is supported. Performance could be 
affected.
[18:35:32.835] EGL_KHR_surfaceless_context available
radeon: Failed to allocate a buffer:
radeon:    size      : 65536 bytes
radeon:    alignment : 4096 bytes
radeon:    domains   : 2
radeon:    flags     : 4
radeon: Failed to allocate a buffer:
radeon:    size      : 65536 bytes
radeon:    alignment : 4096 bytes
radeon:    domains   : 2
radeon:    flags     : 4
[18:35:32.837] EGL version: 1.5 (DRI2)
---

---
[18:35:32.931] failed to bind to /tmp/.X11-unix/X0: No such file or 
directory
Failed to process Wayland connection: Connection reset by peer
failed to create display: Connection reset by peer
---
Creating and `chmod 0700`ing /tmp/.X11-unix/X0 did not lead to a 
successful run.

The very end:
---
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 539
close(5)                                = 0
close(3)                                = 0
ioctl(0, _IOC(0, 0x4b, 0x51, 0), 0)     = -1 ENOTTY (Inappropriate ioctl 
for device)
ioctl(0, KDSKBMODE, 0x3)                = 0
ioctl(0, KDSETMODE, 0)                  = 0
ioctl(4, DRM_IOCTL_DROP_MASTER, 0)      = -1 EACCES (Permission denied)
ioctl(0, VT_SETMODE, 0x7ffd806628f0)    = 0
exit_group(1)                           = ?
+++ exited with 1 +++
---

-- 
Thorsten Wilms

thorwil's design for free software:
http://thorwil.wordpress.com/

[-- Attachment #2: strace_weston-launch_4.txt.bz2 --]
[-- Type: application/x-bzip, Size: 7042 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Wayland setup
  2018-03-13 19:50       ` Thorsten Wilms
@ 2018-03-13 21:22         ` Gábor Boskovits
  0 siblings, 0 replies; 13+ messages in thread
From: Gábor Boskovits @ 2018-03-13 21:22 UTC (permalink / raw)
  To: Thorsten Wilms; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 2857 bytes --]

2018-03-13 20:50 GMT+01:00 Thorsten Wilms <t_w_@freenet.de>:

> On 12.03.2018 21:54, Thorsten Wilms wrote:
>
>> ---
>> #! /bin/sh
>>
>> if test -z "${XDG_RUNTIME_DIR}"; then
>>      export XDG_RUNTIME_DIR=/tmp/${UID}-runtime-dir
>>      if ! test -d "${XDG_RUNTIME_DIR}"; then
>>          mkdir "${XDG_RUNTIME_DIR}"
>>          chmod 0700 "${XDG_RUNTIME_DIR}"
>>      fi
>> fi
>> ---
>>
>
> Of course it doesn't work, since it runs in its own shell and export takes
> care of children, not parents, sheesh!
>
> I have been pasting the export/mkdir/chmod into the console, instead.
>
> So what's the canonical way to add that to ~/.bash_profile or ~/.bashrc,
> if that seems more appropriate? Or how else to meat those preconditions for
> weston-launch?
>
>
Actually it does not hurt if you add this code both to .bash_profile and to
.bashrc. On most systems one of the startup files sources the other, so
you can add it to only the sourced one.


>
> Adding my user to the already existing "input" group got rid of "Error
> opening device /dev/input/eventX: Permission denied".
>
> strace revealed another error, "de-latin1-nodeadkeys" in weston.ini
> couldn't be found, going with just "de" causes silence on that front.
>
> Much of the (attached) strace output suggests things go their way, but
> then:
> ---
> [18:35:32.835] warning: neither EGL_EXT_swap_buffers_with_damage or
> EGL_KHR_swap_buffers_with_damage is supported. Performance could be
> affected.
> [18:35:32.835] EGL_KHR_surfaceless_context available
> radeon: Failed to allocate a buffer:
> radeon:    size      : 65536 bytes
> radeon:    alignment : 4096 bytes
> radeon:    domains   : 2
> radeon:    flags     : 4
> radeon: Failed to allocate a buffer:
> radeon:    size      : 65536 bytes
> radeon:    alignment : 4096 bytes
> radeon:    domains   : 2
> radeon:    flags     : 4
> [18:35:32.837] EGL version: 1.5 (DRI2)
> ---
>
> ---
> [18:35:32.931] failed to bind to /tmp/.X11-unix/X0: No such file or
> directory
> Failed to process Wayland connection: Connection reset by peer
> failed to create display: Connection reset by peer
> ---
> Creating and `chmod 0700`ing /tmp/.X11-unix/X0 did not lead to a
> successful run.
>
> The very end:
> ---
> wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 539
> close(5)                                = 0
> close(3)                                = 0
> ioctl(0, _IOC(0, 0x4b, 0x51, 0), 0)     = -1 ENOTTY (Inappropriate ioctl
> for device)
> ioctl(0, KDSKBMODE, 0x3)                = 0
> ioctl(0, KDSETMODE, 0)                  = 0
> ioctl(4, DRM_IOCTL_DROP_MASTER, 0)      = -1 EACCES (Permission denied)
> ioctl(0, VT_SETMODE, 0x7ffd806628f0)    = 0
> exit_group(1)                           = ?
> +++ exited with 1 +++
> ---
>
>
> --
> Thorsten Wilms
>
> thorwil's design for free software:
> http://thorwil.wordpress.com/
>

[-- Attachment #2: Type: text/html, Size: 4014 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Wayland setup
  2018-03-05 12:59 Wayland setup Thorsten Wilms
                   ` (3 preceding siblings ...)
  2018-03-12 17:19 ` Thorsten Wilms
@ 2018-03-14 21:10 ` Thorsten Wilms
  2018-03-15  1:08   ` Marius Bakke
  2018-03-15 10:06   ` Thorsten Wilms
  4 siblings, 2 replies; 13+ messages in thread
From: Thorsten Wilms @ 2018-03-14 21:10 UTC (permalink / raw)
  To: help-guix

Hi!

I finally got Weston to ... fill my screen with a blocky mess and flood 
STDERR with failure.

To recap:
- use-modules freedesktop and xorg
- global packages: xorg-server-xwayland wayland weston %base-packages
- add "weston-launch" group
- add user to weston-launch
- add user to "input" group
- take care of XDG_RUNTIME_DIR:

   export XDG_RUNTIME_DIR=/tmp/${UID}-runtime-dir;
   mkdir "${XDG_RUNTIME_DIR}"
   chmod 0700 "${XDG_RUNTIME_DIR}

I might just add that to .bash_profile or try to put both that and 
"weston-launch" in a script; rekado suggested this should be a service, 
but the documentation and examples (mainly looking at 
gnu/services/base.scm) leave me puzzled.

Though now I wonder, what would elogind do, if I had it installed?


The running Weston fills the log with repetitions of:

---
radeon: Failed to allocate a buffer:
radeon:    size      : 1048576 bytes
radeon:    alignment : 4096 bytes
radeon:    domains   : 2
radeon:    flags     : 4
---

with a few interspersed:
   [17:53:53.145] queueing pageflip failed: Invalid argument
and
   EE r600_texture.c:1419 r600_texture_transfer_map - failed to create 
temporary texture to hold untiled copy

Meanwhile, weston-launch brings up a functional session on my Ubuntu 
17.04; it doesn't seem to be a general problem with my graphics card.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Wayland setup
  2018-03-14 21:10 ` Thorsten Wilms
@ 2018-03-15  1:08   ` Marius Bakke
  2018-03-15 10:29     ` Thorsten Wilms
  2018-03-15 10:06   ` Thorsten Wilms
  1 sibling, 1 reply; 13+ messages in thread
From: Marius Bakke @ 2018-03-15  1:08 UTC (permalink / raw)
  To: t_w_, help-guix

[-- Attachment #1: Type: text/plain, Size: 1753 bytes --]

Hi Thorsten,

Thorsten Wilms <t_w_@freenet.de> writes:

> Hi!
>
> I finally got Weston to ... fill my screen with a blocky mess and flood 
> STDERR with failure.
>
> To recap:
> - use-modules freedesktop and xorg
> - global packages: xorg-server-xwayland wayland weston %base-packages
> - add "weston-launch" group
> - add user to weston-launch
> - add user to "input" group
> - take care of XDG_RUNTIME_DIR:
>
>    export XDG_RUNTIME_DIR=/tmp/${UID}-runtime-dir;
>    mkdir "${XDG_RUNTIME_DIR}"
>    chmod 0700 "${XDG_RUNTIME_DIR}
>
> I might just add that to .bash_profile or try to put both that and 
> "weston-launch" in a script; rekado suggested this should be a service, 
> but the documentation and examples (mainly looking at 
> gnu/services/base.scm) leave me puzzled.

Thanks a lot for sharing these forays into Guix' uncharted waters :-)

> The running Weston fills the log with repetitions of:
>
> ---
> radeon: Failed to allocate a buffer:
> radeon:    size      : 1048576 bytes
> radeon:    alignment : 4096 bytes
> radeon:    domains   : 2
> radeon:    flags     : 4
> ---
>
> with a few interspersed:
>    [17:53:53.145] queueing pageflip failed: Invalid argument
> and
>    EE r600_texture.c:1419 r600_texture_transfer_map - failed to create 
> temporary texture to hold untiled copy
>
> Meanwhile, weston-launch brings up a functional session on my Ubuntu 
> 17.04; it doesn't seem to be a general problem with my graphics card.

This looks like a driver problem.  Can you post the output of
"dmesg | grep -w 'drm|r600|radeon'" ?

I seem to recall that hardware acceleration on radeon/amdgpu requires
proprietary microcode, even when using the free driver.  Maybe that is
related?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Wayland setup
  2018-03-14 21:10 ` Thorsten Wilms
  2018-03-15  1:08   ` Marius Bakke
@ 2018-03-15 10:06   ` Thorsten Wilms
  1 sibling, 0 replies; 13+ messages in thread
From: Thorsten Wilms @ 2018-03-15 10:06 UTC (permalink / raw)
  To: help-guix

On 14.03.2018 22:10, Thorsten Wilms wrote:
> Though now I wonder, what would elogind do, if I had it installed?

Adding elogind to the mix automatically takes care of XDG_RUNTIME_DIR 
and makes adding the user to "weston-launch" and "input" groups unnecessary.

Forgotten in my earlier list and still necessary: adding weston-launch 
to setuid-programs.

That makes it:
- add to use-modules: freedesktop xorg
- add to use-service-modules: desktop
- add to global packages: xorg-server-xwayland wayland weston
- add to services: elogind
- (setuid-programs (cons #~(string-append #$weston "/bin/weston-launch")
                          %setuid-programs))

-- 
Thorsten Wilms

thorwil's design for free software:
http://thorwil.wordpress.com/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Wayland setup
  2018-03-15  1:08   ` Marius Bakke
@ 2018-03-15 10:29     ` Thorsten Wilms
  0 siblings, 0 replies; 13+ messages in thread
From: Thorsten Wilms @ 2018-03-15 10:29 UTC (permalink / raw)
  To: help-guix

On 15.03.2018 02:08, Marius Bakke wrote:
> This looks like a driver problem.  Can you post the output of
> "dmesg | grep -w 'drm|r600|radeon'" ?
> 
> I seem to recall that hardware acceleration on radeon/amdgpu requires
> proprietary microcode, even when using the free driver.  Maybe that is
> related?

Right, thank you!

comparing `dmesg | grep -w 'drm\|r600\|radeo'` from both systems made 
this stand out:
---
radeon 0000:01:00.0: Direct firmware load for /*(DEBLOBBED)*/ failed 
with error -2
[drm:rv770_init [radeon]] *ERROR* Failed to load firmware!
---

Guess I have to research how to put that back in now, as my level of 
idealism doesn't cover basic functionality falling flat. I understand 
the issues with binary blobs, but from a right-here, right-now 
perspective, what you do here is to cripple a driver (one among many, I 
assume) and let it be a surprise for users if things go belly up.


-- 
Thorsten Wilms

thorwil's design for free software:
http://thorwil.wordpress.com/

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-03-15 10:31 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-05 12:59 Wayland setup Thorsten Wilms
2018-03-05 13:47 ` Andreas Enge
2018-03-07 13:06 ` Oleg Pykhalov
2018-03-11 17:07 ` Thorsten Wilms
2018-03-12 17:19 ` Thorsten Wilms
2018-03-12 19:05   ` Gábor Boskovits
2018-03-12 20:54     ` Thorsten Wilms
2018-03-13 19:50       ` Thorsten Wilms
2018-03-13 21:22         ` Gábor Boskovits
2018-03-14 21:10 ` Thorsten Wilms
2018-03-15  1:08   ` Marius Bakke
2018-03-15 10:29     ` Thorsten Wilms
2018-03-15 10:06   ` Thorsten Wilms

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).