NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.42k stars 13.63k forks source link

Protonup-qt does not start #316005

Open vavakado opened 3 months ago

vavakado commented 3 months ago

Describe the bug

On launch protonup-qt tells that it couldn't load qt platform.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install protonup-qt
  2. Try to launch it

Expected behavior

Working protonup-qt

Additional context

ProtonUp-Qt 2.9.2 by DavidoTek. Build Info: Official AppImage by DavidoTek.
Python 3.10.4 (main, Apr  2 2022, 09:04:19) [GCC 11.2.0], PySide 6.7.0
Platform: 1;34 https://github.com/NixOS/nixpkgs/issues Linux-6.6.31-x86_64-with-glibc2.39
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

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

Notify maintainers

@michaelBelsanti

Metadata

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

❯ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.31, NixOS, 24.11 (Vicuña), 24.11.20240529.ad57eef`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/store/qgbn0imyridkb9527v6gnv6z3jzzprb9-source`

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

michaelBelsanti commented 3 months ago

I am not having this problem, is this happening for you with any other QT apps?

vavakado commented 3 months ago

No, ie lxqt.qterminal launches with no problem.

vavakado commented 3 months ago

Weird, I just tested it on wayland(hyprland) and it ran with no problem.

michaelBelsanti commented 3 months ago

What were you running initially? I can try testing it.

vavakado commented 3 months ago

On x11 with herbstluftwm

guttermonk commented 3 months ago

Same issue here on hyprland. I have these related env variables set:

environment.sessionVariables = { QT_AUTO_SCREEN_SCALE_FACTOR = "1"; QT_QPA_PLATFORM = "xcb"; QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; XDG_CURRENT_DESKTOP = "Hyprland"; XDG_SESSION_DESKTOP = "Hyprland"; XDG_SESSION_TYPE = "wayland"; };

When I run QT_DEBUG_PLUGINS=1 protonup-qt, I get the following output: https://pastebin.com/qYDqaKgv

These thread suggest defining the QT_QPA_PLATFORM_PLUGIN_PATH variable, but neither worked for me: https://discourse.nixos.org/t/python-qt-qpa-plugin-could-not-find-xcb/8862 https://discourse.nixos.org/t/how-can-i-build-a-python-package-that-uses-qt/7657

michaelBelsanti commented 3 months ago

I believe on Hyprland it's recommended to set QT_QPA_PLATFORM = "wayland;xcb". That will default to using QTs Wayland backend and fall back to X11.

Thanks for sharing the output, I'll have a look.

guttermonk commented 3 months ago

Adding wayland to QT_QPA_PLATFORM gave me the same result.

In regards to the Could not find the Qt platform plugin "xcb" in "", the NixOS wiki on Qt says, "The package will need to be fixed to use [the new https://github.com/NixOS/nixpkgs/issues/65399 wrapQtAppsHook]. The hook wraps every qt application with adding QT_PLUGIN_PATH and XDG_DATA_DIRS as well as XDG_CONFIG_DIRS.See wrap-qt-apps-hook.sh in nixpkgs

michaelBelsanti commented 3 months ago

I believe on Hyprland it's recommended to set QT_QPA_PLATFORM = "wayland;xcb". That will default to using QTs Wayland backend and fall back to X11.

Thanks for sharing the output, I'll have a look.

skoove commented 3 months ago

i am also having the same issue

[zie@nixos:~/.dotfiles]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.32, NixOS, 24.11 (Vicuña), 24.11.20240605.e8057b6`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - channels(root): `"nixos-24.05"`
 - nixpkgs: `/nix/store/8s55w0927lh3mdbkxf434zb0c5hqsz8z-source`

forgot to add, im on x11 with i3-gaps

guttermonk commented 3 months ago

Update: looks like QT_QPA_PLATFORM = "wayland;xcb" only registers after a reboot. So that part is working, but now I have a new error that I'm not sure how to solve: Cannot mix incompatible Qt library (6.7.1) with this library (6.7.0)

pluiedev commented 3 months ago

Probably mismatched Qt versions between what protonup-qt is built against and what your system currently has. (Happens with Mesa a lot too) Try updating your system to use a newer version of Nixpkgs, or build protonup-qt with a newer version of Nixpkgs

guttermonk commented 3 months ago

@pluiedev I think you're right. I installed the protonup-qt flatpak and it works fine.

Celibistrial commented 1 month ago

Encountering the same issue with an upgraded system(X11 I3wm)