6
1
I've been reading lots of posts about this problem regarding previous versions of Ubuntu, but they don't seem to work in my case.
At boot and shown in /var/log/boot.log the daemon /usr/sbin/lightdm, simply shuts down - seemingly without any obvious error, leaving me stuck with the "Kubuntu" grinning at me. Then, if I fire up a terminal, log in and perform a "service lightdm start" it will start perfectly.
I've tried some "ugly hacks" to make it start up, such as adding a bottom line in the init-script "/etc/init.d/lightdm" service lightdm start or /etc/init.d/lightdm start, but still it will not start at boot. All other displaymanagers (gdm and kdm) are uninstalled.
Any ideas?
#!/bin/sh
# Largely adapted from xdm's init script:
# Copyright 1998-2002, 2004, 2005 Branden Robinson <branden@debian.org>.
# Copyright 2006 Eugene Konev <ejka@imfi.kspu.ru>
#
# This is free software; you may redistribute it and/or modify
# it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2,
# or (at your option) any later version.
#
# This is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License with
# the Debian operating system, in /usr/share/common-licenses/GPL; if
# not, write to the Free Software Foundation, Inc., 51 Franklin Street,
# Fifth Floor, Boston, MA 02110-1301, USA.
### BEGIN INIT INFO
# Provides: lightdm
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: $named acpid hal
# Should-Stop: $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start lightdm
### END INIT INFO
set -e
HEED_DEFAULT_DISPLAY_MANAGER=
# To start lightdm even if it is not the default display manager, change
# HEED_DEFAULT_DISPLAY_MANAGER to "false."
# Also overridable from command line like:
# HEED_DEFAULT_DISPLAY_MANAGER=false /etc/init.d/lightdm start
[ -z "$HEED_DEFAULT_DISPLAY_MANAGER" ] && HEED_DEFAULT_DISPLAY_MANAGER=true
DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager
PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/sbin/lightdm
PIDFILE=/var/run/lightdm.pid
if [ -r /etc/default/locale ]; then
. /etc/default/locale
export LANG LANGUAGE
fi
test -x $DAEMON || exit 0
. /lib/lsb/init-functions
SSD_START_ARGS="--pidfile $PIDFILE --name $(basename $DAEMON) --startas $DAEMON -- -d"
SSD_STOP_ARGS="--pidfile $PIDFILE --name $(basename $DAEMON) --retry TERM/5/TERM/5"
case "$1" in
start)
if [ "$HEED_DEFAULT_DISPLAY_MANAGER" = "true" ] &&
[ -e $DEFAULT_DISPLAY_MANAGER_FILE ] &&
[ "$(cat $DEFAULT_DISPLAY_MANAGER_FILE)" != "/usr/bin/lightdm" -a "$(cat $DEFAULT_DISPLAY_MANAGER_FILE)" != "/usr/sbin/lightdm" ]; then
echo "Not starting X display manager (lightdm); it is not the default" \
"display manager."
else
log_daemon_msg "Starting X display manager" "lightdm"
start-stop-daemon --start --quiet $SSD_START_ARGS \
|| log_progress_msg "already running"
log_end_msg 0
fi
;;
restart)
[ -f $PIDFILE ] && /etc/init.d/lightdm stop
[ -f $PIDFILE ] && exit 1
/etc/init.d/lightdm start
;;
stop)
log_daemon_msg "Stopping X display manager" "lightdm"
if ! [ -f $PIDFILE ]; then
log_progress_msg "not running ($PIDFILE not found)"
else
start-stop-daemon --stop --quiet $SSD_STOP_ARGS
SSD_RES=$?
if [ $SSD_RES -eq 1 ]; then
log_progress_msg "not running"
fi
if [ $SSD_RES -eq 2 ]; then
log_progress_msg "not responding to TERM signals"
else
if [ -f $PIDFILE ]; then
log_progress_msg "(removing stale $PIDFILE)"
rm $PIDFILE
fi
fi
fi
log_end_msg 0
;;
force-reload)
/etc/init.d/lightdm restart
;;
*)
echo "Usage: /etc/init.d/lightdm {start|stop|restart|force-reload}"
exit 1
;;
esac
exit 0
What is in your
/etc/default/grub
? Possible that it has a lineGRUB_CMDLINE_LINUX_DEFAULT="quiet text"
. Also, editing/etc/init.d/lightdm
is not appropriate because it will just call itself recursively. – Danatela – 2014-04-29T06:06:25.533What's in the logs in /var/log/Xorg.0.log ? – Lawrence – 2014-04-29T07:12:05.870
Danatela: The line you suggested in /etc/default/grub was not there. It was "quiet splash". I have also reset the /etc/init.d/lightdm to it's original state. Lawrence: Now when I study the /var/log/Xorg.0.log there are a few errors:
cat Xorg.0.log | grep EE
[ 94.517] (EE) open /dev/dri/card0: No such file or directory [ 97.226] (EE) AIGLX error: failed to open /usr/X11R6/lib/modules/dri/fglrx_dri.so, error[/usr/X11R6/lib/modules/dri/fglrx_dri.so: cannot open shared object file: No such file or directory] [ 873.817] (EE) Server terminated successfully (0). Closing log file. – Paul Bergström – 2014-04-29T12:34:23.007
I found something here: http://wiki.cchtml.com/index.php/Ubuntu_Gutsy_Installation_Guide#If_you_get_.2Fusr.2FX11R6.2Flib.2Fmodules.2Fdri.2Ffglrx_dri.so_not_found, that relates to that problem. I will try to do the symlink as suggested there to see if it will work.
– Paul Bergström – 2014-04-29T12:35:17.8731Well there was some minor success. The error [ 97.226] (EE) AIGLX error: failed to open /usr/X11R6/lib/modules/dri/fglrx_dri.so, error[/usr/X11R6/lib/modules/dri/fglrx_dri.so: cannot open shared object file: No such file or directory] is now gone from the log. It was resolved in two steps, mkdir -p /usr/X11R6/lib/modules/dri and then in the same directory sudo ln -s /usr/lib/fglrx/dri/fglrx_dri.so. Unfortunately lightdm does still not start at boot:( – Paul Bergström – 2014-04-29T13:27:43.747
@Danatela: I'm starting to believe there is something wrong with the lightdm init-script. In the logs I can only find a line about lightdm stopping - not anything about it was ever starting. There is some more info in my post at superuser.com, but I guess I made wrong when I used notifications. – Paul Bergström – 2014-04-30T03:44:26.793
@Lawrence: I'm starting to believe there is something wrong with the lightdm init-script. In the logs I can only find a line about lightdm stopping - not anything about it was ever starting. There is some more info in my post at superuser.com, but I guess I made wrong when I used notifications. – Paul Bergström – 2014-04-30T03:45:44.950
So post your
lightdm
script and we will compare it with ours. – Danatela – 2014-04-30T03:55:11.437@Danatela: I posted it in my main post. Sorry, if this isn't the correct way of doing it, but I didn't know how else..... – Paul Bergström – 2014-04-30T04:09:47.713
It's the right way for Stack Exchange! Most newbies post important stuff in comments doing it hard to find them. But you intuitively did the right thing! Congratulations ;) However, it needs some formatting. I will do it for you. – Danatela – 2014-04-30T04:26:17.250
Try
sudo update-rc.d lightdm remove && sudo update-rc.d lightdm defaults && sudo update-rc.d lightdm enable
. – Danatela – 2014-04-30T04:32:53.290@Danatela: I'm getting update-rc.d: /etc/init.d/lightdm exists during rc.d purge (use -f to force) on the first command. I also tried with -f, but still the same. Maybe I have to get out of Xsession? – Paul Bergström – 2014-04-30T04:41:53.770
It should exist.
update-rc.d
doesn't remove init script actually, it only removes it from init queue. – Danatela – 2014-04-30T04:43:54.037@Danatela: First, thank you for your effort:) Then there was a little success. I was able to execute the commands in textmode with the flag -f. After that a reboot and some different behaviour. The screen turns black and in /var/log/boot.log it states "Not starting lightdm since this is not the default display manager". However in /etc/X11/default-display-manager there is just one daemon written - /usr/sbin/lightdm. Could boot read default display manager somewhere else? – Paul Bergström – 2014-04-30T05:03:01.010
@Danatela: SUCCESS!!!! In the init-script I changed the line HEED_DEFAULT_DISPLAY_MANAGER=true to HEED_DEFAULT_DISPLAY_MANAGER=false and voilà it works!!!!! – Paul Bergström – 2014-04-30T05:12:55.793
Congratulations! So write the solution as answer. Try to make it verbose enough to be useful. – Danatela – 2014-04-30T05:16:26.243