Bug 450065

Summary: Custom default look and feel isn't fully applying on Plasma 5.24, in particular the panel theme
Product: [Applications] systemsettings Reporter: Neal Gompa <ngompa13>
Component: kcm_lookandfeelAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED DOWNSTREAM    
Severity: major CC: agurenko, jgrulich, kde, nate, ngompa13, postix, rdieter, tdawson
Priority: NOR    
Version: 5.24.0   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Neal Gompa 2022-02-12 04:20:38 UTC
SUMMARY
With fresh installs of Fedora 36 with Plasma 5.24.0, the default look and feel theme does not seem to be fully applying properly. In particular, the Breeze Twilight look and feel setting is not respected and I get default light Breeze.

This is despite my setting it (the new way) in our defaults: https://pagure.io/fedora-kde/kde-settings/c/3cd46daaf3a2fcfb8266364eed37ab7744760eb7

(Sidebar, the old way still works, and I thought that code was supposed to be removed per bug 446569?)

STEPS TO REPRODUCE
1. Download today's nightly ISOs for F36 ( https://koji.fedoraproject.org/koji/buildinfo?buildID=1916335 )
2. Boot into the live environment

OBSERVED RESULT
The panels use the upstream default Breeze Light look.

EXPECTED RESULT
The panels use the configured default Breeze Dark look.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Linux 36 (KDE Plasma)
(available in About System)
KDE Plasma Version: 5.24.0
KDE Frameworks Version: 5.90
Qt Version: 5.15.2

ADDITIONAL INFORMATION
This also affects Fedora Rawhide and can be seen in today's nightly ISOs ( https://koji.fedoraproject.org/koji/buildinfo?buildID=1916698 ).
Comment 1 Neal Gompa 2022-02-12 04:33:39 UTC
This is considered a serious issue for Fedora KDE and has a downstream RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=2053790
Comment 2 Neal Gompa 2022-02-14 12:42:37 UTC
(In reply to Neal Gompa from comment #1)
> This is considered a serious issue for Fedora KDE and has a downstream RHBZ:
> https://bugzilla.redhat.com/show_bug.cgi?id=2053790

This has now been upgraded to a F36 blocker bug.
Comment 3 Neal Gompa 2022-02-28 01:10:22 UTC
So, I don't fully understand why, but I needed to refresh the downstream Fedora patch for setting the default theme to set in startkde/startplasma.cpp: https://src.fedoraproject.org/rpms/plasma-workspace/c/1857efd5370f81b74025578a9fbc0250bde7abf8?branch=1857efd5370f81b74025578a9fbc0250bde7abf8

It fixes the problem for me, but I feel like the setting I made in kde-settings should have worked, though it didn't: https://pagure.io/fedora-kde/kde-settings/c/3cd46daaf3a2fcfb8266364eed37ab7744760eb7
Comment 4 Nate Graham 2022-03-03 05:52:11 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=2053790 seems to be closed now; did you work around this with a packaging change, or was there some leftover upstream patch that needed to be cleared out? Or something else?
Comment 5 Neal Gompa 2022-03-04 10:51:19 UTC
(In reply to Nate Graham from comment #4)
> https://bugzilla.redhat.com/show_bug.cgi?id=2053790 seems to be closed now;
> did you work around this with a packaging change, or was there some leftover
> upstream patch that needed to be cleared out? Or something else?

I worked around it with the patch I noted in comment 3, which basically persists the problems we have around theming but at least doesn't break the default setup anymore.
Comment 6 David Redondo 2022-04-22 17:37:04 UTC
So Fedora ships 
/usr/share/kde-settings/kde-profile/default/share/config/kdeglobals 
 in https://pagure.io/fedora-kde/kde-settings/c/3cd46daaf3a2fcfb8266364eed37ab7744760eb7 that sets

LookAndFeelPackage=org.fedoraproject.fedora.desktop

I assume  /usr/share/kde-settings/kde-profile/default/share/config/ is not in  $XDG_CONFIG _DIRS.

Fedora also ships an /etc/kderc which reads 

[Directories]
profileDirsPrefix=/usr/share/kde-settings/kde-profile/
[Directories-default]
prefixes=/usr/share/kde-settings/kde-profile/default/

This seems to  to be an kde4 era mechanism to do some things
https://lxr.kde.org/search?%21v=kf5-qt5&_filestring=&_string=profileDirsPrefix
That aside /etc/kderc is not used by frameworks5 kconfig, I assume that's also a kde 4 era file.
The correct file would be /etc/kde5rc https://invent.kde.org/frameworks/kconfig/-/blob/master/src/core/kconfig.cpp#L98

Fedora needs to actually set the setting in  a file that is respected . Typically this would be  /etc/xdg/kdeglobals or some other kdeglobals in   $XDG_CONFIG_DIRS (If one really wants it even /etc/kde5rc).

The patch from comment #3 i.e. https://src.fedoraproject.org/rpms/plasma-workspace/c/1857efd5370f81b74025578a9fbc0250bde7abf8?branch=1857efd5370f81b74025578a9fbc0250bde7abf8 is only half correct since it only changes the code default when reading the setting. 
When global theme is changed in KCM to the one it thinks is the default one (Breeze Light,) it doesn't write it down to any config file because the current default matches the code default. So when startplasma reads that setting it uses the code provided default and thinks the Fedora global theme is active but not correctly applied and acivates it.

Tl;dr: Fedora is using a weird file/a file that does not have any effect.
Comment 7 Nate Graham 2022-05-02 18:07:49 UTC
*** Bug 453083 has been marked as a duplicate of this bug. ***