NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.48k stars 12.98k forks source link

skanpage: failing to start on sway #305959

Open LordGrimmauld opened 2 months ago

LordGrimmauld commented 2 months ago

Describe the bug

The kde package skanpage (both kde package and qt5 versions) fail to start if kde is not fully installed. The KDE package fails to find a wayland platform plugin (hinting at missing qt wrapping), while the qt5 version complains about missing kirigami before doing absolutely nothing but not terminating or opening a gui either.

Steps To Reproduce

Steps to reproduce the behavior:

  1. don't be on kde (i am on a relatively minimalistic sway, using vulkan renderer)
  2. add skanpage to the packages (either kde or qt5 versions; not specifying will default to qt5 version)
  3. launch skanpage from cli to get log
  4. crash

Expected behavior

Skanpage should start as usual.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

kdePackages.skanpage log:

qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb, linuxfb, minimalegl, eglfs, offscreen, minimal, vnc, vkkhrdisplay.

Aborted (core dumped)

libsForQt5.skanpage log:

QQmlApplicationEngine failed to load component
qrc:/qml/MainWindow.qml:389:9: Type Kirigami.AboutItem unavailable
file:///nix/store/mi0xg41b2rwxcqv87x8v7zhvycd8axkf-kirigami2-5.115.0/lib/qt-5.15.12/qml/org/kde/kirigami.2/AboutItem.qml:200:17: Type UrlButton unavailable
file:///nix/store/mi0xg41b2rwxcqv87x8v7zhvycd8axkf-kirigami2-5.115.0/lib/qt-5.15.12/qml/org/kde/kirigami.2/UrlButton.qml:9:1: invalid version plugin, expected <major>.<minor>
^C

If more information about my specific setup is required, https://git.grimmauld.de/Grimmauld/grimm-nixos-laptop/src/commit/984fe942d35b99e8e75df74a1563ffc56e5e503f might help, but i am happy to answer any questions that help resolving this.

Notify maintainers

@K900 pinging you here, you were the one to init skanpage on kdePackages, it hasn't seen any non-trivial traffic since. The Qt5 skanpage does not have maintainers.

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.8.6-zen1, NixOS, 24.05 (Uakari), 24.05.20240419.5c24cf2`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.21.2`
 - channels(root): `"nixos"`
 - channels(grimmauld): `""`
 - nixpkgs: `/nix/store/v4pcs3nzx54m5bmxd39win0rgl2d2hbx-source`

Add a :+1: reaction to issues you find important.

K900 commented 2 months ago

Install qtwayland for now. Adding it to all Qt6 apps is being discussed here: https://github.com/NixOS/nixpkgs/pull/269674

LordGrimmauld commented 2 months ago

Tried that. Both packages still fail to start correctly.

kdePackages.skanpage prints log, then doesn't either terminate or launch anything:

QQmlApplicationEngine failed to load component
qrc:/qml/MainWindow.qml: module "kvantum" is not installed
^C

libsForQt5.skanpage segfaults completely if libsForQt5.kirigami2 is in use, something about gpu drivers and kirigami: https://gist.github.com/LordGrimmauld/96cc7e14a7dc85619ffa56896116c8ab (gist because too long)

The behaviour of libsForQt5.skanpage documented in the first message persists if used in conjunction with kdePackages.kirigami, but doesn't start properly either. And the fact i'd be mising qt libs doesn't feel right.

K900 commented 2 months ago

That sounds like an issue with your platform theme. Does Kvantum even provide a QML style for Qt6?

LordGrimmauld commented 2 months ago

Setting the style to breeze using qt.style doesn't change the qt5 skanpage, kde skanpage now fails with

QQmlApplicationEngine failed to load component
qrc:/qml/MainWindow.qml: module "breeze" is not installed

(despite actually having set the style, as well as having installed kdePackages.breeze when it didn't work at first, but that had no effect)

To note: My own QT6 application (swaymux) has worked perfectly at any point in these experiments, and same holds true for other kde apps like dolphin (although the styling does weird things if i set breeze, but that isn't the point right now). Literally only skanpage is giving me trouble...

eclairevoyant commented 2 months ago

env QT_STYLE_OVERRIDE= nix run nixpkgs#kdePackages.skanpage --impure seems to work for me on sway, despite some (I guess spurious) errors:

qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
kf.kirigami.platform: Failed to find a Kirigami platform plugin for style "Fusion"
Cannot initialize model with data QJsonObject(). missing: QJsonValue(string, "urls")
qrc:/qml/ExportWindow.qml:127: TypeError: Value is null and could not be converted to an object
qrc:/qml/ShareWindow.qml:135: TypeError: Value is null and could not be converted to an object
LordGrimmauld commented 2 months ago

true, force unsetting QT_STYLE_OVERRIDE for skanpage works. Wild. But that also kinda means no styling at all. Sad.