Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 526762 - x11-apps/xinit-1.3.4 does not hand-off consolekit session correctly
Summary: x11-apps/xinit-1.3.4 does not hand-off consolekit session correctly
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL: http://cgit.freedesktop.org/xorg/app/...
Whiteboard:
Keywords: PMASKED
Depends on:
Blocks:
 
Reported: 2014-10-25 16:12 UTC by Alex Barker
Modified: 2015-02-08 19:23 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Barker 2014-10-25 16:12:48 UTC
After updating to x11-apps/xinit-1.3.4 (from 1.3.3-r1) I noticed that KDE did not display any of my system level leave options like shutdown, restart and sleep.  This seems to be caused by a failure to hand off active session to X11.

With x11-apps/xinit-1.3.4:
kwhat@plutonium244 ~ $ ck-list-sessions
Session1: 
        unix-user = '1000' 
        realname = '(null)' 
        seat = 'Seat1' 
        session-type = '' 
        active = TRUE 
        x11-display = '' 
        x11-display-device = '' 
        display-device = '/dev/tty1' 
        remote-host-name = '' 
        is-local = TRUE 
        on-since = '2014-10-24T18:37:14.818549Z' 
        login-session-id = '2' 
        idle-since-hint = '2014-10-24T18:37:50.297350Z' 
Session2: 
        unix-user = '1000' 
        realname = '(null)' 
        seat = 'Seat1' 
        session-type = '' 
        active = FALSE 
        x11-display = ':0' 
        x11-display-device = '/dev/tty1' 
        display-device = '/dev/tty1' 
        remote-host-name = '' 
        is-local = TRUE 
        on-since = '2014-10-24T18:37:24.903015Z' 
        login-session-id = '2' 


With x11-apps/xinit-1.3.3-r1:
kwhat@plutonium244 ~ $ ck-list-sessions
Session3:
        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 = '2014-10-25T16:04:15.707987Z'
        login-session-id = '3'
        idle-since-hint = '2014-10-25T16:04:46.645400Z'
Session4:
        unix-user = '1000'
        realname = '(null)'
        seat = 'Seat1'
        session-type = ''
        active = TRUE
        x11-display = ':0'
        x11-display-device = '/dev/tty7'
        display-device = '/dev/tty1'
        remote-host-name = ''
        is-local = TRUE                                                                                                                                                                                          
        on-since = '2014-10-25T16:04:16.998397Z'                                                                                                                                                                 
        login-session-id = '3'  


I am starting KDE with XSESSION via startx from a console login.  It doesn't make a difference if I use .xinitrc or XSESSION.

Reproducible: Always
Comment 1 equeim 2014-10-26 10:59:36 UTC
I solved this problem by running 'startx -- vt7'
This is upstream change related to systemd-logind:
http://cgit.freedesktop.org/xorg/app/xinit/commit/?id=44915d6953076849b69a017f6fc8234b0f254362
Comment 2 Chí-Thanh Christopher Nguyễn gentoo-dev 2014-10-26 16:41:12 UTC
We could conditionally reverse this patch based on USE=systemd.

startx.cpp doesn't change frequently, so hopefully that would not break often.
http://cgit.freedesktop.org/xorg/app/xinit/log/startx.cpp

@x11 Opinions?
Comment 3 Kirill Elagin 2014-10-26 22:32:08 UTC
Chí-Thanh,

~~~~
--- Unmatched removal atom(s) in /usr/portage/profiles/targets/systemd/package.mask: ->=x11-apps/xinit-1.3.4
~~~~

Shouldn’t the mask entry go to `base/`?
Comment 4 Chí-Thanh Christopher Nguyễn gentoo-dev 2014-10-26 22:34:06 UTC
Yes it is already moved there. The change will reach the mirrors in an hour or so.

The message itself is only cosmetic though, it should work as intended anyway.
Comment 5 Steve L 2014-10-29 09:07:00 UTC
(In reply to Chí-Thanh Christopher Nguyễn from comment #2)
> We could conditionally reverse this patch based on USE=systemd.
> 
> startx.cpp doesn't change frequently, so hopefully that would not break
> often.
> http://cgit.freedesktop.org/xorg/app/xinit/log/startx.cpp
> 
> @x11 Opinions?

Well not from X11 perspective, but from shell pov that displays a
breathtaking level of incompetence in sh. It's truly *laughable*
(as is CPP in that context at least.)

If you want it reworked in correct shell, I'd be happy to help,
but there's no point doing that when the upstream maintainers are
so evidently incompetent in even the _basics_ of the language, ime,
unless we're happy to maintain a correct version, until such time
as they all "go to wayland" (as I keep hearing.)

However I'm not prepared to put lots of time into fixing the crap
if no-one's going to use the resultant output. Life's far too
short for that nonsense.

Good luck etc.
Comment 6 Mike Gilbert gentoo-dev 2015-02-08 18:53:01 UTC
(In reply to Chí-Thanh Christopher Nguyễn from comment #2)
> We could conditionally reverse this patch based on USE=systemd.

I see you went ahead and implemented this.

If you want to reverse the patch unconditionally, that's fine too; we already handle the systemd issue in xserverrc.1:

#!/bin/sh
if [ -z "$XDG_VTNR" ]; then
  exec /usr/bin/X -nolisten tcp "$@"
else
  exec /usr/bin/X -nolisten tcp "$@" vt$XDG_VTNR
fi
Comment 7 Chí-Thanh Christopher Nguyễn gentoo-dev 2015-02-08 19:23:25 UTC
Indeed startx would still work, but calling /usr/bin/X directly could fail.

Let's leave it at that unless someone complains.