View Full Version : [SOLVED] Slim starts too early

January 4th, 2011, 02:43 PM
How can i set Slim display manager to start later (or load nvidia kernel module faster)?

sudo update-rc.d -f slim remove
sudo update-rc.d slim defaults 99

Tried to increase rc link number, but it didn't help. Slim tries to start 2 seconds before nvidia module gets loaded (Maverick minimal amd64).

January 4th, 2011, 05:50 PM
Doesn't Slim interface into GDM? In other words, if you go directly to the login page, won't it show up under the desktop environment menu? Fluxbox does, but I don't know how much Slim and Fluxbox differ.


January 4th, 2011, 06:19 PM
I use Slim to start Fluxbox with automatic login. Slim is display/login manager like GDM/KDM/XDM, i don't have GDM installed. "sudo /etc/init.d/slim start" after boot is finished (nvidia module loaded) works ok. SSD is too fast..


January 4th, 2011, 06:30 PM
Is slim being started via upstart or from sysv? (you can tell by looking at /etc/init.d/slim -- if it's a symlink to /lib/init/upstart-job then it's being started by upstart).

I don't know the details on it, but if it's being started by upstart, then you can make it dependent on the video driver being loaded (I believe kdm and gdm are already set up this way).

If it's just a sysv init script, I'm not sure. I know these scripts support dependencies, but how to actually specify the loading of the hardware drivers I don't know.

January 4th, 2011, 07:53 PM
It is sysv script. Have to check if i can convert it to upstart.

January 5th, 2011, 11:00 AM
Changing to upstart fixed it.

/etc/init/slim.conf (modded from kdm.conf):

# SLiM - Simple Login Manager
# The display manager service manages the X servers running on the
# system, providing login and auto-login services

description "Simple Login Manager"
author "Richard Johnson"

start on (filesystem
and started dbus
and (drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1
or stopped udevtrigger))
stop on runlevel [016]

emits starting-dm

env XORGCONFIG=/etc/X11/xorg.conf

if [ -n "$UPSTART_EVENTS" ]
[ ! -f /etc/X11/default-display-manager -o "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/bin/slim" ] || { stop; exit 0; }

# Check kernel command-line for inhibitors
for ARG in $(cat /proc/cmdline)
case "${ARG}" in
plymouth quit || : # We have the ball here
exit 0

if [ -r /etc/default/locale ]; then
. /etc/default/locale
elif [ -r /etc/environment ]; then
. /etc/environment

exec slim
end script

sudo update-rc.d -f slim remove
sudo mv /etc/init.d/slim ~/backup/slim-original-sysvrc-script
sudo ln -s /lib/init/upstart-job /etc/init.d/slim

January 6th, 2011, 09:58 PM
Very nice; you should submit this as a patch to Ubuntu's SLiM maintainer.

January 7th, 2011, 04:14 PM
Ok, i created bug report with fix info.

October 16th, 2011, 10:45 PM
I have a somewhat similar problem.

I'm trying to build a custom Ubuntu install based on Openbox, using Slim as a login manager. I had the problem that Plymouth anim kept playing (although shrinked) on Slim screen and on Openbox background. I noticed that plymouth was still running in the processes list (although I didn't know if it was normal or not). After some research, I found a bug report (https://bugs.launchpad.net/ubuntu/+source/slim/+bug/567120) saying that there was a problem in Slim, that used init instead of upstart, thus Plymouth didn't know it had to stop, etc.

I then found this thread. I've applied the modifications to convert Slim to an upstart job (as far as I understand it). After rebooting, the Plymouth animation isn't displayed anymore on Slim screen (hurray!) but after I enter my login+pwd, I end up on the Plymouth screen that seems to be stuck and Openbox doesn't start (not-so-hurray).

I managed to revert to the original situation. Any idea what doesn't work in my case? What can I check? Mabe the fix isn't adapted anymore to the current Ubuntu version (using Oneiric)?

March 17th, 2013, 12:48 PM
It seems this issue is still relevant in Ubuntu 12.10 , in addition to the fix P.Kosunen mentioned I also had to edit /etc/init/plymouth-stop.conf and add slim there, otherwise plymouth would keep running after slim has been started.

March 17th, 2013, 06:23 PM
If a post is older than a year or so and hasn't had a new reply in that time, instead of replying to it, create a new thread. In the software world, a lot can change in a very short time, and doing things this way makes it more likely that you will find the best information. You may link to the original discussion in the new thread if you think it may be helpful.