Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
KDE & systemd session management
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
friesia
Apprentice
Apprentice


Joined: 23 Mar 2007
Posts: 202

PostPosted: Sun Feb 24, 2013 7:36 pm    Post subject: KDE & systemd session management Reply with 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.

Is systemd officially supported by KDE 4.10 or not yet?
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1480

PostPosted: Mon Feb 25, 2013 1:09 am    Post subject: Re: KDE & systemd session management Reply with quote

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
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2678

PostPosted: Mon Feb 25, 2013 2:07 am    Post subject: Reply with quote

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
View user's profile Send private message
friesia
Apprentice
Apprentice


Joined: 23 Mar 2007
Posts: 202

PostPosted: Mon Feb 25, 2013 9:18 am    Post subject: Reply with quote

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
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1480

PostPosted: Mon Feb 25, 2013 1:01 pm    Post subject: Reply with quote

The Doctor wrote:
@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.

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
View user's profile Send private message
dilfridge
Developer
Developer


Joined: 18 Sep 2010
Posts: 120
Location: Regensburg, Germany

PostPosted: Fri Mar 01, 2013 7:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
friesia
Apprentice
Apprentice


Joined: 23 Mar 2007
Posts: 202

PostPosted: Sun Mar 03, 2013 6:47 am    Post subject: Reply with quote

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:
Code:
-consolekit
Back to top
View user's profile Send private message
friesia
Apprentice
Apprentice


Joined: 23 Mar 2007
Posts: 202

PostPosted: Sun Mar 03, 2013 7:05 am    Post subject: Reply with quote

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
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1480

PostPosted: Sun Mar 03, 2013 5:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
popsUlfr
Tux's lil' helper
Tux's lil' helper


Joined: 27 Feb 2011
Posts: 80

PostPosted: Sun Mar 03, 2013 5:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
friesia
Apprentice
Apprentice


Joined: 23 Mar 2007
Posts: 202

PostPosted: Sun Mar 03, 2013 8:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1480

PostPosted: Sun Mar 03, 2013 10:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
popsUlfr
Tux's lil' helper
Tux's lil' helper


Joined: 27 Feb 2011
Posts: 80

PostPosted: Mon Mar 04, 2013 7:39 am    Post subject: Reply with quote

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
View user's profile Send private message
friesia
Apprentice
Apprentice


Joined: 23 Mar 2007
Posts: 202

PostPosted: Mon Mar 04, 2013 9:07 am    Post subject: Reply with quote

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
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1480

PostPosted: Mon Mar 04, 2013 12:35 pm    Post subject: Reply with quote

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
View user's profile Send private message
friesia
Apprentice
Apprentice


Joined: 23 Mar 2007
Posts: 202

PostPosted: Mon Mar 04, 2013 6:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1480

PostPosted: Mon Mar 04, 2013 11:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
friesia
Apprentice
Apprentice


Joined: 23 Mar 2007
Posts: 202

PostPosted: Fri Mar 22, 2013 6:01 am    Post subject: Reply with quote

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:
Code:
-consolekit


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
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1480

PostPosted: Fri Mar 22, 2013 10:20 am    Post subject: Reply with quote

:)
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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum