Bug 5051 - SLiM display manager produces failed boot and desktop session problems, particularly with LXDE and udisks2
Summary: SLiM display manager produces failed boot and desktop session problems, parti...
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal major
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-22 02:41 CET by Richard Walker
Modified: 2015-02-28 19:47 CET (History)
6 users (show)

See Also:
Source RPM: slim-1.3.3-1.mga2.src.rpm
CVE:
Status comment:


Attachments
log history of SLiM sessions (3.07 KB, text/plain)
2012-04-02 21:53 CEST, Richard Walker
Details

Description Richard Walker 2012-03-22 02:41:18 CET
Description of problem:Cannot use pcmanfm external drive icons to mount drives without root password as consolekit reports user is not active and not local. The startup process does not complete and leaves "dead" screen full of text on vt1 while vt2 is used for the login and desktop. On "logout" HAL prevents user from completing Shutdown or Reboot - user can only log out of session. On switching back to vt1 there is a verbose formatted spurious message about X server failure and advice to run the X server setup from the console. This message is persistent and can return several times after trying CTL-ALT-DEL to re-boot.


Version-Release number of selected component (if applicable):


How reproducible:
Reproducible


Steps to Reproduce:
1.Starting from LXDE+LXDM with working external disc mounting and working X server
2.Install and selext SLiM in MCC, do not choose to restart DM
3.Log out and re-boot to SLiM
4.Log on to LXDE desktop to run ck-list-sessions
eg.
[rich@Tureen ~]$ ck-list-sessions 
Session9:
	unix-user = '501'
	realname = 'Rich'
	seat = 'Seat10'
	session-type = ''
	active = FALSE
	x11-display = ':0.0'
	x11-display-device = '/dev/tty2'
	display-device = ''
	remote-host-name = ''
	is-local = FALSE
	on-since = '2012-03-22T01:07:11.139010Z'
	login-session-id = '4294967295'
5.Confirm that external disc mounting now requires root password.
6.Log out to DM screen and attempt to restart to see X server failure messages.
Comment 1 Manuel Hiebel 2012-03-22 15:23:51 CET
we use lxdm as default so decrease the severity

CC: (none) => fundawang, n54
Severity: critical => major

Comment 2 Richard Walker 2012-04-01 23:31:51 CEST
From the changelog;
        * Fri Mar 30 2012 kamil <kamil> 1.3.3-2.mga2
        + Revision: 227556
        - use consolekit's ck-launch-session for login_cmd (to fix possible problems with PolicyKit)

I installed this update on Friday, then I was isolated by the server outage. Sorry to report that SLiM is still not launching cleanly and it is still opening on vt2 leaving vt1 with the unfinished remnants of the boot. The desktop session is still identified by consolekit as having no active user and no local user, so nothing else depending on these characteristics being correct will work - including shutdown.

Richard
Comment 3 Kamil Rytarowski 2012-04-01 23:45:49 CEST
Thank you, I will have a look.
Comment 4 Richard Walker 2012-04-02 21:53:31 CEST
Created attachment 1909 [details]
log history of SLiM sessions
Comment 5 Richard Walker 2012-04-02 21:55:00 CEST
I found a slim.log from last Friday. It reports things like /usr/bin/xauth:  file /home/rich/.Xauthority does not exist

Unfortunately there are no timestamps in the log so all I can say for certain is that the last 2 or 3 SLiM sessions are from Friday.

bz2'ed and attached
Comment 6 Richard Walker 2012-04-02 22:04:37 CEST
<<Unfortunately there are no timestamps in the log>> Of course there is the timestamp given for the xorg.0 log, which I have just spotted, but you knew that anyway :~)
Comment 7 Kamil Rytarowski 2012-04-03 17:40:32 CEST
I cannot reproduce it. Mounting is working for me. The log is not legible.

Session1:
        unix-user = '500'
        realname = 'Kamil Rytarowski'
        seat = 'Seat1'
        session-type = ''
        active = FALSE
        x11-display = ''
        x11-display-device = ''
        display-device = '/dev/tty3'
        remote-host-name = ''
        is-local = TRUE
        on-since = '2012-04-03T15:24:52.932723Z'
        login-session-id = '1'
        idle-since-hint = '2012-04-03T15:31:25.246171Z'
Session2:
        unix-user = '500'
        realname = 'Kamil Rytarowski'
        seat = 'Seat1'
        session-type = ''
        active = TRUE
        x11-display = ':0.0'
        x11-display-device = '/dev/tty1'
        display-device = '/dev/tty3'
        remote-host-name = ''
        is-local = TRUE
        on-since = '2012-04-03T15:25:29.421515Z'
        login-session-id = '1
Comment 8 Richard Walker 2012-04-03 20:34:24 CEST
Sorry about the log. It was big so I attached a bz2 compressed file. I can uncompress it and re-attach if that's what you need. 

I note you get "Seat1" as I do when using lxdm. The "Seat10" I got with SLiM was not a one-off. It is typical.

Naturally your mounting/unmounting works with udisks as you are correctly identified as active and local. Presumably you also get your X session on vt1 rather than vt2 which I always get with SLiM. So something about your Beta2 dodges the bug which makes mine fail. It is starting to look less like a SLiM fault, or perhaps it is a SLiM fault which is only exposed in my Beta2 configuration.

Is there a way I can usefully get information from my system about what aspect of the initialisation process is failing? Is there a list of the services needed by SLiM for a successful start? It seems to be something to do with authentication. 

It is perhaps relevant that I have a long history (back to Alpha2 in January) of hassles with mount and unmount authorisation for various internal and external devices. I have resolved almost all of them by removing HAL, udisks-1 and the HAL policykit stuff. Do SLiM or consolekit rely on anything like that?

Richard
Kamil Rytarowski 2012-04-03 20:59:53 CEST

CC: (none) => mageia

Comment 9 Kamil Rytarowski 2012-04-03 21:00:17 CEST
Colin, any ideas?
Comment 10 Richard Walker 2012-04-03 21:29:14 CEST
No change, but this is from a fully up-to-date Cauldron;

[rich@Tureen ~]$ ck-list-sessions 
Session1:
	unix-user = '501'
	realname = 'Rich'
	seat = 'Seat2'
	session-type = ''
	active = FALSE
	x11-display = ':0.0'
	x11-display-device = '/dev/tty2'
	display-device = ''
	remote-host-name = ''
	is-local = FALSE
	on-since = '2012-04-03T19:09:43.148031Z'
	login-session-id = '4294967295'
#####################################################################################
This is the relevant slim.log entry for this session;
slim: waiting for X server to begin accepting connections
X.Org X Server 1.11.4
Release Date: 2012-01-27
X Protocol Version 11, Revision 0
Build Operating System: Linux_2.6.38.8-server-10.mga Mageia
Current Operating System: Linux Tureen.Studio 3.3.1-desktop-1.mga2 #1 SMP Mon Apr 2 23:57:52 UTC 2012 x86_64
Kernel command line: BOOT_IMAGE=linux root=UUID=2e61eac0-56cf-482a-a9ba-c8a7a8cad4f5 resume=UUID=737ee8be-ae2f-4eee-bf05-a4c6ccc9f5f8 vga=788
Build Date: 02 March 2012  06:40:51PM
 
Current version of pixman: 0.24.4
        Before reporting problems, check http://bugs.mageia.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Tue Apr  3 20:09:25 2012
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
.resize called 1024 768

/usr/bin/xauth:  file /home/rich/.Xauthority does not exist

##### except it does exist and the timestamp on it is 03 Apr 20:09

