on February 23, 2009 by Wolf in Linux, Comments (0)

Mysterious Ubuntu 8.10 Log-in Problem Solved

I updated one of our machines from Ubuntu 8.04 to 8.10 about a week ago and an error appeared.. The mouse and keyboard input were ignored at the log-in screen. I found a work-around, which was to go into TTY1 (straight command line terminal emulator screen – like starting Windows in Command-line-only mode) by hitting [Ctrl]+[Alt]+[F1] keys, logging in as a standard user, then using the command ps -a to find the PID (process ID) for xorg (the GUI X-server). Then sudo kill -9 [PID# for xorg]. After that I could type in startx (which restarts the Xserver) and since I was already logged in, the GUI session could continue normally.
I just found in https://bugs.launchpad.net/ubuntu/intrepid/+source/gdm/+bug/271138 this very issue being discussed (as bug #271138), and the core of the problem was discovered by Ovidiu Rosoiu who wrote on 2008-10-30:

I can confirm this behavior after an upgrade from Kubuntu 8.04 to 8.10. kdm.log said “(EE) config/hal: couldn’t initialise context: (null) ((null))” which lead me to the conclusion that kdm started before hal. Indeed, in /etc/rc2.d, scripts are S20kdm and S24hal.
So i moved S20kdm to S25kdm, and everything is fine now, keyboard and mouse working as intended when kdm starts. I suppose the problem with gdm in Intrepid is similar.

So what has happened is that the standard service start-up order has been messed up! S20 and S25 are relative start times for the services; hal is the hardware abstraction layer and kdm is the k display manager (which includes the gui log-in screen. Starting the gui before the hardware meant that the gui could not find the mouse and keyboard. Very simple and exonerated the kdm developers and the xorg developers. The Ubuntu developers just have to make sure that the standard set-up package is changed to make sure the hardware is inventoried before the GUI is started.

This was interesting. I did a check on the content of my /etc/rc2.d directory (ls /etc/rc2.d), and discovered that I had just the same issue. S13gdm and S24hal. These files are links to the start-up scripts for the respective services Using ls -l shows the specific path to the script being invoked.
First I tried to copy the S13gdm to S25gdm, but it just made a copy of the text snippet without copying the function. This is something that happens with copying shortcuts. The command for that is sudo cp S13gdm S25gdm, but since it didn’t work, I went ahead and used the move command to rename the file. The command for that, sudo mv S13gdm S25gdm, had the proper effect, as you can see below. The only thing left to do is to reboot the machine and see if that actually solves the problem…

The reboot went flawlessly. That is one more trouble-ticket I can close, and one more mysterious operating system bug that is closed.  In case you are wondering, sudo is a command that gives a user the powers of root for the duration of a single command.  The raw commands above are cp for copying files which you have permission to modify, and mv for moving (if between directories) or renaming (either in the same directory or across directories).  It is good practice to avoid staying logged in as root for any longer than absolutely necessary.

Command Line input and output

hhalton@tariel:~$ cd /etc/rc2.d
hhalton@tariel:/etc/rc2.d$ ls
K11anacron                           S20apport                         S25bluetooth
README                               S20cups                              S25mdadm
S01policykit                         S20dkms_autoinstaller  S25pulseaudio
S05vbesave                          S20festival                         S28NetworkManager
S10acpid                               S20hotkey-setup              S30system-tools-backends
S10powernowd.early        S20inetd                             S89anacron
S10sysklogd                         S20laptop-mode              S89atd
S10xserver-xorg-input-wacom S20nvidia-kernel S89cron
S11klogd                               S20postfix                         S98usplash
S12dbus                               S20powernowd                 S99acpi-support
S13gdm                                S20rsync                            S99fetchmail
S14avahi-daemon              S23ntp                               S99rc.local
S14ppp                                 S24dhcdbd                        S99rmnologin
S20apmd                             S24hal                                 S99stop-readahead
hhalton@tariel:/etc/rc2.d$ sudo cp S13gdm S25gdm
[sudo] password for hhalton:

hhalton@tariel:/etc/rc2.d$ ls -l
total 8
lrwxrwxrwx 1 root root 17 2005-11-25 19:06 K11anacron -> ../init.d/anacron
-rw-r–r– 1 root root 556 2008-10-14 09:02 README
lrwxrwxrwx 1 root root 19 2008-07-09 23:58 S01policykit -> ../init.d/policykit
lrwxrwxrwx 1 root root 17 2005-11-25 19:06 S05vbesave -> ../init.d/vbesave
lrwxrwxrwx 1 root root 15 2006-07-17 20:27 S10acpid -> ../init.d/acpid
lrwxrwxrwx 1 root root 25 2006-07-17 22:11 S10powernowd.early -> ../init.d/powernowd.early
lrwxrwxrwx 1 root root 18 2005-11-25 13:53 S10sysklogd -> ../init.d/sysklogd
lrwxrwxrwx 1 root root 34 2008-07-09 23:58 S10xserver-xorg-input-wacom -> ../init.d/xserver-xorg-input-wacom
lrwxrwxrwx 1 root root 15 2005-11-25 13:53 S11klogd -> ../init.d/klogd
lrwxrwxrwx 1 root root 14 2008-07-09 23:58 S12dbus -> ../init.d/dbus
lrwxrwxrwx 1 root root 13 2005-11-25 19:10 S13gdm -> ../init.d/gdm
lrwxrwxrwx 1 root root 22 2009-02-13 14:02 S14avahi-daemon -> ../init.d/avahi-daemon
lrwxrwxrwx 1 root root 13 2005-11-25 13:53 S14ppp -> ../init.d/ppp
lrwxrwxrwx 1 root root 14 2005-11-25 19:06 S20apmd -> ../init.d/apmd
lrwxrwxrwx 1 root root 16 2008-07-09 23:35 S20apport -> ../init.d/apport
lrwxrwxrwx 1 root root 14 2009-02-13 11:44 S20cups -> ../init.d/cups
lrwxrwxrwx 1 root root 28 2009-02-14 00:04 S20dkms_autoinstaller -> ../init.d/dkms_autoinstaller
lrwxrwxrwx 1 root root 18 2006-07-17 22:30 S20festival -> ../init.d/festival
lrwxrwxrwx 1 root root 22 2009-02-13 13:54 S20hotkey-setup -> ../init.d/hotkey-setup
lrwxrwxrwx 1 root root 15 2005-11-25 13:52 S20inetd -> ../init.d/inetd
lrwxrwxrwx 1 root root 21 2006-07-17 22:05 S20laptop-mode -> ../init.d/laptop-mode
lrwxrwxrwx 1 root root 23 2006-07-17 22:10 S20nvidia-kernel -> ../init..d/nvidia-kernel
lrwxrwxrwx 1 root root 17 2005-11-25 13:53 S20postfix -> ../init.d/postfix
lrwxrwxrwx 1 root root 19 2005-11-25 19:07 S20powernowd -> ../init.d/powernowd
lrwxrwxrwx 1 root root 15 2005-11-25 13:52 S20rsync -> ../init.d/rsync
lrwxrwxrwx 1 root root 13 2008-07-09 23:38 S23ntp -> ../init.d/ntp
lrwxrwxrwx 1 root root 16 2008-07-10 00:05 S24dhcdbd -> ../init.d/dhcdbd
lrwxrwxrwx 1 root root 13 2008-07-09 23:58 S24hal -> ../init.d/hal
lrwxrwxrwx 1 root root 19 2008-07-10 00:04 S25bluetooth -> ../init.d/bluetooth
-rwxr-xr-x 1 root root 3366 2009-02-23 12:13 S25gdm   // See how this is just a file and not a link to anything?
lrwxrwxrwx 1 root root 15 2005-11-25 13:52 S25mdadm -> ../init.d/mdadm
lrwxrwxrwx 1 root root 20 2008-07-09 23:38 S25pulseaudio -> ../init.d/pulseaudio
lrwxrwxrwx 1 root root 24 2009-02-13 22:23 S28NetworkManager -> ../init.d/NetworkManager
lrwxrwxrwx 1 root root 31 2009-02-13 12:09 S30system-tools-backends -> ../init.d/system-tools-backends
lrwxrwxrwx 1 root root 17 2005-11-25 19:06 S89anacron -> ../init.d/anacron
lrwxrwxrwx 1 root root 13 2005-11-25 13:53 S89atd -> ../init.d/atd
lrwxrwxrwx 1 root root 14 2005-11-25 13:52 S89cron -> ../init.d/cron
lrwxrwxrwx 1 root root 17 2006-07-17 20:31 S98usplash -> ../init.d/usplash
lrwxrwxrwx 1 root root 22 2005-11-25 19:06 S99acpi-support -> ../init.d/acpi-support
lrwxrwxrwx 1 root root 19 2005-11-25 19:06 S99fetchmail -> ../init.d/fetchmail
lrwxrwxrwx 1 root root 18 2006-07-17 21:45 S99rc.local -> ../init.d/rc.local
lrwxrwxrwx 1 root root 19 2005-11-25 13:51 S99rmnologin -> ../init..d/rmnologin
lrwxrwxrwx 1 root root 24 2006-07-17 22:12 S99stop-readahead -> ../init.d/stop-readahead

hhalton@tariel:/etc/rc2.d$ sudo mv S13gdm S25gdm
hhalton@tariel:/etc/rc2.d$ ls -l
total 4
lrwxrwxrwx 1 root root 17 2005-11-25 19:06 K11anacron -> ../init.d/anacron
-rw-r–r– 1 root root 556 2008-10-14 09:02 README
lrwxrwxrwx 1 root root 19 2008-07-09 23:58 S01policykit -> ../init.d/policykit
lrwxrwxrwx 1 root root 17 2005-11-25 19:06 S05vbesave -> ../init.d/vbesave
lrwxrwxrwx 1 root root 15 2006-07-17 20:27 S10acpid -> ../init.d/acpid
lrwxrwxrwx 1 root root 25 2006-07-17 22:11 S10powernowd.early -> ../init.d/powernowd.early
lrwxrwxrwx 1 root root 18 2005-11-25 13:53 S10sysklogd -> ../init.d/sysklogd
lrwxrwxrwx 1 root root 34 2008-07-09 23:58 S10xserver-xorg-input-wacom -> ../init.d/xserver-xorg-input-wacom
lrwxrwxrwx 1 root root 15 2005-11-25 13:53 S11klogd -> ../init.d/klogd
lrwxrwxrwx 1 root root 14 2008-07-09 23:58 S12dbus -> ../init.d/dbus
lrwxrwxrwx 1 root root 22 2009-02-13 14:02 S14avahi-daemon -> ../init.d/avahi-daemon
lrwxrwxrwx 1 root root 13 2005-11-25 13:53 S14ppp -> ../init.d/ppp
lrwxrwxrwx 1 root root 14 2005-11-25 19:06 S20apmd -> ../init.d/apmd
lrwxrwxrwx 1 root root 16 2008-07-09 23:35 S20apport -> ../init.d/apport
lrwxrwxrwx 1 root root 14 2009-02-13 11:44 S20cups -> …/init.d/cups
lrwxrwxrwx 1 root root 28 2009-02-14 00:04 S20dkms_autoinstaller -> ../init.d/dkms_autoinstaller
lrwxrwxrwx 1 root root 18 2006-07-17 22:30 S20festival -> ../init.d/festival
lrwxrwxrwx 1 root root 22 2009-02-13 13:54 S20hotkey-setup -> ../init.d/hotkey-setup
lrwxrwxrwx 1 root root 15 2005-11-25 13:52 S20inetd -> ../init.d/inetd
lrwxrwxrwx 1 root root 21 2006-07-17 22:05 S20laptop-mode -> ../init.d/laptop-mode
lrwxrwxrwx 1 root root 23 2006-07-17 22:10 S20nvidia-kernel -> ../init.d/nvidia-kernel
lrwxrwxrwx 1 root root 17 2005-11-25 13:53 S20postfix -> ../init.d/postfix
lrwxrwxrwx 1 root root 19 2005-11-25 19:07 S20powernowd -> ../init.d/powernowd
lrwxrwxrwx 1 root root 15 2005-11-25 13:52 S20rsync -> ../init.d/rsync
lrwxrwxrwx 1 root root 13 2008-07-09 23:38 S23ntp -> ../init.d/ntp
lrwxrwxrwx 1 root root 16 2008-07-10 00:05 S24dhcdbd -> ../init.d/dhcdbd
lrwxrwxrwx 1 root root 13 2008-07-09 23:58 S24hal -> ../init.d/hal
lrwxrwxrwx 1 root root 19 2008-07-10 00:04 S25bluetooth -> ../init.d/bluetooth
lrwxrwxrwx 1 root root 13 2005-11-25 19:10 S25gdm -> ../init.d/gdm // This is a proper link
lrwxrwxrwx 1 root root 15 2005-11-25 13:52 S25mdadm -> ../init.d/mdadm
lrwxrwxrwx 1 root root 20 2008-07-09 23:38 S25pulseaudio -> ../init.d/pulseaudio
lrwxrwxrwx 1 root root 24 2009-02-13 22:23 S28NetworkManager -> ../init.d/NetworkManager
lrwxrwxrwx 1 root root 31 2009-02-13 12:09 S30system-tools-backends -> ../init.d/system-tools-backends
lrwxrwxrwx 1 root root 17 2005-11-25 19:06 S89anacron -> ../init.d/anacron
lrwxrwxrwx 1 root root 13 2005-11-25 13:53 S89atd -> ../init.d/atd
lrwxrwxrwx 1 root root 14 2005-11-25 13:52 S89cron -> ../init.d/cron
lrwxrwxrwx 1 root root 17 2006-07-17 20:31 S98usplash -> ../init.d/usplash
lrwxrwxrwx 1 root root 22 2005-11-25 19:06 S99acpi-support -> ../init.d/acpi-support
lrwxrwxrwx 1 root root 19 2005-11-25 19:06 S99fetchmail -> ../init.d/fetchmail
lrwxrwxrwx 1 root root 18 2006-07-17 21:45 S99rc.local -> ../init.d/rc.local
lrwxrwxrwx 1 root root 19 2005-11-25 13:51 S99rmnologin -> ../init.d/rmnologin
lrwxrwxrwx 1 root root 24 2006-07-17 22:12 S99stop-readahead -> ../init.d/stop-readahead

Book Mark it-> del.icio.us | Reddit | Slashdot | Digg | Facebook | Technorati | Google | StumbleUpon | Window Live | Tailrank | Furl | Netscape | Yahoo | BlinkList

Tags: , , ,

No Comments

Leave a comment

XHTML: Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv Enabled