Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X11 session fails to start on Ubuntu Jammy #36

Closed
kgilmer opened this issue Jun 16, 2024 · 6 comments · Fixed by #37
Closed

X11 session fails to start on Ubuntu Jammy #36

kgilmer opened this issue Jun 16, 2024 · 6 comments · Fixed by #37

Comments

@kgilmer
Copy link
Member

kgilmer commented Jun 16, 2024

This issue is found in unstable, containing the latest package versions.

STR:

  1. Install regolith x11 session into Ubuntu Jammy 22.04.04
  2. Log into Regolith X11 session

Expected: see desktop
Actual: "error occurred", returns to login screen

Attached log file does not seem to provide a smoking gun, but that for some reason the x11 session is being started multiple times. Wondering if @SoumyaRanjanPatnaik has any thoughts on how to further troubleshoot.

@kgilmer
Copy link
Member Author

kgilmer commented Jun 16, 2024

log.txt

Log snippet at time of session init

@kgilmer
Copy link
Member Author

kgilmer commented Jun 16, 2024

Posit of multiple instances of i3 being launched from this log line:

Jun 16 10:54:38 testy-ubuntu-jammy regolith-session-x11[2077]: 06/16/2024 10:54:38 AM - [libi3] ERROR: Refusing to create UNIX socket at /run/user/1000/i3/ipc-socket.1949: Socket is already in use

@kgilmer
Copy link
Member Author

kgilmer commented Jun 16, 2024

Issue seems only to be present on Jammy. Noble X11 and Sway sessions via lightdm and gdm3 start successfully.

@SoumyaRanjanPatnaik
Copy link
Contributor

Posit of multiple instances of i3 being launched from this log line:

Jun 16 10:54:38 testy-ubuntu-jammy regolith-session-x11[2077]: 06/16/2024 10:54:38 AM - [libi3] ERROR: Refusing to create UNIX socket at /run/user/1000/i3/ipc-socket.1949: Sock eet is already in use

I see this line in the logs indicating i3 being started by regolith-x11.desktop, with pid 1894.

Jun 16 10:54:38 testy-ubuntu-jammy regolith-x11.desktop[1894]: Regolith is launching i3 with /etc/regolith/i3/config

Later, regolith-session-x11 seems to start i3, this time with pid 2050.

Jun 16 10:54:38 testy-ubuntu-jammy regolith-session-x11[2050]: Regolith is launching i3 with /etc/regolith/i3/config

Its pretty clear there are two seperate instances of i3 being started.

@SoumyaRanjanPatnaik
Copy link
Contributor

I think I've found the problem:

On jammy, session management is not delegated to systemd and should be handled by gnome-session due to the --builtin . systemd should only be used on bionic, buster, noble and trixie. However, the logs seem to indicate that systemd is also for some reason starting the session.

Jun 16 10:54:38 testy-ubuntu-jammy systemd[1417]: Starting Regolith Session for i3...

This means, both gnome-session and systemd are trying to start the session, casuing a race condition between both the sessions. The one that starts i3 first will succeed in acquiring the socket and the second instance will fail.

@SoumyaRanjanPatnaik
Copy link
Contributor

Possible fix in #37.

The target file for both the sessions had a Wants directive that tried to start the session via systemd. This means, starting target files causes the systemd to start the corresponding services, leading to double session start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants