FS#22680 - [consolekit] new consolekit breaks most of nm-applet functions

Attached to Project: Arch Linux
Opened by Vladimir (Psycho_zs) - Monday, 31 January 2011, 12:14 GMT
Last edited by Ionut Biru (wonder) - Saturday, 30 April 2011, 15:26 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 9
Private No

Details

Description:
After upgrade to consolekit 0.4.3-1 the following features of nm-applet are blocked:
Editing system connections, creating system connections, switching network management on/off.

Also, activating user connections is impossible due to error "No user settings service available".

Downgrading to 0.4.1-4 fixes the problem.
This task depends upon

Closed by  Ionut Biru (wonder)
Saturday, 30 April 2011, 15:26 GMT
Reason for closing:  Not a bug
Additional comments about closing:  configuration problem
Comment by Ionut Biru (wonder) - Monday, 31 January 2011, 12:27 GMT
describe your setup. what login manager are you using, if you use startx what's the .xinitrc, what graphical session you are starting. if you completely relogin etc...
Comment by Vladimir (Psycho_zs) - Monday, 31 January 2011, 17:36 GMT
qingy, main exec line in .xinitrc:
exec ck-launch-session dbus-launch openbox-session

relogin, reboot are not helping while consolekit 0.4.3-1 is installed.
Comment by Ionut Biru (wonder) - Monday, 31 January 2011, 17:47 GMT
relogin is needed while having shadow 4.1.4.2-4

consolekit 0.4.3-1 without the shadow update is useless
Comment by Vladimir (Psycho_zs) - Monday, 31 January 2011, 17:51 GMT
judging by pacman log, shadow was upgraded at the same time as consolekit. So it is not the problem.
Comment by Ionut Biru (wonder) - Monday, 31 January 2011, 17:53 GMT
was /etc/pam.d/login installed as /etc/pam.d/login.pacnew ?
Comment by Vladimir (Psycho_zs) - Monday, 31 January 2011, 18:00 GMT
I do not have /etc/pam.d/login.pacnew in the filesystem. So, no.
Comment by Ionut Biru (wonder) - Monday, 31 January 2011, 18:08 GMT
do ck-list-sessions before startx and after startx(in a terminal from the openbox session)
Comment by Vladimir (Psycho_zs) - Monday, 31 January 2011, 18:10 GMT
I've already tried running ck-launch-session from terminal, and then running nm-applet from that terminal.
Comment by Ionut Biru (wonder) - Monday, 31 January 2011, 18:11 GMT
i fixed my comment. is ck-list-sessions
Comment by Vladimir (Psycho_zs) - Monday, 31 January 2011, 18:15 GMT
other permissions-sensitive things seem to work. At least I was able to change cpu frequency with trayfreq while using consolekit 0.4.3-1

I will check ck-list-sessions soon...
Comment by Vladimir (Psycho_zs) - Monday, 31 January 2011, 18:20 GMT
before starting openbox session ck-list-sessions reports nothing.

and after:

Session1:
unix-user = '1000'
realname = ''
seat = 'Seat2'
session-type = ''
active = FALSE
x11-display = ':0'
x11-display-device = '/dev/tty3'
display-device = ''
remote-host-name = ''
is-local = FALSE
on-since = '2011-01-31T18:18:32.746262Z'
login-session-id = ''
Comment by Ionut Biru (wonder) - Monday, 31 January 2011, 18:21 GMT
if ck-list-sessions before startx returns nothing then /etc/pam.d/login doesn't contain the right stuff".

paste it
Comment by Vladimir (Psycho_zs) - Monday, 31 January 2011, 18:24 GMT
But, if no consolekit session was initiated, then there must be no sessions to report?

#%PAM-1.0
auth required pam_securetty.so
auth requisite pam_nologin.so
auth required pam_unix.so nullok
auth required pam_tally.so onerr=succeed file=/var/log/faillog
# use this to lockout accounts for 10 minutes after 3 failed attempts
#auth required pam_tally.so deny=2 unlock_time=600 onerr=succeed file=/var/log/faillog
account required pam_access.so
account required pam_time.so
account required pam_unix.so
#password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3
#password required pam_unix.so md5 shadow use_authtok
session required pam_unix.so
session required pam_env.so
session required pam_motd.so
session required pam_limits.so
session optional pam_mail.so dir=/var/spool/mail standard
session optional pam_lastlog.so
session optional pam_loginuid.so
-session optional pam_ck_connector.so nox11
Comment by Vladimir (Psycho_zs) - Monday, 31 January 2011, 18:27 GMT
just like in the package
Comment by Ionut Biru (wonder) - Monday, 31 January 2011, 18:31 GMT
can you paste DAEMONS?
Comment by Vladimir (Psycho_zs) - Monday, 31 January 2011, 18:32 GMT
DAEMONS=( syslog-ng preload dbus @acpid @networkmanager @crond @atd @cpufreq @sensors @alsa @timidity++ @netfs @avahi-daemon sshd ntpd @samba )
Comment by Ionut Biru (wonder) - Monday, 31 January 2011, 18:34 GMT
just a test, disable preload and reboot.
Comment by Vladimir (Psycho_zs) - Monday, 31 January 2011, 18:48 GMT
no effect
Comment by Ionut Biru (wonder) - Monday, 31 January 2011, 19:13 GMT
is usr/sbin/console-kit-daemon running?
Comment by Vladimir (Psycho_zs) - Monday, 31 January 2011, 19:15 GMT
yes
Comment by Matt Neilson (machoo02) - Monday, 31 January 2011, 19:44 GMT
I observed the same behavior with console-kit and nm-applet, but the problem did not manifest itself until after the latest kernel update:

[2011-01-29 10:12] upgraded consolekit (0.4.1-4 -> 0.4.3-1) -> nm-applet still worked after this update
[2011-01-30 17:19] upgraded kernel26 (2.6.36.3-2 -> 2.6.37-5) -> nm-applet stopped working (problems described in bug report)
[2011-01-31 11:41] upgraded consolekit (0.4.3-1 -> 0.4.1-4) -> nm-applet returns to expected behavior

Setup: using Slim as a login manager, Xfce as desktop environment, .xinitrc contains:
syndaemon -t -k -i 1 -d &
exec dbus-launch ck-launch-session startxfce4
Comment by Gerardo Exequiel Pozzi (djgera) - Monday, 31 January 2011, 19:45 GMT
Weird: The attribute login-session-id = '' is empty on 32 bits but set with some value on 64 bits, this value is taken from /proc/$pid/sessionid (enabled via CONFIG_AUDIT=y)

One way to workaround this empty value is adding "session required pam_loginuid.so" to /etc/pam.d/login, in this way the attribute will be set with numbers (not provided by /proc/$pid/sessionid), so consolekit will marks session as local.
Comment by Ionut Biru (wonder) - Monday, 31 January 2011, 19:50 GMT
@Matt slim is buggy and that's why is not working for you. Using plain startx would work

@Gerardo we have "session optional pam_loginuid.so" in /etc/pam.d/login. What are you saying is that the "required" would change the behavior?
Comment by Gerardo Exequiel Pozzi (djgera) - Monday, 31 January 2011, 21:05 GMT
@Ionut: oops!, ignore me. Since I was using a custom pam.d/login without loginuid. Required is not needed, just with optional works ;)
Comment by clemenceau (gagzou) - Monday, 31 January 2011, 22:30 GMT
(x86_64)I observed the same behavior with console-kit and nm-applet:
setup:slim + xfce
.xinitrc : exec ck-launch-session startxfce4
DAEMONS=(syslog-ng netfs crond hal networkmanager cpufreq ufw alsa cups gpm)

ck-list-sessions:
Session2:
unix-user = '1000'
realname = '(null)'
seat = 'Seat1'
session-type = ''
active = TRUE
x11-display = ':0.0'
x11-display-device = '/dev/tty7'
display-device = ''
remote-host-name = ''
is-local = TRUE
on-since = '2011-01-31T22:09:35.805202Z'
login-session-id = '4294967295'

nm-applet from that terminal : ** (nm-applet:2266): WARNING **: <WARN> activate_connection_cb(): Connection
activation failed: Not authorized to control networking.

downgrade consolekit (0.4.3-1 -> 0.4.1-4) > work
Comment by Vladimir (Psycho_zs) - Wednesday, 02 February 2011, 08:45 GMT
upgraded to 0.4.3-2. Still have the bug.
Comment by Martin Schmidt (Blind) - Wednesday, 02 February 2011, 17:59 GMT
Not running a login manager, just pure old console login. Just upgraded consolekit (0.4.3-1 -> 0.4.3-2).
After this upgrade, ck-list-sessions shows

Session1:
unix-user = '1000'
realname = '(null)'
seat = 'Seat1'
session-type = ''
active = FALSE
x11-display = ''
x11-display-device = ''
display-device = '/dev/tty1'
remote-host-name = ''
is-local = TRUE
on-since = '2011-02-02T17:50:13.566715Z'
login-session-id = ''
idle-since-hint = '2011-02-02T17:50:48.002981Z'
Session2:
unix-user = '1000'
realname = '(null)'
seat = 'Seat2'
session-type = ''
active = FALSE
x11-display = ':0'
x11-display-device = '/dev/tty7'
display-device = '/dev/tty1'
remote-host-name = ''
is-local = FALSE
on-since = '2011-02-02T17:50:21.496353Z'
login-session-id = ''

The 'is-local = FALSE' in Session2 basically breaks the nm-applet functionality.

Comment by Ionut Biru (wonder) - Wednesday, 02 February 2011, 18:08 GMT
that means you are not running ck-launch-session in the right way
Comment by Martin Schmidt (Blind) - Wednesday, 02 February 2011, 18:34 GMT
How so?
I am not doing anything other than:
(.xinitrc):

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

# exec gnome-session
# exec startkde
exec ck-launch-session startxfce4
# ...or the Window Manager of your choice

I do not recall messing with any of the consolekit files.
Comment by Gerardo Exequiel Pozzi (djgera) - Wednesday, 02 February 2011, 19:46 GMT
weird, the thing is why there is no login-session-id in at least on tty1. Without this, session on tty7 is not inherit from tty1.
Comment by Martin Schmidt (Blind) - Wednesday, 02 February 2011, 21:15 GMT
Ok, thanks for the hint, djgera. I did some research, and the solution is probably simple: I am running my own kernel, and the kernel config did not include CONFIG_AUDIT*. I will try and report back with the result.
Comment by Martin Schmidt (Blind) - Wednesday, 02 February 2011, 21:24 GMT
Yup. That fixed it; alright, off to getting it to work with slim.
Comment by Ionut Biru (wonder) - Wednesday, 02 February 2011, 21:27 GMT
somebody from forums suggested to modify the login command from slim.conf

login_cmd exec ck-launch-session /bin/sh - ~/.xinitrc %session
Comment by Martin Schmidt (Blind) - Wednesday, 02 February 2011, 23:01 GMT
Ok, and the answer is:
The line in slim.conf

login_cmd exec ck-launch-session /bin/sh - ~/.xinitrc %session

*will* solve all your issues, if you *remove* in .xinitrc the ck-launch-session command, like so:

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

# exec gnome-session
# exec startkde
exec startxfce4
# ...or the Window Manager of your choice

If you do not do that, there will still be limitations due to consolekit. But in general,
it may be worth it to investigate whether it would make sense to include the ck-launch-session
permanently in the slim.conf file.

Thanks for the input everybody.
Comment by clemenceau (gagzou) - Wednesday, 02 February 2011, 23:05 GMT
upgraded to 0.4.3-2 > works
Comment by Gaetan Bisson (vesath) - Monday, 07 February 2011, 22:46 GMT
I am against adding this line to slim.conf since it assumes that everybody who uses slim has consolekit installed.
However, I have edited the wiki to reflect this; see: https://wiki.archlinux.org/index.php/SLiM#PolicyKit
Comment by Martin Schmidt (Blind) - Tuesday, 08 February 2011, 16:17 GMT
Good point.
Thanks for updating the wiki. Cheers.
Comment by Vladimir (Psycho_zs) - Saturday, 12 February 2011, 08:28 GMT
How can this be applied to qingy? There is no place to put ck-launch-session other than in .xinitrc

Loading...