Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme is broken on several tabs of systemsettings5 #79713

Closed
y-usuzumi opened this issue Feb 10, 2020 · 19 comments
Closed

Theme is broken on several tabs of systemsettings5 #79713

y-usuzumi opened this issue Feb 10, 2020 · 19 comments

Comments

@y-usuzumi
Copy link

Describe the bug
On the Plasma 5 desktop, theme is broken on several tabs of systemsettings5. This happens on both plasma desktop 5.16.5 and 5.17.5

To Reproduce
Steps to reproduce the behavior:

  1. Launch System settings
  2. Switch to the "Display and Monitor" tab
  3. Notice the broken theme:

image

Expected behavior
Theme should work properly

Additional context
If run from the terminal, the following log is displayed when switching the tab:

org.kde.kcoreaddons: Error loading plugin "kcm_kscreen" "The shared library was not found." 
Plugin search paths are ("/nix/store/dkm6jsa0apc7vlpdkslpvsxw1qr7kxh2-python3-3.7.6/lib/qt-5.12.6/plugins", "/run/wrappers/lib/qt-5.12.6/plugins", "/home/kj/.nix-profile/lib/qt-5.12.6/plugins", "/etc/profiles/per-user/kj/lib/qt-5.12.6/plugins", "/nix/var/nix/profiles/default/lib/qt-5.12.6/plugins", "/run/current-system/sw/lib/qt-5.12.6/plugins", "/nix/store/p4vbc0aqsj22f38fniixm0mc9binmal6-systemsettings-5.17.5-bin/lib/qt-5.12.6/plugins", "/nix/store/5h2d5lmhxy4b5ad6h41y8gxa5rd20q4a-plasma-workspace-5.17.5/lib/qt-5.12.6/plugins", "/nix/store/pwkk4w00kvddfyzdv9g0z0531mjv6ddj-qtlocation-5.12.6-bin/lib/qt-5.12.6/plugins", "/nix/store/kwxxwfd3vyz9aw16wyi031ll776rr7hx-libkscreen-5.17.5/lib/qt-5.12.6/plugins", "/nix/store/n1xfvr02f5l81gjap4v51jqc7dc7y8jp-kwin-5.17.5-bin/lib/qt-5.12.6/plugins", "/nix/store/rpy458gzc6rpgszwi1hpinsrv3yr3p6f-breeze-qt5-5.17.5-bin/lib/qt-5.12.6/plugins", "/nix/store/9rm257fgzpb5nhf2swhqvmh15yb4zbg1-frameworkintegration-5.66.0-bin/lib/qt-5.12.6/plugins", "/nix/store/3kfyqzz0chffhrlfcd3z0y03624z57aa-qtsensors-5.12.6-bin/lib/qt-5.12.6/plugins", "/nix/store/sprs2s1m8xgqf4kspl5pnwmfxf3ll0mw-ktexteditor-5.66.0-bin/lib/qt-5.12.6/plugins", "/nix/store/28chnah4xmkb1j9mb8b6m0cpl65qdys7-kscreenlocker-5.17.5/lib/qt-5.12.6/plugins", "/nix/store/jqnydkyplv1s0l7sqavh6qk3g3ay5lpn-plasma-framework-5.66.0-bin/lib/qt-5.12.6/plugins", "/nix/store/wkfp1h7xja24gw5y71ixmsj0y7zq1vic-kdelibs4support-5.66.0/lib/qt-5.12.6/plugins", "/nix/store/94wk9psqhasi9wysh96abdxnqhq08bzc-kemoticons-5.66.0-bin/lib/qt-5.12.6/plugins", "/nix/store/fhi739yhv9bapk09a071pi2gips3x6vy-kplotting-5.66.0/lib/qt-5.12.6/plugins", "/nix/store/462sx9hz9bij1piwbdqbj04fiaz43sw9-baloo-5.66.0-bin/lib/qt-5.12.6/plugins", "/nix/store/krphqcq0dv1h9psa4qwgr0lbxy6r19k3-kidletime-5.66.0-bin/lib/qt-5.12.6/plugins", "/nix/store/b8jwp7i8hrbdkrzd95cnv7vm0w4h3rk1-kfilemetadata-5.66.0-bin/lib/qt-5.12.6/plugins", "/nix/store/17j1xi89yz969vq0nh58w7xzfjdp3l64-qtmultimedia-5.12.6-bin/lib/qt-5.12.6/plugins", "/nix/store/vpclqcmcwsgxwsw2nj4d779xqva6i6i2-khtml-5.66.0-bin/lib/qt-5.12.6/plugins", "/nix/store/0yh5jm2488m40b4r4iwdvmgwdc05dnsq-kio-5.66.0/lib/qt-5.12.6/plugins", "/nix/store/z2l2h5idnn45ybbmpkgbnqy43jai0ni2-phonon-4.11.1/lib/qt-5.12.6/plugins", "/nix/store/25acay6sf1nc7dcal25gb9pqr9d3rp3z-kxmlgui-5.66.0-bin/lib/qt-5.12.6/plugins", "/nix/store/sgpsgpwkzkz61rcc5f5jlrjdy3fa37hi-ktextwidgets-5.66.0-bin/lib/qt-5.12.6/plugins", "/nix/store/i4kb53jjn7g1a9cbs96944mfw75igyra-kcompletion-5.66.0/lib/qt-5.12.6/plugins", "/nix/store/gjhx2ng2ggsw9lbihk59l2ynvr1b8q14-sonnet-5.66.0-bin/lib/qt-5.12.6/plugins", "/nix/store/zwx96j7gllhckvran7ab2fqcdxn96fv4-kiconthemes-5.66.0-bin/lib/qt-5.12.6/plugins", "/nix/store/6m98b8nkyvcy19i1jmzha3rf45s65wnh-kitemviews-5.66.0/lib/qt-5.12.6/plugins", "/nix/store/3vqwlbm2wl90vy91ky11wnvdmzabbv6r-kglobalaccel-5.66.0-bin/lib/qt-5.12.6/plugins", "/nix/store/xchw8xyppk5q750kfbaic52zq6d5ll1g-kwindowsystem-5.66.0/lib/qt-5.12.6/plugins", "/nix/store/zcnjc2dybpkdhiskgmspyk2ajd89asax-kguiaddons-5.66.0/lib/qt-5.12.6/plugins", "/nix/store/4pcp8z5hfdhs46gf1si5wpiqshxg86wb-kwidgetsaddons-5.66.0/lib/qt-5.12.6/plugins", "/nix/store/1v8ja8988gk5p5m91nnyi27pc622521z-kauth-5.66.0/lib/qt-5.12.6/plugins", "/nix/store/09v7c5gn755varmy8nm5vi1r556dkpyk-kconfigwidgets-5.66.0-dev/lib/qt-5.12.6/plugins", "/nix/store/gsrc9z7jls62kgwhyh0xxdvlb30bsysf-ki18n-5.66.0-bin/lib/qt-5.12.6/plugins", "/nix/store/pfsm8mmw5vi2b7xfavlkawl9yqal71ak-qtwayland-5.12.6-bin/lib/qt-5.12.6/plugins", "/nix/store/rp9zgzm1s5bw8545mhyihmksaxc9zfyv-qtdeclarative-5.12.6-bin/lib/qt-5.12.6/plugins", "/nix/store/55arwwspz5sjx2qc65wy66i6kkazrd74-qtsvg-5.12.6-bin/lib/qt-5.12.6/plugins", "/nix/store/6vypqvbkj9jwf4lrjmgm3p8s2xn4addp-qtbase-5.12.6-bin/lib/qt-5.12.6/plugins", "/nix/store/gbbgnr20a3wia424qrd5rrp6630pn75k-fcitx-with-plugins-4.2.9.6/lib/qt4/plugins", "/nix/store/p4vbc0aqsj22f38fniixm0mc9binmal6-systemsettings-5.17.5-bin/bin") 
The environment variable QT_PLUGIN_PATH might be not correctly set
QQmlEngine::setContextForObject(): Object already has a QQmlContext
file:///nix/store/djyvdkqxnj8j044lnnwvcixq15qb44k5-kscreen-5.17.5/share/kpackage/kcms/kcm_kscreen/contents/ui/Screen.qml:50: TypeError: Value is null and could not be converted to an object
file:///nix/store/djyvdkqxnj8j044lnnwvcixq15qb44k5-kscreen-5.17.5/share/kpackage/kcms/kcm_kscreen/contents/ui/main.qml:28: ReferenceError: units is not defined
file:///nix/store/djyvdkqxnj8j044lnnwvcixq15qb44k5-kscreen-5.17.5/share/kpackage/kcms/kcm_kscreen/contents/ui/main.qml:27: ReferenceError: units is not defined
file:///nix/store/djyvdkqxnj8j044lnnwvcixq15qb44k5-kscreen-5.17.5/share/kpackage/kcms/kcm_kscreen/contents/ui/Screen.qml:48: ReferenceError: units is not defined
file:///nix/store/djyvdkqxnj8j044lnnwvcixq15qb44k5-kscreen-5.17.5/share/kpackage/kcms/kcm_kscreen/contents/ui/Screen.qml:59: ReferenceError: units is not defined
file:///nix/store/djyvdkqxnj8j044lnnwvcixq15qb44k5-kscreen-5.17.5/share/kpackage/kcms/kcm_kscreen/contents/ui/Screen.qml:57: ReferenceError: units is not defined
file:///nix/store/djyvdkqxnj8j044lnnwvcixq15qb44k5-kscreen-5.17.5/share/kpackage/kcms/kcm_kscreen/contents/ui/main.qml:116: ReferenceError: units is not defined
file:///nix/store/djyvdkqxnj8j044lnnwvcixq15qb44k5-kscreen-5.17.5/share/kpackage/kcms/kcm_kscreen/contents/ui/main.qml:116: ReferenceError: units is not defined
file:///nix/store/djyvdkqxnj8j044lnnwvcixq15qb44k5-kscreen-5.17.5/share/kpackage/kcms/kcm_kscreen/contents/ui/Screen.qml:48: ReferenceError: units is not defined
file:///nix/store/djyvdkqxnj8j044lnnwvcixq15qb44k5-kscreen-5.17.5/share/kpackage/kcms/kcm_kscreen/contents/ui/main.qml:116: ReferenceError: units is not defined
file:///nix/store/djyvdkqxnj8j044lnnwvcixq15qb44k5-kscreen-5.17.5/share/kpackage/kcms/kcm_kscreen/contents/ui/OutputPanel.qml:93:12: QML RotationButton: Binding loop detected for property "height"
file:///nix/store/djyvdkqxnj8j044lnnwvcixq15qb44k5-kscreen-5.17.5/share/kpackage/kcms/kcm_kscreen/contents/ui/OutputPanel.qml:90:12: QML RotationButton: Binding loop detected for property "height"
file:///nix/store/djyvdkqxnj8j044lnnwvcixq15qb44k5-kscreen-5.17.5/share/kpackage/kcms/kcm_kscreen/contents/ui/OutputPanel.qml:87:12: QML RotationButton: Binding loop detected for property "height"
file:///nix/store/djyvdkqxnj8j044lnnwvcixq15qb44k5-kscreen-5.17.5/share/kpackage/kcms/kcm_kscreen/contents/ui/OutputPanel.qml:84:12: QML RotationButton: Binding loop detected for property "height"
file:///nix/store/djyvdkqxnj8j044lnnwvcixq15qb44k5-kscreen-5.17.5/share/kpackage/kcms/kcm_kscreen/contents/ui/Output.qml:80: ReferenceError: units is not defined
file:///nix/store/djyvdkqxnj8j044lnnwvcixq15qb44k5-kscreen-5.17.5/share/kpackage/kcms/kcm_kscreen/contents/ui/Output.qml:90: ReferenceError: units is not defined

