FS#32177 - slim fails to start with systemd

Attached to Project: Arch Linux
Opened by Jon Gjengset (Jonhoo) - Tuesday, 23 October 2012, 09:39 GMT
Last edited by Andrea Scarpino (BaSh) - Tuesday, 23 October 2012, 17:22 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
slim fails to start with the error message "no screens found" if using systemd and it is started before console-kit-daemon.

Logging in on tty1 and running "systemctl restart slim" starts slim normally.
Editing slim.service and adding "After=console-kit-daemon.service" solves the problem

I propose adding the "After=" line to the slim.service unit file included with the Arch package as this seems to solve the problem.

Additional info:
* package version(s)
slim 1.3.4-3
consolelkit 0.4.6-4
systemd 194-4

See attached logfile. Notice how consolekit is started after slim even though slim requires consolekit to be running.

Steps to reproduce:
1. Install slim on a systemd running systemd
2. Enable slim on boot using "systemctl enable slim.service"
3. Reboot
4. Notice how slim fails to start
5. Log in on tty1
6. Run "systemctl restart slim"
7. Notice how slim starts normally
This task depends upon

Closed by  Andrea Scarpino (BaSh)
Tuesday, 23 October 2012, 17:22 GMT
Reason for closing:  Fixed
Additional comments about closing:  slim 1.3.4-4
Comment by Andrea Scarpino (BaSh) - Tuesday, 23 October 2012, 10:03 GMT
could you try slim 1.3.4-4 from [testing]?
Comment by Jon Gjengset (Jonhoo) - Tuesday, 23 October 2012, 10:10 GMT
The one from [testing] works.
I can see that the difference is that it disables consolekit integration, so it would be another effective solution to this problem.
Comment by Jon Gjengset (Jonhoo) - Tuesday, 23 October 2012, 11:22 GMT
After a reboot, slim now fails like before.
This is on a Lenovo X1 Carbon, running an up-to-date 64-bit default kernel Arch install with xf86-video-intel.
Comment by Jon Gjengset (Jonhoo) - Tuesday, 23 October 2012, 11:34 GMT
Well this is a strange bug indeed:
1. install slim from testing + reboot
2. slim starts correctly
3. reboot
4. slim fails to start
5. remove consolekit + reboot
6. slim fails to start
7. reinstall xf86-video-intel + reboot
8. slim starts correctly (?!?!)
9. reinstall consolekit + reboot
10. slim fails to start

So, it seems not only must consolekit be removed for slim to start at all with the version from [testing], but the graphics driver (at least for intel) has to be reinstalled after removing consolekit!
Furthermore, removing consolekit is a bit of a problem since operations like shutdown and reboot now require root access since systemd does not yet support consolekit-like privilege management.
Comment by Jan de Groot (JGC) - Tuesday, 23 October 2012, 12:10 GMT
You'll also need polkit from testing to gain those privileges. If you use tools like networkmanager you should also get that from testing.
Comment by Jon Gjengset (Jonhoo) - Tuesday, 23 October 2012, 14:12 GMT
Now slim does not start correctly regardless of consolekit/xf86-video-intel. It still works perfectly if I run "systemctl start slim" after logging in on tty1.

Also, even after installing polkit from [testing], "systemctl poweroff" and "systemctl reboot" fail with access denied. See attached file for the dbus/systemd errors appearing in the logs.
Comment by Jon Gjengset (Jonhoo) - Tuesday, 23 October 2012, 14:15 GMT
After another reboot, everything now works as it should (slim starts and poweroff/reboot works). This seems to also keep working after subsequent reboots.
Not sure what happened here, but I guess this is one of those times where rebooting again fixes the problem?

Loading...