View previous topic :: View next topic |
Author |
Message |
friesia Apprentice
Joined: 23 Mar 2007 Posts: 202
|
Posted: Sun Feb 24, 2013 7:36 pm Post subject: KDE & systemd session management |
|
|
I heard session management via systemd-logind is supported in Fedora's KDE.
In Gentoo I currently have to keep ConsoleKit only to be able to enter sleep state from Kickoff menu (and maybe to start a new session, I don't know)
If sys-auth/polkit is compiled with USE=systemd (removing consolekit support), I can no longer initiate sleep from KDE.
Is systemd officially supported by KDE 4.10 or not yet? |
|
Back to top |
|
|
ulenrich Veteran
Joined: 10 Oct 2010 Posts: 1480
|
Posted: Mon Feb 25, 2013 1:09 am Post subject: Re: KDE & systemd session management |
|
|
friesia wrote: | Is systemd officially supported by KDE 4.10 or not yet? | Yes, I do support Kde-4.10 with Systemd for my desktop machine. (Why don't you ask kde.org for such official statement? And why do kde distributions use systemd only now?)
Quote: | I heard session management via systemd-logind is supported in Fedora's KDE.
In Gentoo I currently have to keep ConsoleKit only to be able to enter sleep state from Kickoff menu (and maybe to start a new session, I don't know)
If sys-auth/polkit is compiled with USE=systemd (removing consolekit support), I can no longer initiate sleep from KDE. | It is no problem. Set these USE flags in /etc/portage/profile/use.mask
Code: | -udisks2
consolekit
-systemd | This is, because Gentoo has no Kde profile without consolekit. And You have to --depclean all of consolekit from your installation. Update all to Gentoo~current unstable! And of cause rebuild kdm. And possibly do some more I have forgotten about ... ask here again if you encounter any problem. There seem no bugs of systemd - or I am the only lonely user.
Keep in mind: The most Gentoo forum users are Poettering haters, many telling nothing but FUD about Systemd. But nobody of the Gentoo user base bugs Gentoo developers to a more easy Systemd from portage. It is doable though. You can even boot with openrc, if Systemd fails - but it did not for me fail. |
|
Back to top |
|
|
The Doctor Moderator
Joined: 27 Jul 2010 Posts: 2678
|
Posted: Mon Feb 25, 2013 2:07 am Post subject: |
|
|
Quote: | And why do kde distributions use systemd only now | This is not true. Kubuntu still uses upstart. I believe OpenSuse still something else too. Quote: | here seem no bugs of systemd | This is quite untrue. Systemd literally destroyed my laptop's install. Anyone who claims any piece of software does not have bugs is flat out lying.
As for the proposed changes to use.mask, you should never do anything like that unless you understand why. Quite specifically, KDE is unsupported by upstream unless it is built with consolkit support, hence the use.mask entry. The systemd support still has issues, hence the systemd use.mask in KDE.
My guess is that Fedora patched KDE to comply with their systemd implementation since it is their brainchild. What Ulenrich proposed may work, but it is unsupported by either Gentoo or upstream. (That is what the use.mask entries mean)
@Ulenrich Would it kill you to stop dissing everyone who disagrees with you and your obsession with systemd?
EDIT: Some googling shows things like this http://comments.gmane.org/gmane.linux.redhat.fedora.kde/12154 Which indicate that Fedora is indeed patching KDE for systemd support. _________________ First things first, but not necessarily in that order.
Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box. |
|
Back to top |
|
|
friesia Apprentice
Joined: 23 Mar 2007 Posts: 202
|
Posted: Mon Feb 25, 2013 9:18 am Post subject: |
|
|
I decided to stay with desktop/kde profile with no USE flag mask changes for now.
As for systemd, I still have some other problems with it like https://bugs.gentoo.org/show_bug.cgi?id=451452 |
|
Back to top |
|
|
ulenrich Veteran
Joined: 10 Oct 2010 Posts: 1480
|
Posted: Mon Feb 25, 2013 1:01 pm Post subject: |
|
|
I don't want to diss you, but Systemd is developing in a fast paste. Your link to fedora shows a problem with systemd-190 though. For example if user mv points out systemd is not able to handle "noauto" in fstab, this was the case in last summer. As of its fast development if you are not using systemd your opinion of it might be wrong tomorrow! Ok, calling these outdated opinions FUD is a bit harsh in expression. But when outdated opinions mangling up with anger about udev issues and /usr-move issues the result is pure FUD.
The Doctor wrote: | Quote: | And why do kde distributions use systemd only now | This is not true. Kubuntu still uses upstart. I believe OpenSuse still something else too. |
OpenSUSE-devel just heatedly discusses if _only_ systemd is to be announced a feature.
Quote: | Quote: | here seem no bugs of systemd | This is quite untrue. Systemd literally destroyed my laptop's install. Anyone who claims any piece of software does not have bugs is flat out lying. |
On the contrary: Having nearly no bugs is not sane, because it is a symptom of nobody using the software. This I have expressed! Me cited badly I feel dissed |
|
Back to top |
|
|
dilfridge Developer
Joined: 18 Sep 2010 Posts: 120 Location: Regensburg, Germany
|
Posted: Fri Mar 01, 2013 7:14 pm Post subject: |
|
|
If you want to disable the consolekit useflag, the easiest way is to pick the generic desktop profile; it defaults to on there as well but is not forced.
That said, noone from the Gentoo kde team runs systemd and is willing to actually support that combination. Basically, you are on your own. |
|
Back to top |
|
|
friesia Apprentice
Joined: 23 Mar 2007 Posts: 202
|
Posted: Sun Mar 03, 2013 6:47 am Post subject: |
|
|
I the end, I decided to override the defaults.
ulenrich, did you modify /etc/pam.d/ manually? I had to change this while staying on desktop/kde profile:
/etc/pam.d/system-auth:
Code: | session optional pam_systemd.so |
/etc/portage/profile/package.use.mask (these are masked by devs until sys-apps/systemd hits stable branch):
Code: | sys-auth/polkit -systemd
sys-power/upower -systemd
sys-fs/udisks -systemd |
/etc/portage/profile/use.force:
|
|
Back to top |
|
|
friesia Apprentice
Joined: 23 Mar 2007 Posts: 202
|
Posted: Sun Mar 03, 2013 7:05 am Post subject: |
|
|
Update: I couldn't enter sleep mode with this configuration.
So I had to keep changes to minimum (and it does not remove consolekit):
/etc/portage/profile/package.use.mask:
Code: | sys-power/upower -systemd |
ulenrich, in terms of USE flags my previous configuration didn't differ from yours. |
|
Back to top |
|
|
ulenrich Veteran
Joined: 10 Oct 2010 Posts: 1480
|
Posted: Sun Mar 03, 2013 5:12 pm Post subject: |
|
|
friesia wrote: | ulenrich, in terms of USE flags my previous configuration didn't differ from yours. | Yes, but I doubt you can get a stable Systemd-Kde (without consolekit) by changing your USE flags 18 minutes later
... though you were correctly changing your /etc/pam.d
you cannot reach your goal in this fast-paste manner.
(think of recompiling and dep-cleaning) |
|
Back to top |
|
|
popsUlfr Tux's lil' helper
Joined: 27 Feb 2011 Posts: 80
|
Posted: Sun Mar 03, 2013 5:33 pm Post subject: |
|
|
After completely purging consolekit from my system (thanks for the use.mask hint ulenrich )I had to add
Code: |
session optional pam_loginuid.so
session optional pam_systemd.so kill-session-processes=1
|
to my '/etc/pam.d/system-auth' in order for systemd-logind to properly give seats to users.
What exactly happens when you try to go into sleep mode friesia? |
|
Back to top |
|
|
friesia Apprentice
Joined: 23 Mar 2007 Posts: 202
|
Posted: Sun Mar 03, 2013 8:48 pm Post subject: |
|
|
popsUlfr, I tried again and it can properly sleep now.
After the first attempt I did a full world rebuild (because GCC 4.7 was unmasked yesterday). Maybe that helped.
As for your system-auth, things break if I add pam_loginuid.so line there. That way udisks asks for my root password when I try to mount a USB stick. Without that line there's no problems.
Session is properly displayed in loginctl as well (with or without pam_loginuid.so, doesn't matter).
upd: It stopped entering sleep again and I didn't change anything. It only locks the screen and there are no errors in system journal or .xsession-errors. |
|
Back to top |
|
|
ulenrich Veteran
Joined: 10 Oct 2010 Posts: 1480
|
Posted: Sun Mar 03, 2013 10:43 pm Post subject: |
|
|
Hint: There is a little -minus- trick. /etc/pam.d/system-login:
Code: | auth required pam_shells.so
auth required pam_nologin.so
auth include system-auth
account required pam_access.so
account required pam_nologin.so
account include system-auth
password include system-auth
session optional pam_loginuid.so
session required pam_env.so
session include system-auth
-session optional pam_systemd.so
| The last line -minus- looks like this line to negate. But this isn't!
In fact it is about to just ignore in case of failure!
This might be helpfull if you are reusing openrc one time later on ...
PS: I have used Kde with systemd since Kde-4.9.4. But really functional (mounting usb) it is since release of Kde-4.10.0 |
|
Back to top |
|
|
popsUlfr Tux's lil' helper
Joined: 27 Feb 2011 Posts: 80
|
Posted: Mon Mar 04, 2013 7:39 am Post subject: |
|
|
ulenrich wrote: | The last line -minus- looks like this line to negate. But this isn't!
In fact it is about to just ignore in case of failure!
This might be helpfull if you are reusing openrc one time later on ... |
It's great that you're shedding some light on the mystical creature that is pam.
Ah, there's a man page for 'pam.d':
Quote: |
If the type value from the list above is prepended with a - character the PAM library will not log to the system log if it is not possible to load the module because it is missing in the system. This can be useful especially for modules which are not always installed on the system and are not required for correct authentication and authorization of the login session.
|
ulenrich wrote: | PS: I have used Kde with systemd since Kde-4.9.4. But really functional (mounting usb) it is since release of Kde-4.10.0 |
So you couldn't mount usb devices before 4.10? I have been using kde with systemd on Gentoo since 4.9.5 with no issues whatsoever, no problem mounting devices. |
|
Back to top |
|
|
friesia Apprentice
Joined: 23 Mar 2007 Posts: 202
|
Posted: Mon Mar 04, 2013 9:07 am Post subject: |
|
|
So '-' sign just ignores an error while loading a module, not all relevant errors. I doubt it'll help debugging, but I'll give it a try later.
I'll also try building upower with USE=debug. |
|
Back to top |
|
|
ulenrich Veteran
Joined: 10 Oct 2010 Posts: 1480
|
Posted: Mon Mar 04, 2013 12:35 pm Post subject: |
|
|
popsUlfr wrote: | ulenrich wrote: | PS: I have used Kde with systemd since Kde-4.9.4. But really functional (mounting usb) it is since release of Kde-4.10.0 |
So you couldn't mount usb devices before 4.10? I have been using kde with systemd on Gentoo since 4.9.5 with no issues whatsoever, no problem mounting devices. | Yes, but I have some LUKS encrypted devices on usb-drives, which couldn't be handled by Kde gui tools before 4.10.
In case you have Kde-4.9.x - wait a day:
There should be Kde-4.10.1 soon! |
|
Back to top |
|
|
friesia Apprentice
Joined: 23 Mar 2007 Posts: 202
|
Posted: Mon Mar 04, 2013 6:41 pm Post subject: |
|
|
Another thing I noticed: with my 'no-consolekit' configuration when I try to access encrypted LUKS volume KDE asks for passphrase and then asks for root password *twice*. With 'consolekit present' configuration it only asks for root password once.
As for entering sleep mode, it's able to enter once I login (and can enter several times). But after some time passes (I use my apps all this time), it's no longer able. There's nothing relevant in logs, so I don't know what's going on. |
|
Back to top |
|
|
ulenrich Veteran
Joined: 10 Oct 2010 Posts: 1480
|
Posted: Mon Mar 04, 2013 11:28 pm Post subject: |
|
|
The password issue:
Did you look at the settings of your kwallet?
Suspend consecutive multiple times not possible?
Sounds like an old problem ... don't know more about it. |
|
Back to top |
|
|
friesia Apprentice
Joined: 23 Mar 2007 Posts: 202
|
Posted: Fri Mar 22, 2013 6:01 am Post subject: |
|
|
There was a upower update recently, so I decided to give it a go again.
As a reminder:
1) package.use.mask:
Code: | sys-auth/polkit -systemd
sys-power/upower -systemd
sys-fs/udisks -systemd |
2) use.force:
3) system-auth:
Code: | session optional pam_loginuid.so
session optional pam_systemd.so |
4) built upower with USE="-deprecated"
5) removed consolekit with 'emerge -ac'
Sleep mode works, mounting works, session management, too. |
|
Back to top |
|
|
ulenrich Veteran
Joined: 10 Oct 2010 Posts: 1480
|
Posted: Fri Mar 22, 2013 10:20 am Post subject: |
|
|
fine. This I meant you need some time to systematically edit all of it correctly!
Mainly because there is no systemd profile yet ...
Because I am lazy with thinking I hate the negation of the negation. I just would express positive the entries of package.use.mask in
/etc/portage/package.use: x-z/ypackage systemd
Or doesn't this work for you? |
|
Back to top |
|
|
|