Metadata

[root@DCHORUS-LEGION-NIXOS:~]# nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.4.17, NixOS, 20.03pre212208.8130f3c1c2b (Markhor)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.2`
 - channels(root): `"nixos-20.03pre212208.8130f3c1c2b"`
 - channels(kj): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@peterhoeg
Copy link
Member

peterhoeg commented Feb 13, 2020

It's because the proper theme is not selected for the qtquickcontrol2 parts of settings. The same problem applies to all the kirigami based applications (discover as an example).

The workaround:

QT_QUICK_CONTROLS_STYLE=org.kde.desktop systemsettings5

However, when I do this some parts of the settings application will segfault.

You can also pick another theme from this list - https://doc.qt.io/qt-5/qtquickcontrols2-styles.html

imagine looks decent:

QT_QUICK_CONTROLS_STYLE=imagine systemsettings5

But in any case, it's a problem that plasma doesn't set this correctly and of course that we get segfaults when using the proper theme.

Cc: @ttuegel

@peterhoeg
Copy link
Member

What you are seeing is technically not a broken theme. It's the default qtquickcontrols2 theme.

@eliasp
Copy link
Member

eliasp commented Feb 16, 2020

Switching to another style didn't really help here - KCMs are still utterly broken (e.g. display KCM doesn't load the QML for positioning the displays).

According to nix-env -q, I have 0 pkgs in my environment, so nothing there should mess with me here...

Seeing The environment variable QT_PLUGIN_PATH might be not correctly set reminds me quite a bit of #27050
My $QT_PLUGIN_PATH contains 138 items - I wonder whether we're hitting some limit here which might cause this?

@eliasp
Copy link
Member

eliasp commented Feb 16, 2020

There are a few things which strike me as weird...
kcmshell5 kscreen complains about not being able to find kcm_kscreen.so and hints at a probably misconfigured $QT_PLUGIN_PATH environment variable, but the paths displayed after the error message don't seem to originate from the values in $QT_PLUGIN_PATH.

kcmshell5 kscreen seems to be right, that none of the printed paths contains kcm_kscreen.so:

$ kcmshell5 kscreen 1>/dev/null 2>&1 | grep 'Plugin search paths are' | cut -d\( -f2 | cut -d\) -f1 | sed -e 's|, |\n|g' | sed -e 's|^"||g' -e 's|"$||g' | xargs -I {} find {}/ -type f -name kcm_kscreen.so
find: ‘/run/wrappers/lib/qt-5.12.6/plugins/’: No such file or directory
find: ‘/home/eliasp/.nix-profile/lib/qt-5.12.6/plugins/’: No such file or directory
find: ‘/etc/profiles/per-user/eliasp/lib/qt-5.12.6/plugins/’: No such file or directory
find: ‘/nix/var/nix/profiles/default/lib/qt-5.12.6/plugins/’: No such file or directory

The same goes for $QT_PLUGIN_PATH - none of the entries seems to provide kcm_kscreen.so:

$ echo $QT_PLUGIN_PATH | sed 's|:|\n|g' | sort | xargs -I {} find {}/ -type f -name kcm_kscreen.so
find: ‘/etc/profiles/per-user/eliasp/lib/kde4/plugins/’: No such file or directory
find: ‘/etc/profiles/per-user/eliasp/lib/qt4/plugins/’: No such file or directory
find: ‘/home/eliasp/.nix-profile/lib/kde4/plugins/’: No such file or directory
find: ‘/home/eliasp/.nix-profile/lib/qt4/plugins/’: No such file or directory
find: ‘/nix/var/nix/profiles/default/lib/kde4/plugins/’: No such file or directory
find: ‘/nix/var/nix/profiles/default/lib/qt4/plugins/’: No such file or directory
find: ‘/run/current-system/sw/lib/kde4/plugins/’: No such file or directory
find: ‘/run/current-system/sw/lib/qt4/plugins/’: No such file or directory

Looking at /nix/store, the following possible matches are currently present:

find /nix/store/*-kscreen-*/lib/qt-*/plugins/ -type f -name kcm_kscreen.so  
/nix/store/17iyjhqrgxq63wmzz76vp9q3b9x2lg3p-kscreen-5.16.5/lib/qt-5.12.6/plugins/kcm_kscreen.so
/nix/store/24vyflvrgxi5h5mxlbgcncskmanj1381-kscreen-5.16.5/lib/qt-5.12.6/plugins/kcm_kscreen.so
/nix/store/2jp445v9xr214wgb3rjh4ix1xmy2ysr3-kscreen-5.16.5/lib/qt-5.12.6/plugins/kcm_kscreen.so
/nix/store/53w8y9xj5rvlz9rq5hmlh9alqdcgi69w-kscreen-5.14.5/lib/qt-5.12/plugins/kcm_kscreen.so
/nix/store/5m7zscnx24777xzj9zi26q4pfgplrxhi-kscreen-5.16.5/lib/qt-5.12.3/plugins/kcm_kscreen.so
/nix/store/8a3mwspiivlb6w08srjj4l4517m74f6g-kscreen-5.16.5/lib/qt-5.12.6/plugins/kcm_kscreen.so
/nix/store/djyvdkqxnj8j044lnnwvcixq15qb44k5-kscreen-5.17.5/lib/qt-5.12.6/plugins/kcms/kcm_kscreen.so
/nix/store/f5n1ybbzjrnllfiv8rvmr4z884znxkra-kscreen-5.16.5/lib/qt-5.12.6/plugins/kcm_kscreen.so
/nix/store/i7gilrkxnvmp7g0njg8bv5g9w2g6yic5-kscreen-5.14.5/lib/qt-5.12/plugins/kcm_kscreen.so
/nix/store/k7q9g6l0qd13dbqa0h35ffmwfg11apg2-kscreen-5.16.5/lib/qt-5.12.5/plugins/kcm_kscreen.so
/nix/store/nplwcwlgiw0dmh70qvakqcghvkis1nh4-kscreen-5.14.5/lib/qt-5.12/plugins/kcm_kscreen.so
/nix/store/rlm403l4qnb2y4cwfrnjvcvyga2vy5w6-kscreen-5.16.5/lib/qt-5.12.6/plugins/kcm_kscreen.so
/nix/store/wcixgs1y0xkap5am9k47jq1zjv2bqqnr-kscreen-5.16.5/lib/qt-5.12.5/plugins/kcm_kscreen.so
/nix/store/xw2avh713pa6gxpfpz4mhq8sgid5cylf-kscreen-5.14.5/lib/qt-5.12/plugins/kcm_kscreen.so
/nix/store/y34p9zp8q677qs5n26y9ax0kxba20ypj-kscreen-5.16.5/lib/qt-5.12.6/plugins/kcm_kscreen.so
/nix/store/y97p4yqkxyyc0yqlc1n2cpwcw22z4n0h-kscreen-5.14.5/lib/qt-5.12/plugins/kcm_kscreen.so
  • Where do the outdated paths in kcmshell5 and $QT_PLUGIN_PATH come from? Some of those don't even exist and nothing in my user's profile seems to add them!
  • Why is there a mismatch between the path built-in to kcmshell5 and $QT_PLUGIN_PATH?

