Bug 1191171 - "Could not sync environment to dbus." (startkde)
Summary: "Could not sync environment to dbus." (startkde)
Alias: None
Product: Fedora
Classification: Fedora
Component: plasma-workspace
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Lukáš Tinkl
QA Contact: Fedora Extras Quality Assurance
Whiteboard: AcceptedBlocker
Depends On:
Blocks: F22AlphaBlocker F22Blocker-kde
TreeView+ depends on / blocked
Reported: 2015-02-10 15:26 UTC by Martin Kho
Modified: 2015-07-13 08:10 UTC (History)
15 users (show)

Fixed In Version: qt5-qtbase-5.4.0-13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-02-17 16:09:41 UTC
Type: Bug

Attachments (Terms of Use)
Tentative patch for ksyncdbusenv (1.55 KB, patch)
2015-02-11 16:03 UTC, Lukáš Tinkl
no flags Details | Diff

Description Martin Kho 2015-02-10 15:26:12 UTC
Description of problem:
KDE fails to start after successful log in. The result is a black screen with the summary message. This message comes from startkde:

"# At this point all environment variables are set, let's send it to the DBus session server to update the activation environment
if test $? -ne 0; then
  # Startup error
  echo 'startkde: Could not sync environment to dbus.'  1>&2
  test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null
  xmessage -geometry 500x100 "Could not sync environment to dbus."
  exit 1

Version-Release number of selected component (if applicable):
plasma-workspace-5.2.0-4.fc22.x86_64 and later (5.2.0-6).

How reproducible:

Steps to Reproduce:
1. update plasma-workspace to version 5.2.0-4 or later
2. log out/log in

Actual results:
black screen with error message

Expected results:
kde start normally

Additional info:

Comment 1 Martin Kho 2015-02-10 15:27:42 UTC
... and downgrading plasma-workspace solves this issue.

Martin Kho

Comment 2 Lukáš Tinkl 2015-02-10 16:06:36 UTC
Fixed this upstream already some time ago... I wonder how come we don't have this...


Can we get it included in our packages Rex?

Comment 3 Rex Dieter 2015-02-10 19:46:33 UTC
That patch has been included since 

* Mon Jan 12 2015 Daniel Vrátil <dvratil@redhat.com> - 5.1.2-5
- Add upstream patch to make ksyncdbusenv work with dbus-1.8.14

Recent changes in packaging are minimal cosmetic:

* Mon Feb 09 2015 Daniel Vrátil <dvratil@redhat.com> - 5.2.0-6
- Revert the previous change

* Mon Feb 09 2015 Daniel Vrátil <dvratil@redhat.com> - 5.2.0-5
- Provides/Obsoletes: kdeclassic-cursor-theme

* Sun Feb 08 2015 Daniel Vrátil <dvratil@redhat.com> - 5.2.0-4
- Requires: powerdevil, oxygen-sound-theme

Reporter, which is that last plasma-workspace build that works ok? 5.2.0-3 ?

Comment 4 Martin Kho 2015-02-10 20:03:34 UTC
Yes, 5.2.0-3 works ok.

Comment 5 Rex Dieter 2015-02-10 20:34:49 UTC
And for any failed session, can you post the contents of your ~/.xsession-errors ?  that should contain:

        qDebug() << reply.error().name() << reply.error().message();

which may help determine why the dbus sync  failed

Comment 6 Martin Kho 2015-02-10 21:23:47 UTC
Hi Rex,

That's not what I get. I have in .xsession-errors (all):

