GTK plasma theme not being applied on wayland

garuda-inxi
System:
  Kernel: 6.2.10-273-tkg-bmq arch: x86_64 bits: 64 compiler: gcc v: 12.2.1
    parameters: intel_pstate=passive split_lock_detect=off intel_pstate=passive
    BOOT_IMAGE=/@/boot/vmlinuz-linux-linux-tkg-bmq-generic_v3
    root=UUID=53e270ad-dfd5-4874-a125-69d21ada6b8d rw rootflags=subvol=@
    rd.udev.log_priority=3 vt.global_cursor_default=0 loglevel=3
    sysrq_always_enabled=1 amdgpu.ppfeaturemask=0xffffffff nowatchdog
    nmi_watchdog=0 initrd=@\boot\initramfs-linux-tkg-bmq-generic_v3.img
  Desktop: KDE Plasma v: 5.27.4 tk: Qt v: 5.15.8 wm: kwin_wayland vt: 2
    dm: N/A Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Desktop Mobo: ASRock model: X470 Taichi serial: <superuser required>
    UEFI: American Megatrends v: P5.10 date: 10/20/2022
Battery:
  Device-1: hidpp_battery_0 model: Logitech Wireless Mouse MX Master 3
    serial: <filter> charge: 50% (should be ignored) rechargeable: yes
    status: discharging
CPU:
  Info: model: AMD Ryzen 5 5600X bits: 64 type: MT MCP arch: Zen 3+ gen: 4
    level: v3 note: check built: 2022 process: TSMC n6 (7nm) family: 0x19 (25)
    model-id: 0x21 (33) stepping: 2 microcode: 0xA20120A
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 3 MiB desc: 6x512 KiB
    L3: 32 MiB desc: 1x32 MiB
  Speed (MHz): avg: 3646 high: 3700 min/max: 2200/4650 boost: enabled
    scaling: driver: acpi-cpufreq governor: performance cores: 1: 3597 2: 3592
    3: 3600 4: 3593 5: 3595 6: 3700 7: 3585 8: 3700 9: 3700 10: 3700 11: 3700
    12: 3700 bogomips: 88890
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities: <filter>
Graphics:
  Device-1: AMD Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT]
    vendor: Gigabyte driver: amdgpu v: kernel arch: RDNA-2 code: Navi-2x
    process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 4 speed: 16 GT/s
    lanes: 16 ports: active: DP-1,HDMI-A-1,HDMI-A-2 empty: DP-2
    bus-ID: 10:00.0 chip-ID: 1002:73df class-ID: 0300
  Display: wayland server: X.org v: 1.21.1.8 with: Xwayland v: 23.1.1
    compositor: kwin_wayland driver: X: loaded: amdgpu
    unloaded: modesetting,radeon alternate: fbdev,vesa dri: radeonsi
    gpu: amdgpu d-rect: 5120x1728 display-ID: 0
  Monitor-1: DP-1 pos: bottom-r res: 2048x864 size: N/A modes: N/A
  Monitor-2: HDMI-A-1 pos: top-center res: 1536x864 size: N/A modes: N/A
  Monitor-3: HDMI-A-2 pos: primary,top-left res: 1536x864 size: N/A
    modes: N/A
  API: OpenGL v: 4.6 Mesa 23.0.2 renderer: AMD Radeon RX 6700 XT (navi22
    LLVM 15.0.7 DRM 3.49 6.2.10-273-tkg-bmq) direct-render: Yes
Audio:
  Device-1: AMD Navi 21/23 HDMI/DP Audio driver: snd_hda_intel v: kernel pcie:
    bus-ID: 2-4.1:4 chip-ID: 054c:0e53 gen: 4 class-ID: 0a00 speed: 16 GT/s
    lanes: 16 bus-ID: 10:00.1 chip-ID: 1002:ab28 class-ID: 0403
  Device-2: AMD Starship/Matisse HD Audio vendor: ASRock
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 12:00.4 chip-ID: 1022:1487 class-ID: 0403
  Device-3: Sony INZONE H9 / H7 type: USB
    driver: cdc_acm,hid-generic,snd-usb-audio,usbhid
  API: ALSA v: k6.2.10-273-tkg-bmq status: kernel-api with: aoss
    type: oss-emulator tools: N/A
  Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
  Server-2: PipeWire v: 0.3.68 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Dual Band Wireless-AC 3168NGW [Stone Peak] driver: iwlwifi
    v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 bus-ID: 08:00.0
    chip-ID: 8086:24fb class-ID: 0280
  IF: wlp8s0 state: down mac: <filter>
  Device-2: Intel I211 Gigabit Network vendor: ASRock driver: igb v: kernel
    pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: d000 bus-ID: 0a:00.0
    chip-ID: 8086:1539 class-ID: 0200
  IF: enp10s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IF-ID-1: virbr0 state: down mac: <filter>
Bluetooth:
  Device-1: Edimax Bluetooth Adapter type: USB driver: btusb v: 0.8
    bus-ID: 2-1:2 chip-ID: 7392:c611 class-ID: e001 serial: <filter>
  Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter>
Drives:
  Local Storage: total: 2.96 TiB used: 2.38 TiB (80.4%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:3 vendor: Samsung model: SSD 980 1TB
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 type: SSD serial: <filter> rev: 3B4QFXO7 temp: 41.9 C scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:0 vendor: Samsung model: SSD 970 EVO 250GB
    size: 232.89 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 type: SSD serial: <filter> rev: 2B2QEXE7 temp: 34.9 C scheme: GPT
  ID-3: /dev/sda maj-min: 8:0 vendor: Seagate model: ST2000DX002-2DV164
    size: 1.82 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    type: HDD rpm: 7200 serial: <filter> rev: CC41 scheme: GPT
Partition:
  ID-1: / raw-size: 931.22 GiB size: 931.22 GiB (100.00%)
    used: 814.05 GiB (87.4%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:5
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 25.5 MiB (8.5%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:4
  ID-3: /home raw-size: 931.22 GiB size: 931.22 GiB (100.00%)
    used: 814.05 GiB (87.4%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:5
  ID-4: /var/log raw-size: 931.22 GiB size: 931.22 GiB (100.00%)
    used: 814.05 GiB (87.4%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:5
  ID-5: /var/tmp raw-size: 931.22 GiB size: 931.22 GiB (100.00%)
    used: 814.05 GiB (87.4%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:5
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 50 (default 100)
  ID-1: swap-1 type: zram size: 31.27 GiB used: 1.96 GiB (6.3%)
    priority: 100 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 48.8 C mobo: 37.0 C gpu: amdgpu temp: 58.0 C
    mem: 60.0 C
  Fan Speeds (RPM): cpu: 1304 fan-1: 0 fan-3: 1325 fan-4: 1473 fan-5: 1244
    gpu: amdgpu fan: 0
  Power: 12v: N/A 5v: N/A 3.3v: 3.20 vbat: 3.28 gpu: amdgpu watts: 27.00
Info:
  Processes: 463 Uptime: 29m wakeups: 5 Memory: 31.27 GiB
  used: 14.12 GiB (45.2%) Init: systemd v: 253 default: graphical
  tool: systemctl Compilers: gcc: 12.2.1 clang: 15.0.7 Packages: 2550
  pm: pacman pkgs: 2522 libs: 586 tools: octopi,paru pm: appimage pkgs: 0
  pm: flatpak pkgs: 28 Shell: fish v: 3.6.1 default: Bash v: 5.1.16
  running-in: alacritty inxi: 3.3.26
Garuda (2.6.16-1):
  System install date:     2023-03-05
  Last full system update: 2023-04-08
  Is partially upgraded:   No
  Relevant software:       snapper NetworkManager dracut
  Windows dual boot:       Probably (Run as root to verify)
  Failed units:            systemd-networkd-wait-online.service systemd-oomd.socket

GTK apps are using the default black cursor and gtk theme instead of what I specify in plasma. tried flowing these instrucitons to no avail

https://wiki.archlinux.org/title/Wayland#GTK_themes_not_working

https://wiki.archlinux.org/title/KDE#Plasma_cursor_sometimes_shown_incorrectly

Let's back track a little. If you specify the Garuda default of Sweet-Dark as GTK theme, do GTK apps use it?

EDIT: Second question, what behavior differences do you see between Wayland and X11?

1 Like

No even though I have the default sweet-dark set as my GTK theme in System Settings -> Apperance -> Application Style - > GTK application Style It does not use that theme in GTK apps

It also does not use the cursor theme I specify in the System Settings -> Apperance -> Cursors

On X11 this does work as expected

EDIT:
non GTK apps use sweet dark and my selected cursor theme (material light) as expected

Quite weird. Are ALL GTK apps having this issue?

What is the output of cat ~/.gtkrc-2.0

Thirdly, name me an app that does not work, I have a command to ask you to perform using that app for testing.

cat ~/.gtkrc-2.0
File: /home/zany130/.gtkrc-2.0
gtk-theme-name="Sweet-Dark"
gtk-enable-animations=1
gtk-primary-button-warps-slider=1
gtk-toolbar-style=3
gtk-menu-images=1
gtk-button-images=1
gtk-cursor-theme-size=32
gtk-cursor-theme-name="material_light_cursors"
gtk-icon-theme-name="BeautyLine"
gtk-font-name="Fira Sans,  10"

It seems it is affecting all GTK apps, at least all those I have tried (lutris, steamtinkerlaunch, input-remapper)

Are you sure you changed the theme here?

Either way, you could manually edit the file and replace Sweet-Dark with the EXACT name of your GTK Theme.
I don't think you need to relogin but plz do so just in case.

Other thing you can try is open up your favorite Terminal window and hit this:

GTK_THEME=emacs input-remapper

Did it change the theme?

image
is what I have

Strangely setting GTK_THEME=Sweet-Dark input-remapper-gtk does make it use the Sweet-Dark theme like I want it to

same for lutris

Ok let's back track again. loll Which GTK Theme you want to use? Sweet-Dark?
Cuz you mentioned it was reverting to the default theme, in Garuda the default is Sweet-Dark. Maybe you meant Plasma's default?

yeah sorry should of been more specific I meant the default GTK theme think its adweta or something? this one

I want it to use sweet dark to match the rest of the garuda theme( along with material light cursors)

1 Like

Ok I get it, I have the same behavior!

I installed input-remapper to test.
This app uses an Ubuntu-like theme and launches asking for root PW.
Does lutris and your other GTK apps ask for root PW as well?

no lutris doesn't use root so I don't think that's why...

There may be something those apps do that is different in Wayland than X11, or maybe they are XWayland (or not!) and it works differently.

As a workaround, I believe you could edit your launcher and add the env variable I provided above. Do you know how to edit an app icon?

Yeah, that could be a solution. The strange thing is that is exactly what the GTK_themes_not_working link I posted in the op should be resolving. It links to a sway wiki where it mentions gtk apps having issues reading your gtk configs in Wayland and suggests a script to fix this. I guess the gsettings stuff doesn't work here?

EDIT: I could prob add the env for the GTK theme stuff to my bashrc or something too...

EDIT2: only works for GTK theme "While this is quite simple, it's also fairly limited, since there are no environment variables to set other settings, like icon/cursor themes."

Hum not sure about gsettings, it is installed on Garuda but I have no idea how well or bad it works with Wayland.

True you would not get the cursor in those apps.
Strange, Remmina works perfect including the cursor. Not sure what's different between your apps and Remmina and what's common between your apps that Remmina doesn't have.

Maybe there's another file (bashrc like you said) where this can be set, or maybe it uses a predefined theme located in root subvolume.
I see input-remapper uses a style.css and removing that file you get everything in CLI, no GUI.

I don't know much about all that, hopefully someone with more experience in this can chime in.

EDIT: Plasma, oh Plasma... one of the most famous Plasma integration issue: GTK apps running in Plasma not following the theme. :slight_smile: This is as old as KDE and GTK got along with each other.

1 Like

yeah tbh don't know too much either :sweat_smile: I just know how to find solutions online and follow them, but yeah tried doing some of the gsettings stuff they mention there manually, and I don't think it works the same way here at least not on Wayland plasma

EDIT: ah really maybe I should have checked if there were any open issues on the kde tracker for this :thinking:

1 Like

That is one very important thing to do. Although sometimes they just don't seem to work. lol

Yes that's a good idea. Opening one is also possible, since it works in X11!

Could be this issue 459468 – Certain Xwayland apps do not respect third-party cursor theme on Wayland

1 Like

That's a nice find! Tnx for sharing.
This seems specific to cursor themes but maybe App theme is related too.