Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Sway doesn't start.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Savoritias
n00b
n00b


Joined: 07 Oct 2013
Posts: 20

PostPosted: Mon Feb 11, 2019 9:45 am    Post subject: [SOLVED] Sway doesn't start. Reply with quote

I'm doing a fresh install of gentoo just with sway as a wm. But everytime i try to start it the system becomes unresponsive to the point of locking up completely unable to type anything. There is no error message. I tried running sway with the --verbose option to see if there is an error message but the terminal flashes and logs me out forcing me to relogin each time. Is there any way to get the error log?

The command I use to run sway is
Code:
exec ck-launch-session dbus-launch --sh-syntax --exit-with-session sway


When I type just sway the error message is

Code:
[wlroots-0.3/backend/session/direct.c:166] Could not get current tty number: Inappropriate ioctl for device
2019-02-11 10:33:04 - [wlroots-0.3/backend/session/session.c:91] Failed to load session backend
2019-02-11 10:33:04 - [wlroots-0.3/backend/backend.c:282] Failed to start a DRM session
2019-02-11 10:33:04 - [sway-1.0-rc1/sway/server.c:46] Unable to create backend


I dont know if it relevant but when i run startx it gives me this message:

Code:
xauth:  file /.serverauth.7333 does not exist
xauth:  file /.Xauthority does not exist
xauth:  file /.Xauthority does not exist

_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
(EE)
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE)
(EE)
Please consult the The X.Org Foundation support
    at http://wiki.x.org
 for help.
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
Invalid MIT-MAGIC-COOKIE-1 keyxinit: giving up
xinit: unable to connect to X server: Resource temporarily unavailable
xinit: server error


My system info is:

Code:
Portage 2.3.51 (python 3.6.5-final-0, default/linux/amd64/17.0/hardened, gcc-7.3.0, glibc-2.27-r6, 4.18.0-10-generic x86_64)
=================================================================
System uname: Linux-4.18.0-10-generic-x86_64-Intel-R-_Core-TM-_i5-7200U_CPU_@_2.50GHz-with-gentoo-2.6
KiB Mem:     6009404 total,   2220972 free
KiB Swap:    1279996 total,   1279996 free
Timestamp of repository gentoo: Sun, 10 Feb 2019 15:30:01 +0000
Head commit of repository gentoo: 086c30feff1ad160251723ec92ba4844e3cceb27
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.30 p5) 2.30.0
app-shells/bash:          4.4_p23-r1::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.38.3-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.30-r4::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.14-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts:

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O3 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=native -O3 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch preserve-libs protect-owned sandbox sfperms strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O3 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl amd64 audit bash-completion bzip2 caps cgroups consolekit crypt cxx dbus evdev gnutls hardened iconv ipv6 libressl libtirpc multilib ncurses nls nptl openmp pam pcre pie pm-utils policykit readline seccomp ssl ssp udev unicode wayland xattr xtpax zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


My kernel configuration is: https://pastebin.com/9rK9CwrV

SOLUTION: sway seems to need the xdg variable to start. Add the lines to your bash profile from the sway wiki page and I start it with the line above taken from the sway github wiki..


Last edited by Savoritias on Mon Feb 11, 2019 11:45 am; edited 1 time in total
Back to top
View user's profile Send private message
mike155
Veteran
Veteran


Joined: 17 Sep 2010
Posts: 1567
Location: Frankfurt, Germany

PostPosted: Mon Feb 11, 2019 10:16 am    Post subject: Reply with quote

Quote:
and logs me out

That's because you use 'exec'. If you start sway manually, don't use 'exec'.

Quote:
Is there any way to get the error log?

Redirect the output to a file:
Code:
sway -d -V &>/tmp/sway-output.log


Quote:
When I type just sway the error message is

I get the error message you posted when I try to start Sway from a running X or Wayland session. That's wrong. The right thing to do is to log in to a text console (no X or Wayland server is running) and to start Sway from there. An alternative would be to use a login manager and to start sway from there, but I don't recommend it.

Quote:
Cannot establish any listening sockets - Make sure an X server isn't already running(EE)

This again indicates that a Wayland or X server is already running. Don't run startx or sway if a Wayland or X server is already running.
Back to top
View user's profile Send private message
Savoritias
n00b
n00b


Joined: 07 Oct 2013
Posts: 20

PostPosted: Mon Feb 11, 2019 11:43 am    Post subject: Reply with quote

mike155 wrote:
Quote:
and logs me out

That's because you use 'exec'. If you start sway manually, don't use 'exec'.

Quote:
Is there any way to get the error log?

Redirect the output to a file:
Code:
sway -d -V &>/tmp/sway-output.log


Quote:
When I type just sway the error message is

I get the error message you posted when I try to start Sway from a running X or Wayland session. That's wrong. The right thing to do is to log in to a text console (no X or Wayland server is running) and to start Sway from there. An alternative would be to use a login manager and to start sway from there, but I don't recommend it.

Quote:
Cannot establish any listening sockets - Make sure an X server isn't already running(EE)

This again indicates that a Wayland or X server is already running. Don't run startx or sway if a Wayland or X server is already running.


So when I start sway without exec it gets stuck and the logfile is empty. When I started it with exec it told me that it needed the xdg variable. I added the line from the wiki and now it works perfectly thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum