Skip to content
This repository has been archived by the owner on Jan 1, 2023. It is now read-only.

[ERROR => sway] Unable to open wayland socket #39

Closed
azwyver opened this issue Jul 28, 2021 · 10 comments
Closed

[ERROR => sway] Unable to open wayland socket #39

azwyver opened this issue Jul 28, 2021 · 10 comments

Comments

@azwyver
Copy link

azwyver commented Jul 28, 2021

Heres the picture of the error I get while doing sway:
16274662182636403269033442260320

@konimex
Copy link
Member

konimex commented Jul 28, 2021

Do you have seatd running?

@azwyver
Copy link
Author

azwyver commented Jul 28, 2021

No, I am using sway-tiny. Im having the XDG_RUNTIME_DIR to /tmp/1000 and also I have that directory created. On my first run, It worked perfectly but after rebooting, sway doesnt work.

@konimex
Copy link
Member

konimex commented Jul 28, 2021

Have you followed all instructions by KISS Linux?

NOTE: You must be in the 'video', 'audio', and 'tty'
      groups. There is no 'input' group requirement
      as this sway binary is setgid input.

NOTE: You must set XDG_RUNTIME_DIR in your shellrc
      or .profile for things to work. This directory
      must exist and must be writable by your user.

      export XDG_RUNTIME_DIR=/run/user/\$(id -u)

NOTE: You must be the first to call DRMSetMaster.

      If you cannot fulfil this requirement, you must
      use the 'sway' package and run the 'seatd' daemon.

      Another option is to setuid root the sway binary.

NOTE: sway-tiny does not spawn a subshell for exec
      commands, it executes them directly. Use the full
      path to the program you would like to execute.

      # Will not work.
      bindsym \$mod+t exec foot

      # Works.
      bindsym \$mod+t exec /bin/foot

@azwyver
Copy link
Author

azwyver commented Jul 28, 2021

Yes I have.

@konimex
Copy link
Member

konimex commented Jul 28, 2021

I can reproduce this (but only the /dev/dri/card0 part and have no idea why, but this may be related to:

NOTE: You must be the first to call DRMSetMaster.

If you cannot fulfil this requirement, you must use the 'sway' package and run the 'seatd' daemon.

Though I don't know what Dylan means by "You must be the first to call DRMSetMaster", and frankly docs are a bit sparse at this point.

@dylanaraps
Copy link

See: torvalds/linux@45bc3d2

Also @konimex am trying to fix the libatomic issue with nodejs nodejs/node#39546

@azwyver
Copy link
Author

azwyver commented Jul 28, 2021

I can reproduce this (but only the /dev/dri/card0 part and have no idea why, but this may be related to:

NOTE: You must be the first to call DRMSetMaster.

If you cannot fulfil this requirement, you must use the 'sway' package and run the 'seatd' daemon.

Though I don't know what Dylan means by "You must be the first to call DRMSetMaster", and frankly docs are a bit sparse at this point.

As far as this goes, I dont have much idea about. But what im noticing is the environment variable is present but not the directory.

@azwyver
Copy link
Author

azwyver commented Jul 28, 2021

Hmm, this is very weird. I have the enviroent vairable set up in the .profile. The line for loading the export is not working while the other code is functional. Upon closer inspection, i've seen these two things:

  1. The environment variable not loading
  2. The environment variable directory not present

@konimex
Copy link
Member

konimex commented Jul 28, 2021

The environment variable not loading

So, $XDG_RUNTIME_DIR is empty even if you have it on ~/.profile?

The environment variable directory not present

I decided to work around this by adding this in /etc/inittab (before the ttys):

::once:/bin/install -d -o <user> -g <user> /run/user/<uid>

@azwyver
Copy link
Author

azwyver commented Jul 28, 2021

The workaround seems to work perfectly fine in the .profile. Thus, closing this issue.

@azwyver azwyver closed this as completed Jul 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants