Qt apps does not work after fresh install

Hi, I'm new to Garuda and tryng out the Sway edition. After a fresh install, it seems I cannot start a few Qt-applications. When clicking their icons, a text box appears where I'm to enter password but nothing happens.

Any suggestions as to solve this?

When trying from terminal, I get the following:

$ lxqt-sudo btrfs-assistant
"Icon Theme not set. Fallbacking to Oxygen, if installed"
"Fallback Icon Theme (Oxygen) not found"
kf.windowsystem: Could not find any platform plugin

Authorization required, but no authorization protocol specified
qt.qpa.xcb: could not connect to display :0
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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

/usr/bin/btrfs-assistant: line 22: 10034 Aborted                 (core dumped) btrfs-assistant-bin ${params}

here is the output from garuda-inixi:

System:
  Kernel: 5.17.1-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 11.2.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=195d67a3-d3a0-4c73-9415-42c06def7a67 rw [email protected]
    quiet
    cryptdevice=UUID=6fd2cdb1-7e23-446e-9ed8-45f0eac1c05a:luks-6fd2cdb1-7e23-446e-9ed8-45f0eac1c05a
    root=/dev/mapper/luks-6fd2cdb1-7e23-446e-9ed8-45f0eac1c05a quiet splash
    rd.udev.log_priority=3 vt.global_cursor_default=0 loglevel=3
  Desktop: sway v: 1.7 info: waybar vt: 1 dm: greetd Distro: Garuda Linux
    base: Arch Linux
Machine:
  Type: Desktop System: Exertis_CapTech product: N/A v: N/A
    serial: <superuser required>
  Mobo: ASUSTeK model: ROG STRIX X399-E GAMING v: Rev 1.xx
    serial: <superuser required> UEFI: American Megatrends v: 1206
    date: 07/15/2021
CPU:
  Info: model: AMD Ryzen Threadripper 1900X bits: 64 type: MT MCP MCM
    arch: Zen family: 0x17 (23) model-id: 1 stepping: 1 microcode: 0x8001137
  Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 dies: 2 smt: enabled
    cache: L1: 768 KiB desc: d-8x32 KiB; i-8x64 KiB L2: 4 MiB desc: 8x512 KiB
    L3: 16 MiB desc: 2x8 MiB
  Speed (MHz): avg: 1931 high: 2553 min/max: 2200/3800 boost: enabled
    scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 2123 2: 1815
    3: 1716 4: 1715 5: 1889 6: 1889 7: 1889 8: 1927 9: 2553 10: 1992 11: 1842
    12: 1789 13: 1888 14: 1887 15: 2109 16: 1886 bogomips: 121357
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2
    mitigation: Retpolines, IBPB: conditional, STIBP: disabled, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]
    vendor: ASUSTeK driver: amdgpu v: kernel pcie: gen: 3 speed: 8 GT/s
    lanes: 16 ports: active: DP-2 empty: DP-1, DVI-D-1, HDMI-A-1, HDMI-A-2
    bus-ID: 0a:00.0 chip-ID: 1002:67df class-ID: 0300
  Device-2: AMD Baffin [Radeon RX 550 640SP / 560/560X]
    vendor: Micro-Star MSI driver: amdgpu v: kernel pcie: gen: 3 speed: 8 GT/s
    lanes: 8 ports: active: DP-3,HDMI-A-3 empty: DVI-D-2 bus-ID: 42:00.0
    chip-ID: 1002:67ff class-ID: 0300
  Display: wayland server: Xwayland v: 22.1.1 compositor: sway v: 1.7
    driver: gpu: amdgpu d-rect: 11520x2160 display-ID: 1
  Monitor-1: DP-2 pos: right model: Philips PHL 278E1 serial: <filter>
    built: 2020 res: 3840x2160 hz: 60 dpi: 163 gamma: 1.2 scale: 1
    size: 597x336mm (23.5x13.23") diag: 685mm (27") ratio: 16:9 modes:
    max: 3840x2160 min: 720x400
  Monitor-2: DP-3 pos: primary,left model: Dell P2415Q serial: <filter>
    built: 2018 res: 3840x2160 hz: 60 dpi: 185 gamma: 1.2 scale: 1
    size: 527x296mm (20.75x11.65") diag: 604mm (23.8") ratio: 16:9 modes:
    max: 3840x2160 min: 720x400
  Monitor-3: HDMI-A-3 pos: center model: Philips PHL 278E1 serial: <filter>
    built: 2020 res: 3840x2160 hz: 60 dpi: 163 gamma: 1.2 scale: 1
    size: 597x336mm (23.5x13.23") diag: 685mm (27") ratio: 16:9 modes:
    max: 3840x2160 min: 720x400
  Message: Wayland GBM/EGL data currently not available.
Audio:
  Device-1: AMD Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590]
    vendor: ASUSTeK driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s
    lanes: 16 bus-ID: 0a:00.1 chip-ID: 1002:aaf0 class-ID: 0403
  Device-2: AMD Family 17h HD Audio vendor: ASUSTeK driver: snd_hda_intel
    v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16 bus-ID: 0c:00.3
    chip-ID: 1022:1457 class-ID: 0403
  Device-3: AMD Baffin HDMI/DP Audio [Radeon RX 550 640SP / 560/560X]
    vendor: Micro-Star MSI driver: snd_hda_intel v: kernel pcie: gen: 3
    speed: 8 GT/s lanes: 8 bus-ID: 42:00.1 chip-ID: 1002:aae0 class-ID: 0403
  Sound Server-1: ALSA v: k5.17.1-zen1-1-zen running: yes
  Sound Server-2: sndio v: N/A running: no
  Sound Server-3: PulseAudio v: 15.0 running: no
  Sound Server-4: PipeWire v: 0.3.49 running: yes
Network:
  Device-1: Realtek RTL8822BE 802.11a/b/g/n/ac WiFi adapter vendor: ASUSTeK
    driver: rtw_8822be v: N/A modules: rtw88_8822be pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 port: 2000 bus-ID: 03:00.0 chip-ID: 10ec:b822
    class-ID: 0280
  IF: wlp3s0 state: down mac: <filter>
  Device-2: Intel I211 Gigabit Network vendor: ASUSTeK driver: igb
    v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: 1000 bus-ID: 05:00.0
    chip-ID: 8086:1539 class-ID: 0200
  IF: enp5s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Bluetooth:
  Device-1: ASUSTek Bluetooth Radio type: USB driver: btusb v: 0.8
    bus-ID: 1-2:2 chip-ID: 0b05:185c class-ID: e001 serial: <filter>
  Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter>