####################################################################################
And this is from /var/log/messages from the point where I logged on using SLiM:
Apr  3 20:09:42 Tureen systemd-logind[772]: New session c1 of user rich.
Apr  3 20:09:42 Tureen systemd-logind[772]: Linked /tmp/.X11-unix/X0 to /run/user/rich/X11-display.
Apr  3 20:09:43 Tureen dbus-daemon[841]: dbus[841]: [system] Activating via systemd: service name='org.freedesktop.ConsoleKit' unit='console-kit-daemon.service'
Apr  3 20:09:43 Tureen dbus[841]: [system] Activating via systemd: service name='org.freedesktop.ConsoleKit' unit='console-kit-daemon.service'
Apr  3 20:09:43 Tureen console-kit-daemon[1397]: missing action
Apr  3 20:09:43 Tureen dbus-daemon[841]: dbus[841]: [system] Successfully activated service 'org.freedesktop.ConsoleKit'
Apr  3 20:09:43 Tureen dbus[841]: [system] Successfully activated service 'org.freedesktop.ConsoleKit'
Apr  3 20:09:43 Tureen console-kit-daemon[1397]: missing action
Apr  3 20:09:46 Tureen net_applet[1574]: ### Program is starting ###
Apr  3 20:09:47 Tureen mgaapplet[1582]: ### Program is starting ###
Apr  3 20:09:48 Tureen kernel: [   46.420173] [drm] nouveau 0000:02:00.0: no native mode, forcing panel scaling
Apr  3 20:09:51 Tureen dbus-daemon[841]: dbus[841]: [system] Activating via systemd: service name='org.freedesktop.UDisks2' unit='udisks2.service'
Apr  3 20:09:51 Tureen dbus[841]: [system] Activating via systemd: service name='org.freedesktop.UDisks2' unit='udisks2.service'
Apr  3 20:09:52 Tureen udisksd[1605]: udisks daemon version 1.93.0 starting
Apr  3 20:09:52 Tureen dbus-daemon[841]: dbus[841]: [system] Successfully activated service 'org.freedesktop.UDisks2'
Apr  3 20:09:52 Tureen dbus[841]: [system] Successfully activated service 'org.freedesktop.UDisks2'
Apr  3 20:09:52 Tureen udisksd[1605]: Acquired the name org.freedesktop.UDisks2 on the system message bus
Apr  3 20:09:55 Tureen mgaapplet[1582]: running: ionice -p 1582 -n7

##### console-kit-daemon[1397]: missing action ?????
Comment 11 Richard Walker 2012-04-03 21:57:02 CEST
Finally the consolekit "history" log with those ridiculous huge numbers replaced by local time timestamps.

2012-Apr-03 19:05:07.013 type=SEAT_ADDED : seat-id='Seat1' seat-kind=0
2012-Apr-03 19:05:07.028 type=SEAT_SESSION_ADDED : seat-id='Seat1' session-id='Session1' session-type='' session-x11-display=':0' session-x11-display-device='/dev/tty1' session-display-device='' session-remote-host-name='' session-is-local=TRUE session-unix-user=501 session-creation-time='2012-04-03T19:05:07.025730Z'
2012-Apr-03 19:05:07.031 type=SEAT_ACTIVE_SESSION_CHANGED : seat-id='Seat1' session-id='Session1'
2012-Apr-03 19:08:24.929 type=SYSTEM_RESTART : 
2012-Apr-03 19:08:30.522 type=SYSTEM_RESTART : 
2012-Apr-03 19:09:22.042 type=SYSTEM_START : kernel-release='3.3.1-desktop-1.mga2' boot-arguments='BOOT_IMAGE=linux root=UUID=2e61eac0-56cf-482a-a9ba-c8a7a8cad4f5 resume=UUID=737ee8be-ae2f-4eee-bf05-a4c6ccc9f5f8 vga=788'
2012-Apr-03 19:09:43.119 type=SEAT_ADDED : seat-id='Seat1' seat-kind=0
2012-Apr-03 19:09:43.152 type=SEAT_ADDED : seat-id='Seat2' seat-kind=1
2012-Apr-03 19:09:43.176 type=SEAT_SESSION_ADDED : seat-id='Seat2' session-id='Session1' session-type='' session-x11-display=':0.0' session-x11-display-device='/dev/tty2' session-display-device='' session-remote-host-name='' session-is-local=FALSE session-unix-user=501 session-creation-time='2012-04-03T19:09:43.148031Z'

##### Note the second seat added at 19:09:43.152. That doesn't happen when using lxdm.
Comment 12 Richard Walker 2012-04-03 21:58:23 CEST
Did I say local time? Sorry, I meant zulu time. I am on BST (UTC+1)
Comment 13 Colin Guthrie 2012-04-04 00:20:49 CEST
Yeah, this is pretty messed up. logind seems to get things right, but consolekit is broke (ck-list-sessions does indeed backup what your log output shows).

I tried editing /etc/pam.d/slim and added the session pam_ck_connector.so in there and it kinda helped. I'd be sorely tempted to remove the ck-launch-session from the session script for lxde and just rely on pam_ck_connector instead. I think there was a mail about this related to gnome+gdm too, but ck still seems to work properly here... not sure what magic makes it so as there is no specific pam config here.. actually looking further gdm still has console-kit support compiled in. I thought I'd read this was removed... hey ho, it's still there for now it seems.

If this wasn't this late in the cycle I would certainly suggest something radical (i.e. nuke built in console-kit support from all DM's, nuke all ck-xinit*/ck-launch* usage, and ensure pam_ck_connector.so was added to all relevant pam configs.

In this case, what I would suggest is a combo:

Kill off ck-launch-session usage in LXDE xsession scripts and configure the slim pam.d file to use ck_connector. I *think* this will make slim work generally, and gdm, kdm etc. will continue to work with their built in ck support.

I'm not sure I'll personally have time to work on this sadly, but here is the slim pam.d file I used:

#%PAM-1.0
auth       include	system-auth
auth       required	pam_nologin.so
account    include	system-auth
password   include	system-auth
session    required    pam_loginuid.so
session    include     system-auth
-session    optional     pam_ck_connector.so
session    optional    pam_gnome_keyring.so auto_start
session    optional    pam_console.so
session    required    pam_namespace.so


It ended up creating two ck sessions, one from the connection (which was active and seemed to work fine) and one from ck-launch-sessions which was busted.


Hope this helps.
Comment 14 Richard Walker 2012-04-04 01:33:22 CEST
I have evaluated the effects of the changes to /etc/pam.d/slim. The first thing I noticed was how similar it is to the lxdm pam.d file, but subtly different. That probably explains why it works :-)

I now have a working lxde session started from slim, albeit with vt1 still blocked making shutdown a bit of an adventure. At least udisks-2 is getting the message that I really am here and active !
Comment 15 Marja Van Waes 2012-05-26 13:05:41 CEST
Hi,

This bug was filed against cauldron, but we do not have cauldron at the moment.

Please report whether this bug is still valid for Mageia 2.

Thanks :)

Cheers,
marja

Keywords: (none) => NEEDINFO

Comment 16 Richard Walker 2012-05-26 17:36:54 CEST
My last comment still represents the current situation on Mageia 2.
Sander Lepik 2012-05-26 18:51:42 CEST

Keywords: NEEDINFO => (none)
CC: (none) => sander.lepik

Comment 17 Kateto 2012-07-23 21:45:10 CEST
Hi, I can confirm this is an issue on Mageia 2.
Using LXDM and LXDE together, LXDE doesn't offer me the option to restart or shutdown the machine, and I'm asked by "org.freedesktop.udisks2.filesystem-mount" for the root password every time I try to mount an USB or DVD-RAM drive on PCManFM.
Using GDM instead of LXDM solves both problems.
By the way, this seems to be the same bug as https://bugs.mageia.org/show_bug.cgi?id=3936

CC: (none) => ruben33en-mandriva

Comment 18 Nic Baxter 2015-02-28 02:15:51 CET
Is Slim supported in Mageia any more? Close?

CC: (none) => nic

Comment 19 Manuel Hiebel 2015-02-28 19:47:28 CET
was indeed removed

Status: NEW => RESOLVED
Resolution: (none) => OLD


Note You need to log in before you can comment on or make changes to this bug.