! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce4-session-logout window doesn't accept global icons and style theme
Status:
RESOLVED: FIXED
Product:
Xfce4-session
Component:
General

Comments

Description yarosweet1 2019-07-13 18:46:10 CEST
 
Comment 1 Theo Linkspfeifer editbugs 2019-07-14 14:16:48 CEST
Please add some details to this report. What did you try and what is the result?

The dialog window does respect the selected icon theme and it changes slightly depending on the selected GTK theme.
Comment 2 yarosweet1 2019-07-14 18:09:10 CEST
This happened after last update to xfce4-session 4.13.3git-195b42. Now if I change theme or icons for example Adwaita-dark or High Contrast, logout window still the same - standard GNOME theme/icons, but all other elements and windows respect changes.

No errors appear in .xsession-error after changing too.
Comment 3 Theo Linkspfeifer editbugs 2019-07-14 19:36:57 CEST
Indeed. The latest commit introduced this bug which disappears after running "xfsettingsd --replace" manually.
Comment 4 Andre Miranda editbugs 2019-07-16 19:08:08 CEST
Using both settings and session from current git master, I can't reproduce. Is it reproducible 100% of time for you two?
Comment 5 Theo Linkspfeifer editbugs 2019-07-16 20:27:17 CEST
100% with both components from git master or just the mentioned commit alone.

https://git.xfce.org/xfce/xfce4-session/commit/?id=195b423599fd1cde5204a281846318c820e11a61
Comment 6 yarosweet1 2019-07-16 23:01:33 CEST
Yes, 100% on different laptops.
Comment 7 Olivier Fourdan editbugs 2019-07-17 15:22:12 CEST
There's something very fishy there, the WM doesn't get the theme changes either!
Comment 8 Olivier Fourdan editbugs 2019-07-19 10:57:11 CEST
I think we're battling against a race condition from the very beginning.

The problem is not in xfce4-session, but rather in xfce4-settings.

For me, without my patches, neither the panel, window manager, session manager actually take the themes/icons stuff, basically everything managed by xsettings.

I have a fix for this in xfce4-session, but the issue for xfce4-session itself remains, as it's kinda hard to make sure xsettings (started y xsession) is done before xsession starts...
Comment 9 Olivier Fourdan editbugs 2019-07-19 14:19:21 CEST
Can you please try with the two patches I posted in bug 15725 for “xfce4-settings”?
Comment 10 Olivier Fourdan editbugs 2019-07-19 22:00:08 CEST
Created attachment 8790 
[PATCH] session: Restore default daemonization

Keep the default daemon option for xfsettings, xfsettings should notify
the session manager when done all by itself.
Comment 11 Philip Müller 2019-07-20 09:43:52 CEST
Since Manjaro uses XFCE-GTK3 development packages since more than a year, we also had noticed some theme issue a log time ago. Therefore we used this workaround: https://gitlab.manjaro.org/packages/community/xfce/manjaro-xfce-gtk3-settings/blob/master/xfce-pbw.sh, which got autostarted to reload the settings.

I applied now both patches to settings an the one to session, to see if that changes anything on our end.

More information here:

https://forum.manjaro.org/t/95174/108
https://forum.manjaro.org/t/94992
Comment 12 Theo Linkspfeifer editbugs 2019-07-20 11:10:22 CEST
With all patches applied I still see the bug.
Comment 13 Olivier Fourdan editbugs 2019-07-20 11:25:14 CEST
Right. I think something is weird.

The theme worked previously because xfsettingsd was started much later after the other clients, so the change in theme was caught like a regular theme change.

Now we start xfsettingsd earlier (for bug 15485) but then other clients start more or less simultaneously and miss the theme change.

I think the whole thing worked “by chance”... Another possibility would be to start xfsettingsd much later - But ether way, the design seems quite fragile and it's hard to make sure we'll avoid the race condition.

With the current patches, xfsettingsd is started with prio 0 (highest) and xfwm4 is started with a lower priority of 15.

Yet, adding logs, we clearly see that xfwm4 is started first...

xfwm4-Message: 11:14:04.964: xfwm4 starting
xfsettingsd-Message: 11:14:05.468: on_name_acquired: Startup done

So are priorities honored at all by xfce4-session?
Comment 14 Olivier Fourdan editbugs 2019-07-20 17:49:22 CEST
Created attachment 8794 
[PATCH] Revert "session: Serialize startup of xfsettings daemon"

Let's revert the offending patch then.
Comment 15 Philip Müller 2019-07-20 20:48:25 CEST
After as an existing user cleaned my saved sessions (remove
everything in ~/.cache/sessions/) I was able to have a fast start again. However the logout was not themed, still. Therefore our workaround with 'xfsettingsd --replace' is still needed ...
Comment 16 Olivier Fourdan editbugs 2019-07-20 21:52:11 CEST
Which confirms what I've been saying, the unthemed session logout dialog is actually not directly related to the commit I added.

Thing is, xfce4-session owns the widgets and xfce4-session starts xfsettingsd which starts xsettings which sets the theme. Starting xsettings later makes it less likely to occur, but does not guarantee it cannot happen.
Comment 17 Olivier Fourdan editbugs 2019-07-20 22:13:37 CEST
Created attachment 8802 
[PATCH] xfsettingsd: Process gtk events prior to start DBUS

Out of curiosity, does this patch makes any difference?
Comment 18 Philip Müller 2019-07-21 09:10:38 CEST
Seems to work, at least for me. No workaround needed.
Comment 19 Olivier Fourdan editbugs 2019-07-21 10:11:58 CEST
Interesting, we're making progress :)