@eliasp
Copy link
Member

eliasp commented Feb 16, 2020

…and it looks like we're actually dealing with 2 separate issues here and you were right @peterhoeg - trying to inject a correct path into QT_PLUGIN_PATHS silences the error msgs about not being able to find kcm_kscreen.so, but the rendering issues persist:

QT_PLUGIN_PATH=$(dirname $(nix eval --raw nixpkgs.kscreen)/lib/qt-5*/plugins/kcms/kcm_kscreen.so):${QT_PLUGIN_PATH} kcmshell5 kscreen

@ttuegel
Copy link
Member

ttuegel commented Feb 16, 2020

But in any case, it's a problem that plasma doesn't set this correctly and of course that we get segfaults when using the proper theme.

@peterhoeg Do you have any idea how Plasma is supposed to set this? I don't see reference to QT_QUICK_CONTROLS_STYLE in any obvious place. The segfault with the theme set is likely due to some plugin mismatch.

@ttuegel
Copy link
Member

ttuegel commented Feb 17, 2020

The segfault with the theme set is likely due to some plugin mismatch.

This part is easy: we haven't actually packaged kdeFrameworks.qqc2-desktop-style, as required by plasma-desktop and others!

@peterhoeg
Copy link
Member

It looks like we have 3 issues:

  1. systemsettings crashes due to missing plugins, ie: incorrect QT_PLUGIN_PATH

  2. entries in QT_PLUGIN_PATH are duplicated

$ echo $QT_PLUGIN_PATH | tr ':' "\n" | wc -l
90

$ echo $QT_PLUGIN_PATH | tr ':' "\n" | sort -u | wc -l
49
  1. qqc2-desktop is not packaged (and used) to provide default look and feel of qtquick2 components: https://www.archlinux.org/packages/extra/x86_64/qqc2-desktop-style/ But despite showing on the arch package as being a dependency of plasma-integration, our plasma-integration package doesn't use it for anything. See the wip pr.

@peterhoeg
Copy link
Member

peterhoeg commented May 14, 2020

Cherry-picking the commit from #80521 and setting QT_QUICK_CONTROLS_STYLE=Plasma makes it work for me.

Why we have to set that variable, I cannot say. If somebody else can confirm that it fixes it for them, we can fix the nixos module as a workaround.

@peterhoeg
Copy link
Member

peterhoeg commented May 14, 2020 via email

@schmittlauch
Copy link
Member

@peterhoeg At a quick glance it looks like #80521 hasn't yet been backported to stable. Are there still plans to do so?

@peterhoeg
Copy link
Member

Backported - I guess we can close this now.

@solson
Copy link
Member

solson commented Oct 12, 2020

How are we supposed to get the fix? For me (on nixos-unstable), it still looks like the widgets in the original post:
image

With a manually-specified QT_QUICK_CONTROLS_STYLE=Plasma it applies a native widget look, but it's broken in a different way (see "Orientation"):
image

Am I missing something, or can we reopen this issue?

@eliasp
Copy link
Member

eliasp commented Oct 12, 2020

Am I missing something, or can we reopen this issue?

Same for me - re-opening for now.

@eliasp eliasp reopened this Oct 12, 2020
@peterhoeg
Copy link
Member

Are you guys still seeing this? The only time I've seen anything remotely similar over these last few months, is in case of nixos-rebuild switch where plasma or qt versions have been changed. A reboot/logout always solved it.

@WizardUli
Copy link

Are you guys still seeing this? The only time I've seen anything remotely similar over these last few months, is in case of nixos-rebuild switch where plasma or qt versions have been changed. A reboot/logout always solved it.

Its still there and always has been since I've started using NixOS a ~month ago but I'm on nixos stable 20.09.

@solson
Copy link
Member

solson commented Feb 25, 2021

This appears to be totally fixed for me on nixos-unstable:

image

I'll close the issue for now — please speak up if the issue still affects you on the latest nixos-unstable. Presumably, the fix should hit the next stable release in March, as well.

@solson solson closed this as completed Feb 25, 2021
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/kde-widgets-look-off-on-a-freshly-installed-nixos/13098/2

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/who-uses-nixos-with-kde/18212/41

@anund anund mentioned this issue Nov 26, 2022
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants