Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
can't unlock KDE session, loginctl req. but this is openrc
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
as.gentoo
Guru
Guru


Joined: 07 Aug 2004
Posts: 319

PostPosted: Wed Jun 15, 2016 4:10 pm    Post subject: can't unlock KDE session, loginctl req. but this is openrc Reply with quote

Hello, i just wanted to unlock my KDE session, but I get a black screen with white letters telling me: "The screen locker is currently disturbed and the session can not be unlocked. To unlock it please switch to the console and execute 'loginctl unlock-sessions' you can then change back using ALT+CTRL+F7 to your running session." (translated from german)
This is an openrc-system, hence there is no loginctl.
I think that this happened during a system (@world) update.

What can I do do have my session unlocked?
Thanks in advance.

PS: I didn't see anything suspicious in /var/log/everything/current neither dmesg.
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 7138
Location: Austria

PostPosted: Wed Jun 15, 2016 4:11 pm    Post subject: Reply with quote

Have you already performed a re-login after upgrading world? If it contained Qt/Frameworks updates, this can break your running session.
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
as.gentoo
Guru
Guru


Joined: 07 Aug 2004
Posts: 319

PostPosted: Wed Jun 15, 2016 4:24 pm    Post subject: Reply with quote

What kind of re-login? Into X or the system itself? I can not re-login to KDE as long I have that black screen, so I can not log out to login then.

Oh, there is SDDM accessible on CTRL+ALT+F8. Whatsoever logging in there results in a state that just looks like when the system booted (no apps started, KDE settings lost - both screens show the same now - all changes in documents lost, not yet sent emails lost...).

Is my session void now? If not, what can I do?
Back to top
View user's profile Send private message
as.gentoo
Guru
Guru


Joined: 07 Aug 2004
Posts: 319

PostPosted: Wed Jun 15, 2016 4:32 pm    Post subject: Reply with quote

Yes, tons of kde-framework packages was emerged.

If that is known to kill sessions maybe, you could temporarily deactivate screen locking. Please make "[x] turn off screen locking in case of emerge of potentially invalidating session emerge/updates" a switch that the user/admin can turn on and off.

Just out of curiousity, would loginctl have had "fixed" the issue?
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 7138
Location: Austria

PostPosted: Wed Jun 15, 2016 4:33 pm    Post subject: Reply with quote

Only for systemd users obviously.

as.gentoo wrote:
Please make "[x] turn off screen locking in case of emerge of potentially invalidating session emerge/updates" a switch that the user/admin can turn on and off.

Patches welcome ;)
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
as.gentoo
Guru
Guru


Joined: 07 Aug 2004
Posts: 319

PostPosted: Wed Jun 15, 2016 4:35 pm    Post subject: Reply with quote

I know, but my session wouldn't be lost then? What does openrc provide then?


Edit:
Is there any other (kind of) package that could lead to the same problem? I could put that in my update script, that would demand a decision if to continue emerge or not.


Last edited by as.gentoo on Wed Jun 15, 2016 4:38 pm; edited 1 time in total
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 7138
Location: Austria

PostPosted: Wed Jun 15, 2016 4:38 pm    Post subject: Reply with quote

It would certainly not be openrc's job, but needs an equivalent function within consolekit2...
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
as.gentoo
Guru
Guru


Joined: 07 Aug 2004
Posts: 319

PostPosted: Wed Jun 15, 2016 4:53 pm    Post subject: Reply with quote

I see. Thanks so far!

I'm thinking of filing a feature request to the consolekit maintainers. Lets see how close they are tied to systemd.
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 7138
Location: Austria

PostPosted: Wed Jun 15, 2016 4:57 pm    Post subject: Reply with quote

Well, there might be one already that no one has looked up so far.

EDIT: An alternative logind implementation would be elogind, e.g.
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
as.gentoo
Guru
Guru


Joined: 07 Aug 2004
Posts: 319

PostPosted: Wed Jun 15, 2016 6:10 pm    Post subject: Reply with quote

'eix elogind' outputs 'No matches found'. So I guess this would be part of an overlay then.

There was a specific package and command for the screen-locker process for KDE5. Which one is that? Maybe 'kill <pid>' would be enough to get rid of the lock?
Back to top
View user's profile Send private message
kensington
Developer
Developer


Joined: 02 Jan 2013
Posts: 177
Location: Australia

PostPosted: Thu Jun 16, 2016 7:39 am    Post subject: Reply with quote

I'm not aware of any way to kill the screenlocker when it's run into trouble on a non-systemd system.

EDIT: I did ask upstream about this again, and they don't care about non-systemd of course. They even refused any change to improve the message if loginctl is missing.
Back to top
View user's profile Send private message
as.gentoo
Guru
Guru


Joined: 07 Aug 2004
Posts: 319

PostPosted: Fri Jun 17, 2016 1:17 am    Post subject: Reply with quote

The easiest solution is to use
Code:
vlock -a
from app-misc/vlock then... if there will be only one session.
Plus a script that somehow checks if the user is inactive and executes vlock after <MINUTES>.

… or, somebody could fork consolekit2 and care for non-systemd users. (No, I can't do that.)
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 7138
Location: Austria

PostPosted: Fri Jun 17, 2016 5:16 am    Post subject: Reply with quote

consolekit2 does care about non-systemd users, since that's what it is existing for.
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
julgo
n00b
n00b


Joined: 18 Jun 2016
Posts: 1

PostPosted: Sat Jun 18, 2016 7:30 pm    Post subject: Reply with quote

solution

https://bugs.kde.org/show_bug.cgi?id=360489

Quote:

First, we have to determine which session is X11 session. To accomplish that, run
# ck-list-sessions
in any virtual terminal (e.g. using Ctrl+Alt+F2).
One of sessions should contain x11-display property set - that session is possibly corresponding to a locked one:
Session1:
...
x11-display = ':0'

Remember that session name ("Session1").
Now run the following command as root from the virtual terminal (below su is used to obtain root privileges)
# su -c 'dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Session1 org.freedesktop.ConsoleKit.Session.Unlock'
Where you should replace Session1 with your session name obtained at the previous step using ck-list-sessions.
After that you should be able to switch back to the running session (Ctrl+Alt+F7).
Back to top
View user's profile Send private message
as.gentoo
Guru
Guru


Joined: 07 Aug 2004
Posts: 319

PostPosted: Sun Jun 19, 2016 2:21 pm    Post subject: Reply with quote

Thanks, that will really help next time.
You forgot to mention:
https://bugs.kde.org/show_bug.cgi?id=360489 wrote:
Bug 360489 - kscreenlocker suggests running "loginctl unlock-sessions" even though I don't use systemd
Status RESOLVED WONTFIX
[…]
From our side this is a clear wontfix or more a cantfix. Please do not expect us to go an extramile to support a corner case of the corner case.
So kensington is right!

How many gentoo users do (not) use systemd? Is there any statistics about that?
"Corner case of a corner case" sounds like: a corner case would be less than 10% so the corner case of a corner case would be 1% then. I really doubt that 99% of all linux users do use systemd.
Back to top
View user's profile Send private message
kensington
Developer
Developer


Joined: 02 Jan 2013
Posts: 177
Location: Australia

PostPosted: Sun Jun 19, 2016 3:04 pm    Post subject: Reply with quote

If we can integrate the dbus unlock into a simple script, I'd be happy to ship that and patch the wording of the emergency screen accordingly.

I'm also working on packaging of elogind - systemd's logind extracted into a standalone package. It's generally working for me OK with OpenRC so far, but I was not able to get the session locking/unlocking to work yet.
Back to top
View user's profile Send private message
genterminl
Guru
Guru


Joined: 12 Feb 2005
Posts: 488
Location: Connecticut, USA

PostPosted: Fri Dec 02, 2016 10:52 pm    Post subject: Reply with quote

I just ran into this, with kscreenlocker 5.7.5. I'll try the suggested approaches, but this just really dampens my enthusiasm for KDE.
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 7138
Location: Austria

PostPosted: Sat Dec 03, 2016 12:43 am    Post subject: Reply with quote

Think of it as a security feature :lol:

So, there is a workaround, but for openrc users it is just a bit more inconvenient...

No.1 reason why this can happen is a Qt/Frameworks upgrade during an existing Plasma session, otherwise there seem to be some systems that have a bug with ~arch pam/fcaps due to kernel config or whatever, so not strictly related to Plasma, just being made visible there...
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
genterminl
Guru
Guru


Joined: 12 Feb 2005
Posts: 488
Location: Connecticut, USA

PostPosted: Sat Dec 03, 2016 2:34 am    Post subject: Reply with quote

I have to admit, my system has a whole host of other (but related) problems at the moment. Yes, I'm working on picking up the pieces. However, I'm pretty sure nothing related was upgraded at the time,. It was actually a test of startkde for a newly created user, so I think the lock may simply have been a legitimate timeout. In my case, they underlying issue is kwin_x11 crashes, but I've got plenty of other stuff to clean up before really digging into that. However, as you say, there are workarounds, even if they actually take some effort.
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 7138
Location: Austria

PostPosted: Sat Dec 03, 2016 8:43 am    Post subject: Reply with quote

If only you did 'startkde' without launching a consolekit/dbus session for the user, then that will be the reason.
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
genterminl
Guru
Guru


Joined: 12 Feb 2005
Posts: 488
Location: Connecticut, USA

PostPosted: Sat Dec 03, 2016 4:24 pm    Post subject: Reply with quote

How about "exec ck-launch-session startkde" as the last line of .xinitrc?
Back to top
View user's profile Send private message
gentooP4
Apprentice
Apprentice


Joined: 20 Sep 2010
Posts: 182
Location: NZ

PostPosted: Fri Dec 16, 2016 7:36 am    Post subject: Reply with quote

The arrogance of the devs is kinda outstanding here, but what's new when systemd is involved.
_________________
The United States has announced that it will deploy thoughts and prayers in the battle against online extremism.

If you voted for Trump or Brexit, you were likely influenced by the Cambridge Analytica propaganda machine.
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 7138
Location: Austria

PostPosted: Fri Dec 16, 2016 10:02 am    Post subject: Reply with quote

Calm down. This is an extremely rare issue. Obviously non-systemd use-case is in need of a solution here, and a 10-lines CLI how-to on the lockscreen is not. Let's hope the standalone logind implementation will be it.
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
Toomuch
n00b
n00b


Joined: 16 Mar 2004
Posts: 49

PostPosted: Mon Dec 26, 2016 4:33 pm    Post subject: Reply with quote

Thanks to julgo for the unlocking instructions. Ran into this today after updating nvidia-drivers and kholidays(!). Oh dear. I don't even need a screen locker for anything, just installed it to adjust the time before the display goes to sleep. Otherwise it would blank every 5 minutes :P
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 7138
Location: Austria

PostPosted: Mon Dec 26, 2016 5:08 pm    Post subject: Reply with quote

Well, kholidays has certiainly nothing to do with it. Make sure it does work now though, so that you do not run into it again, or else we can work towards fix your config.
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
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
Goto page 1, 2  Next
Page 1 of 2

 
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