Can we try once more time, removing the “--no-deamon” but keeping the higher priority for xfsettingsd.
Comment 20 Olivier Fourdan editbugs 2019-07-21 10:12:58 CEST
Created attachment 8803 
[PATCH 1/2] session: Launch xfsettingsd as a daemon

Disabling the daemon mode in xfsettingsd is causing dealy at startup.

This reverts commit 195b423599fd1cde5204a281846318c820e11a61.
Comment 21 Olivier Fourdan editbugs 2019-07-21 10:16:01 CEST
Created attachment 8804 
[PATCH 2/2] xfsettingsd: Process gtk events prior to start DBUS

Currently, xfce4-session will start all components once it gets the
DBUS session ready, delaying gtk processing.

Process all pending gtk events from initialization before starting DBUS.
Comment 22 Olivier Fourdan editbugs 2019-07-21 10:16:31 CEST
Can we retry with only these two patches attached?
Comment 23 Philip Müller 2019-07-21 13:19:38 CEST
I applied those two patches to our latest version on Manjaro. Seems to work. Additionally I applied the new patch-set of 4 to settings.
Comment 24 Philip Müller 2019-07-21 13:51:26 CEST
Seems a user reports that logout is again unthemed: https://forum.manjaro.org/t/94992/17 - however worked with the previous way.
Comment 25 dave.diamond00 2019-07-21 14:02:49 CEST
(In reply to Philip Müller from comment #24)
> Seems a user reports that logout is again unthemed:
> https://forum.manjaro.org/t/94992/17 - however worked with the previous way.

I am such user and I can confirm: with the previous set of updates
manjaro-xfce-gtk3-settings 20190719-2 -> 20190720-1
xfce4-session-gtk3 4.13.3-4 -> 4.13.3-5

The logout panel was themed without the workaround script /etc/skel/.config/autostart/xfce-pbw.sh
#/bin/sh
sleep 5
xfsettingsd --replace &
sleep 15
xfsettingsd --replace &
sleep 25
xfsettingsd --replace &

With the last set of updates
xfce4-session-gtk3 4.13.3-5 -> 4.13.3-6
xfce4-settings-gtk3 4.13.7-4 -> 4.13.7-5

The logout panel is unthemed again, so I reimplemented the script /etc/skel/.config/autostart/xfce-pbw.sh
Comment 27 Philip Müller 2019-07-21 18:46:43 CEST
More info about our testing can be found here: https://forum.manjaro.org/t/94992/20
Comment 28 Philip Müller 2019-07-21 19:23:53 CEST
@Olivier: after intensive testing at our end, we came to this conclusion:

https://gitlab.manjaro.org/packages/extra/xfce/xfce4-session-gtk3/commit/9fed5e1024935eef512f54a62ea5a0c88f5ff800
https://gitlab.manjaro.org/packages/extra/xfce/xfce4-settings-gtk3/commit/1580ab474c272e64f2a8e9e50b4e4872ff6285ee

So dbus patch is fine, however we still need the reverts in both session and settings. The for additional patches for settings can be kept as well.
Comment 29 Olivier Fourdan editbugs 2019-07-21 19:57:04 CEST
Unfortunately, reverting those patches means reintroducing bug 15485
Comment 30 Philip Müller 2019-07-21 22:32:13 CEST
Yes, I know. However, we tried several combinations so far.
Comment 31 chancharge 2019-07-22 02:59:49 CEST
Original poster of the manjaro forum post here, I have just now updated xfce4-session-gtk3 to 4.13.3-9, running Manjaro unstable. The issue appears to be fixed for me.
Comment 32 ndk 2019-07-22 14:33:04 CEST
Another Manjaro user here confirming the following work ok on my system (and following Phil's instructions here: https://forum.manjaro.org/t/xfce4-session-logout-not-themed/94992/36 with the "xfce-pbw.sh" script disabled):

xfce4-session-gtk3-4.13.3-9
xfce4-settings-gtk3-4.13.7-8

...there's no issues with my second monitor on a couple of reboots now. I'm using non-free nvidia with custom monitor settings (per nvidia settings) already in place.
Comment 33 Olivier Fourdan editbugs 2019-07-23 08:59:30 CEST
An alternative would be to revert the two offending commits (as in those Manjaro builds) and start the settings manager much later (rather than much sooner) to reduce the risk of races.

But that's still brittle.
Comment 34 Git Bot editbugs 2019-07-26 00:33:40 CEST
Olivier Fourdan referenced this bugreport in commit a8f6cbede16750be20ff4bc1e1eb781105cdfb2c

Revert "session: Serialize startup of xfsettings daemon"

https://git.xfce.org/xfce/xfce4-session/commit?id=a8f6cbede16750be20ff4bc1e1eb781105cdfb2c
Comment 35 Git Bot editbugs 2019-07-26 00:33:45 CEST
Olivier Fourdan referenced this bugreport in commit b8f98acec67c5012e005dacd49d16595f439923c

Process Gtk events prior to starting D-Bus (Bug #15712)

https://git.xfce.org/xfce/xfce4-session/commit?id=b8f98acec67c5012e005dacd49d16595f439923c

Bug #15712

Reported by:
yarosweet1
Reported on: 2019-07-13
Last modified on: 2019-07-31

People

Assignee:
Xfce Bug Triage
CC List:
7 users

Version

Version:
4.13.3

Attachments

Additional information