Drives:
  Local Storage: total: 4.55 TiB used: 7.32 GiB (0.2%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:1 vendor: Samsung
    model: SSD 970 EVO 500GB size: 465.76 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 2B2QEXE7 temp: 43.9 C scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:0 vendor: Samsung
    model: SSD 960 EVO 500GB size: 465.76 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 3B7QCXE7 temp: 34.9 C scheme: GPT
  ID-3: /dev/sda maj-min: 8:0 type: USB vendor: Seagate model: BUP RD
    size: 3.64 TiB block-size: physical: 4096 B logical: 512 B type: N/A
    serial: <filter> rev: 0304 scheme: GPT
Partition:
  ID-1: / raw-size: 465.26 GiB size: 465.26 GiB (100.00%)
    used: 7.32 GiB (1.6%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-6fd2cdb1-7e23-446e-9ed8-45f0eac1c05a
  ID-2: /boot/efi raw-size: 512 MiB size: 511 MiB (99.80%)
    used: 720 KiB (0.1%) fs: vfat dev: /dev/nvme1n1p1 maj-min: 259:2
  ID-3: /home raw-size: 465.26 GiB size: 465.26 GiB (100.00%)
    used: 7.32 GiB (1.6%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-6fd2cdb1-7e23-446e-9ed8-45f0eac1c05a
  ID-4: /var/log raw-size: 465.26 GiB size: 465.26 GiB (100.00%)
    used: 7.32 GiB (1.6%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-6fd2cdb1-7e23-446e-9ed8-45f0eac1c05a
  ID-5: /var/tmp raw-size: 465.26 GiB size: 465.26 GiB (100.00%)
    used: 7.32 GiB (1.6%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-6fd2cdb1-7e23-446e-9ed8-45f0eac1c05a
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 15.56 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 48.5 C mobo: 37.0 C
  Fan Speeds (RPM): cpu: 2343 case-1: 0 case-2: 0 case-3: 0 fan-1: 536
  GPU: device: amdgpu temp: 45.0 C fan: 1190 watts: 16.12 device: amdgpu
    temp: 49.0 C fan: 1466 watts: 27.07
  Power: 12v: 11.90 5v: N/A 3.3v: N/A vbat: 3.03
Info:
  Processes: 457 Uptime: 50m wakeups: 0 Memory: 15.56 GiB
  used: 2.54 GiB (16.3%) Init: systemd v: 250 tool: systemctl Compilers:
  gcc: 11.2.0 Packages: pacman: 1161 lib: 297 Shell: fish v: 3.4.1
  default: Bash v: 5.1.16 running-in: alacritty inxi: 3.3.14
Garuda (2.6.1-1):
  System install date:     2022-04-07
  Last full system update: 2022-04-08 ↻
  Is partially upgraded:   No
  Relevant software:       NetworkManager
  Windows dual boot:       No/Undetected
  Snapshots:               Snapper
  Failed units:

Edit: running sudo -E btrfs-assistant-bin works instead. Still, it does not launch from the Garuda Welcome Dialouge (or whatever it is called). Same thing for garuda-settings-manager and garuda-network-assistant.

So I've been sorta debugging the Wayland GNOME Session environment variables and I had this issue come up with some Qt apps under Wayland. If QT_QPA_PLATFORM=xcb is getting set somewhere, this may be what's causing the issue, specifically that Could not load the Qt platform plugin "xcb" in "" even though it was found. error message.

What is the output of printenv (or printenv | grep QT if you just want the relevant ones)?

If no Qt-specific env vars appear to be set, I would check the .desktop files for whichever apps are failing, in case Wayland-breaking flags are getting passed there.

If it's just apps that need authentication, and running with sudo and no other flags works, there was another issue where the app gets passed, among other things,HOME, and using HOME=$HOME in the .desktop file for the elevated app sets this to /root, but the app seems to want the user's homedir, so replacing that with HOME=/home/yourusername might make it work.

EDIT: Checked this against my notes about this, looks exactly like the errors I was seeing due to the HOME case so it might not be the first two problems. I'd still check, and I don't remember where they were on the system but the .desktop files seem the most likely issue? Not sure why some of this is written differently for some apps than others. Also, more out of my own curiosity, does Garuda Boot Options launch successfully from the Garuda Welcome app, but not from the desktop icon?

1 Like

Try

sudo -E btrfs-assistant

ok, see your edit now

Thanks for trying to help out. The output from printenv is:

QT_QPA_PLATFORMTHEME=qt5ct
QT_QPA_PLATFORM=wayland

I cannot click the "icons" in the Garuda Welcome app. I run Sway, so there is no desktop icons.

Seems I have no .desktop file in my home dir... Is there supposed to be one? And what would it do? (I'm used to a pretty core Arch/sway and there are no desktop settings there by default, but got a bit tired of managing it and thought I should try Garuda out).

Please, make do with the emergency solution until the problem is solved.

Clicking the buttons in welcome works for me (in sway).

Reboot if you have not already done so.

2 Likes

Thank you. No problem with the emergency solution! Just wanted to raise this as an issue if it was not known (since I did a fresh install and also re-install and it was the same both times). I've updated and restarted and everyhing.

Are you saying Btrfs Assistant launches from the GUI button in the menu on your machine?

1 Like

Oops,

I can click the icons (they work), but click on BTRFS Assistant do not work.
Maybe a translation problem??? :smiley:

Sorry for the unclarity. I can click the icons, then I get to enter sudo password, after that nothing seems to happen for some apps (like BTRFS Assistant and Garuda Settings Manager). See above how it runs from command line. This is both from the Welcome app and the App launcher thing :slight_smile:

I do not why this happens but this section of the wiki explains it Home · swaywm/sway Wiki · GitHub or at least gives the solution.

To be honest I'm not sure why.

But welcome to Garuda!

3 Likes

Just be aware that means that you are taking your entire user environment and accessing a root application with it. It depends on the application but for some applications that could mean that files in your home directory end up being owned by root.

From your link, I also see this.

As a Sway user, all you probably need to do is run any one of the polkit auth agents. When a polkit auth agent is running you will get a prompt when an application supports Polkit and needs administrative permissions for some actions.

Both Garuda Assistant and Btrfs Assistant use polkit so I wonder if this isn't part of the issue.

1 Like

There are other apps in Sway that successfully launch from the GUI and authenticate with the Gnome polkit popup. So I feel like there is something else to it...:thinking:

1 Like

Sample in i3wm

-E

only sudo

Dos not start via dmenu,

but work fine in KDE, IDK :smiley:

btrfs-assistant-git-1.3.r0.ga97043b-1

It should look like that in more or less any environment with a plain sudo like that.

If you want to use sudo and care about theming you would need to try something like:

sudo btrfs-assistant --xdg-desktop=$XDG_CURRENT_DESKTOP 
3 Likes

Yeh. I don't actually understand why it doesn't work.

I just know using -E makes it work so I always thought that. Will correct my reply!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.

Sorry for the late reply, I could only test today and nothing works.

Not even from the garuda-assistant.

 ╭─[email protected] in ~ as 🧙 took 2m24s
 ╰─λ sudo -E btrfs-assistant
Failed to create wl_display (No such file or directory)
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" 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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

/usr/bin/btrfs-assistant: Zeile 22:  9687 Abgebrochen             (Speicherabzug geschrieben) btrfs-assistant-bin ${params}

 ╭─[email protected] in ~ as 🧙 took 72ms
[⚡] × sudo btrfs-assistant
Authorization required, but no authorization protocol specified
qt.qpa.xcb: could not connect to display :0
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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

/usr/bin/btrfs-assistant: Zeile 22:  9794 Abgebrochen             (Speicherabzug geschrieben) btrfs-assistant-bin ${params}

Version

btrfs-assistant-git-1.3.r2.gd3ed9ba-1
 ╭─[email protected] in ~ as 🧙 took 64ms
[⚡] × sudo btrfs-assistant --xdg-desktop=$XDG_CURRENT_DESKTOP
Authorization required, but no authorization protocol specified
qt.qpa.xcb: could not connect to display :0
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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

/usr/bin/btrfs-assistant: Zeile 22: 10266 Abgebrochen             (Speicherabzug geschrieben) btrfs-assistant-bin ${params}
 ╭─[email protected] in ~ as 🧙 took 58ms
[⚡] × su
Passwort: 
[[email protected] sgs]# btrfs-assistant --xdg-desktop=$XDG_CURRENT_DESKTOP
Failed to create wl_display (No such file or directory)
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" 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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

/usr/bin/btrfs-assistant: Zeile 22:  3880 Abgebrochen

Maybe someone know which platform plugins are needed or help.

A couple weeks ago I was testing the git version of Btrfs Assistant (here) on Sway and I had narrowed it down to these environment variables:

export XDG_RUNTIME_DIR=/run/user/1000
export QT_QPA_PLATFORMTHEME=qt5ct
export QT_QPA_PLATFORM=wayland
export WAYLAND_DISPLAY=wayland-1

By adding these lines to /usr/bin/btrfs-assistant before the call to btrfs-assistant-bin it would launch from the command line with sudo.

I noticed it will run without export QT_QPA_PLATFORMTHEME=qt5ct , but it will not express the theming (it runs as a plain grey windowed app).

I haven't tested it since then, so I'm not sure if this method holds up with the changes that have been added to Btrfs Assistant in the past couple weeks.

2 Likes
 ╭─[email protected] in ~ as 🧙 
 ╰─λ sudo btrfs-assistant
QStandardPaths: runtime directory '/run/user/1000' is not owned by UID 0, but a directory permissions 0700 owned by UID 1000 GID 1000
("btrfs", "", "", "", "", "", "", "/")
("btrfs", "", "", "", "", "", "", "/home")
("btrfs", "", "", "", "", "", "", "/root")
("btrfs", "", "", "", "", "", "", "/srv")
("btrfs", "", "", "", "", "", "", "/var/cache")
("btrfs", "", "", "", "", "", "", "/var/log")
("btrfs", "", "", "", "", "", "", "/var/tmp")
("btrfs", "", "", "", "", "", "", "/tmp/Btrfs", "Assistant-ANGAiW")
kf.windowsystem: Could not find any platform plugin

export XDG_CURRENT_DESKTOP
export XDG_RUNTIME_DIR=$(mktemp -d)
export XDG_RUNTIME_DIR=/run/user/1000
export QT_QPA_PLATFORMTHEME=qt5ct
export QT_QPA_PLATFORM=wayland
export WAYLAND_DISPLAY=wayland-1
btrfs-assistant-bin ${params}

Maybe I must change somewhere the transparency value?
I do not like it with my old eyes.