You are not logged in.

#1 2014-02-14 08:51:41

mikeyj001
Member
Registered: 2013-08-20
Posts: 6

Solved - Wayland socket wayland-0 does not exist

Hi all,

I've installed the Wayland/Weston packages 1.3.90 on Arch in order to use a pure Wayland display server.  I'm having to set WAYLAND_DISPLAY=wayland-0 in the environment on boot, which gets me past an access issue.  However, a wayland display socket (wayland-0) is not being created in the /run/user/1000 directory which of course has user permissions.

My question is how can I get this socket created?

The current message I'm getting is :

Failed to create display: No such file or directory.


I've also tried manually creating the socket using socat on the command line, but it isn't quite right.  Can anyone tell me how to at least create the display socket manually?

Thanks for any help

Last edited by mikeyj001 (2014-04-07 05:49:00)

Offline

#2 2014-02-14 17:28:35

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,660

Re: Solved - Wayland socket wayland-0 does not exist

First, why in the world are you using 1.3.90? Second, what issue would make you set that env variable?

What is the output of "echo $XDG_RUNTIME_DIR"?

Offline

#3 2014-02-14 19:42:13

mikeyj001
Member
Registered: 2013-08-20
Posts: 6

Re: Solved - Wayland socket wayland-0 does not exist

Thanks for your reply.

FYI I did update wayland/weston this morning to 1.4.0 and tried it, but ended up with the same result.  I've actually been having issues since version 1.2, building the source from git.  I'm now just using the packages from the repo.

To answer your question:
$XDG_RUNTIME_DIR = /run/user/1000.

Without setting the environment variable WAYLAND_DISPLAY=wayland-0 at boot, I kept getting the message:

Failed to initialize EGL
fatal:  Failed to create compositor

I used strace to give me some idea of what was going on, and even then it wasn't clear to me at first.  I got the error:

-1 EACCES  (Permission denied)

From experience I know a normal user cannot access tty so easily, so I checked the man page on weston to get some clues.  This is why I'm setting the WAYLAND_DISPLAY environment variable at boot.  Since then the EACCES error has gone, and the error I get is now ENOTTY, in fact I have 2 of those errors.

From what I've read, if XDG_RUNTIME_DIR and WAYLAND_DISPLAY are set, then the display socket wayland-0 should automatically be created.  This isn't happening, so as stated in my first post I'm getting:

Failed to create display: No such file or directory.

I suspect it is looking for /run/user/1000/wayland-0, so all I need to know is what do I do to get this socket created, or how can I create it manually from the command line?

Something I should have mentioned in the first post is that I'm using virtualbox for my 32 and 64 bit Arch VMs, but I doubt that is an issue.

Thanks again

Last edited by mikeyj001 (2014-02-16 09:09:28)

Offline

#4 2014-02-16 09:07:17

mikeyj001
Member
Registered: 2013-08-20
Posts: 6

Re: Solved - Wayland socket wayland-0 does not exist

If I try to do:

   socat CREATE:/run/user/1000/wayland-0 SOCKET-LISTEN:PF_LOCAL:SOCK_STREAM:0  

then I get the error:

E syntax error in "0"

Does anyone get the same?  It looks like when the socket is being created on my system, it doesn't like the zero at the end.

I've also seen the same error when trying this on my host system SUSE.

It looks like the relevant bit of code is in wayland-server.c in the wl_display_add_socket function.

1061  s = malloc(sizeof *s);
1062  if (s == NULL)
1063   return -1;
1064 
1065  s->fd = wl_os_socket_cloexec(PF_LOCAL, SOCK_STREAM, 0);
1066  if (s->fd < 0) {
1067  free(s);
1068  return -1;
1069  }
1070 
1071  if (name == NULL)
1072  name = getenv("WAYLAND_DISPLAY");
1073  if (name == NULL)
1074  name = "wayland-0";

So I guess the question is, what can I do to get the zero recognized, or what do I replace it with to get my socket created?  This seems to be what's stopping progress, unless someone has other ideas.

Offline

#5 2014-04-07 05:48:31

mikeyj001
Member
Registered: 2013-08-20
Posts: 6

Re: Solved - Wayland socket wayland-0 does not exist

My issue has been resolved by using the fbdev backend.  One thing I have to do is find a way of automating the loading of the uvesafb module which I used to do from /etc/default/grub, but it looks like that file is already set up to set the screen size automatically. Using modprobe uvesafb is ok for the current session, but the module doesn't remain loaded after a reboot.

The main thing is that I can now get the weston desktop, thanks to Armin K on the wayland mailing list.

Offline

#6 2014-04-07 06:17:29

headkase
Member
Registered: 2011-12-06
Posts: 1,978

Re: Solved - Wayland socket wayland-0 does not exist

I believe you can load the module manually by setting a .conf file in /etc/modprobe.d/

So, /etc/modprobe.d/uvesafb.conf:

uvesafb

All by itself will load the module.  If you need the module in your initramfs then see the Wiki.

Last edited by headkase (2014-04-07 06:18:36)

Offline

#7 2014-05-20 19:32:43

mikeyj001
Member
Registered: 2013-08-20
Posts: 6

Re: Solved - Wayland socket wayland-0 does not exist

Hi Headkase,

Didn't know you added an entry. 

If I remember right, I think I did a similar thing adding uvesafb in /etc/mkinitcpio,  or somewhere similar, to load the module at startup.  The unfortunate thing I found is that by using the framebuffer for weston, I can't use it for other applications requiring framebuffer use.  Kinda defeats the object in my case.

Thanks anyway

Offline

Board footer

Powered by FluxBB