"gpg-agent: a gpg-agent is already running - not starting a new one
xset:  bad font path element (#2), possible causes are:
    Directory does not exist or has wrong permissions
    Directory missing fonts.dir
    Incorrect font server address or syntax
startkde: Starting up...
QDBusMarshaller::appendVariantInternal: Found unknown D-BUS type ''
"org.freedesktop.DBus.Error.InvalidArgs" "Call to UpdateActivationEnvironment has wrong args (, expected a{ss})
startkde: Could not sync environment to dbus.
Warning: Missing charsets in String to FontSet conversion"

Martin Kho

Comment 7 Martin Kho 2015-02-10 21:26:29 UTC
B.t.w: dbus-1.8.14-1.fc22.x86_64 and qt-4.8.6-21.fc22.x86_64 (qdbus)

Comment 8 Rex Dieter 2015-02-10 22:24:56 UTC
So apparently the qDebug sent:

QDBusMarshaller::appendVariantInternal: Found unknown D-BUS type ''
"org.freedesktop.DBus.Error.InvalidArgs" "Call to UpdateActivationEnvironment has wrong args (, expected a{ss})

the first being the error name, the second being the error message.

Lukáš, does that help at all? (I suspect not, since that part of the code hasn't changed except for being compiled with gcc5 now).

Comment 9 Lukáš Tinkl 2015-02-11 14:13:46 UTC
Aha.. so it fails within the same function but the cause is different (ie. not the path but the type of the argument being passed to UpdateActivationEnvironment).

Comment 10 Lukáš Tinkl 2015-02-11 14:44:45 UTC
So the only difference between 5.2.0-3 (working) and 5.2.0-4 (failing) is that it's compiled with GCC 5? :o

Martin, what's your Qt5 version? Did you also revert that as part of your experiment?

Comment 11 Martin Kho 2015-02-11 15:08:55 UTC
Hi Lukáš,

I think it's 5.4.0.

rpm -qa | grep qt5

Comment 12 Lukáš Tinkl 2015-02-11 16:03:33 UTC
Created attachment 990482 [details]
Tentative patch for ksyncdbusenv

Comment 13 Rex Dieter 2015-02-11 16:24:15 UTC
* Wed Feb 11 2015 Rex Dieter <rdieter@fedoraproject.org> 5.2.0-7
- "Could not sync environment to dbus." (startkde) (#1191171)

Comment 14 darrell pfeifer 2015-02-11 18:00:48 UTC
This didn't fix the issue.

The last version that consistently works for me is 5.2.0-3.

I have a vague recollection that

1) The problem happened before the new gcc
2) At one time it seems like I just waited until there was a new selinux update. I haven't tried running with selinux off to see if the problem disappears.

Comment 15 Rex Dieter 2015-02-11 18:29:03 UTC
Re: comment #14

The only difference between -3 and -4 is:

Requires: powerdevil oxygen-sound-theme
and being built with gcc5

To be clear, you're saying the just-built plasma-workspace-5.2.0-7 fails the same way?  if so, can you post the tail snippet from ~/.xsession-errors similar to comment #6 ?  hopefully the qDebug output may give a different message this time about the failure.

Comment 16 darrell pfeifer 2015-02-11 18:40:01 UTC
With 5.2.0-7 the message is

startkde: Starting up...
QDBusMarshaller::appendVariantInternal: Found unknown D-BUS type ''
"org.freedesktop.DBus.Error.InvalidArgs" "Call to UpdateActivationEnvironment has wrong args (, expected a{ss})
startkde: Could not sync environment to dbus.
Warning: Missing charsets in String to FontSet conversion
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 212 requests (212 known processed) with 0 events remaining.

Comment 17 Fedora Blocker Bugs Application 2015-02-11 19:32:37 UTC
Proposed as a Blocker for 22-alpha by Fedora user rdieter using the blocker tracking app because:

 This bug prevents Plasma5 session start, makes kde spin dead.

Comment 18 Adam Williamson 2015-02-11 19:49:27 UTC
showstopper for KDE? +1 blocker then.

Comment 19 Martin Kho 2015-02-13 15:50:30 UTC

FYI, fwiw, my Fedora 20 + dvratil's plasma-5 copr repo has no problem with plasma-workspace-5.2.0-6.fc20.x86_64, as expected (gcc-4.8.3-7)

Martin Kho

Comment 20 Rex Dieter 2015-02-13 15:56:07 UTC
Yeah, all indications the problem is specific to f22+ and/or packages built with gcc5.

Comment 21 Kevin Kofler 2015-02-15 23:55:10 UTC
A theory brought up on IRC was that this might actually be due to the dbus package. If that's the case, then it could be the same bug as F21 bug #1192826.

Comment 22 Adam Williamson 2015-02-16 17:46:52 UTC
Discussed at 2015-02-16 blocker review meeting: http://meetbot.fedoraproject.org/fedora-blocker-review/2015-02-16/f22-blocker-review.2015-02-16-17.30.log.txt . As described, accepted as an Alpha blocker as a violation of criterion "A system installed with a release-blocking desktop must boot to a log in screen where it is possible to log in to a working desktop using a user account created during installation or a 'first boot' utility."

Comment 23 Rex Dieter 2015-02-17 15:40:33 UTC
Can you test if upgrading to qt5-qtbase-5.4.0-13.fc22 (or newer) helps?

Comment 24 darrell pfeifer 2015-02-17 15:45:21 UTC
Works with qt5-qtbase-5.4.0-13.fc22

Comment 25 Martin Kho 2015-02-17 15:57:27 UTC
Hi Rex,

Congratulations! It works fo me too. Nice work.

Martin Kho

Comment 26 Rex Dieter 2015-02-17 16:09:41 UTC
Yay, marking closed/fixed in qt5-qtbase-5.4.0-13

* Mon Feb 16 2015 Rex Dieter <rdieter@fedoraproject.org> 5.4.0-13
- -no-use-gold-linker (f22+, #1193044)

essentially a dup of bug #1193044 then, but won't , since this one is considered a blocker (and that one is still open)

Note You need to log in before you can comment on or make changes to this bug.