Bad environment variables leads to broken workspace

Hello, ran into an issue with SDDM after the recent (2024-01-13) stable update (most likely?). When I try to login it basically hangs for a few seconds and drops me into a blank screen with the mouse cursor (in its nice little “Breeze” theme though). Plasma session and nouveau driver reports crashes as well. I can still drop into the graphical session by switching TTY and manually running startx .... from there. The following bit is notable as its reported when the login screen is spawned:

...snip...
Jan 13 20:52:50 comrade-arch kernel: sddm-greeter[1017]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set
Jan 13 20:52:53 comrade-arch sddm-greeter[1017]: QObject: Cannot create children for a parent that is in a different thread.
                                                 (Parent is QGuiApplication(0x7ffca79e95b0), parent's thread is QThread(0x55c613150e40), current thread is QThread(0x55c613277740)
Jan 13 20:52:53 comrade-arch sddm-greeter[1017]: QObject: Cannot create children for a parent that is in a different thread.
                                                 (Parent is QGuiApplication(0x7ffca79e95b0), parent's thread is QThread(0x55c613150e40), current thread is QThread(0x55c613277740)
Jan 13 20:52:53 comrade-arch sddm-greeter[1017]: QObject: Cannot create children for a parent that is in a different thread.
                                                 (Parent is QGuiApplication(0x7ffca79e95b0), parent's thread is QThread(0x55c613150e40), current thread is QThread(0x55c613277740)
Jan 13 20:52:53 comrade-arch sddm-greeter[1017]: QObject::installEventFilter(): Cannot filter events for objects in a different thread.
Jan 13 20:53:01 comrade-arch sddm-greeter[1017]: Failed to find a Kirigami platform plugin
Jan 13 20:53:02 comrade-arch sddm-greeter[1017]: file:///usr/share/sddm/themes/breeze/components/VirtualKeyboard.qml:12:1: Type InputPanel unavailable
Jan 13 20:53:02 comrade-arch sddm-greeter[1017]: qrc:/QtQuick/VirtualKeyboard/content/InputPanel.qml:138:5: Type Keyboard unavailable
Jan 13 20:53:02 comrade-arch sddm-greeter[1017]: qrc:/QtQuick/VirtualKeyboard/content/components/Keyboard.qml:38:1: module "QtQuick.VirtualKeyboard.Plugins" is not installed
Jan 13 20:53:02 comrade-arch sddm-greeter[1017]: QDBusConnection: name 'org.freedesktop.UDisks2' had owner '' but we thought it was ':1.24'
...snip...

^ Taken from the output of journalctl --priority=warning..err -b --no-pager when the crash happens (rest of the log: https://termbin.com/lb6f). I am happy to provide any other information if needed. Also, searching some of those keywords landed me on this issue on sddm repo which seems to be the only closest thing i can find.

  • System info:
$ inxi -b
System:
  Host: comrade-arch Kernel: 6.6.10-1-MANJARO arch: x86_64 bits: 64
    Desktop: KDE Plasma v: 5.27.10 Distro: Manjaro Linux
Machine:
  Type: Laptop System: Dell product: Inspiron 3501 v: N/A
    serial: <superuser required>
  Mobo: Dell model: 0MF26F v: A00 serial: <superuser required> UEFI: Dell
    v: 1.27.1 date: 10/03/2023
Battery:
  ID-1: BAT0 charge: 20.5 Wh (96.2%) condition: 21.3/42.0 Wh (50.7%)
CPU:
  Info: quad core 11th Gen Intel Core i5-1135G7 [MT MCP] speed (MHz): avg: 494
    min/max: 400/4200
Graphics:
  Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics] driver: i915 v: kernel
  Device-2: NVIDIA GP108M [GeForce MX330] driver: nouveau v: kernel
  Device-3: Sunplus Innovation Integrated_Webcam_HD driver: uvcvideo
    type: USB
  Display: server: X.Org v: 21.1.10 with: Xwayland v: 23.2.3 driver: X:
    loaded: modesetting dri: iris,nouveau gpu: i915 resolution: 1920x1080~60Hz
  API: OpenGL v: 4.6 compat-v: 4.3 vendor: intel mesa v: 23.3.3-manjaro1.1
    renderer: Mesa Intel Xe Graphics (TGL GT2)
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    driver: r8169
  Device-2: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter
    driver: ath10k_pci
Drives:
  Local Storage: total: 931.51 GiB used: 48.84 GiB (5.2%)
Info:
  Processes: 266 Uptime: 46m Memory: total: 16 GiB note: est.
  available: 15.36 GiB used: 3.56 GiB (23.2%) Shell: Zsh inxi: 3.3.31

Alrighty had to sleep because it was late into the night but I found the cause and fixed it. Issue wasn’t SDDM but a “missing” piece of an environment variable.

I looked at the journals and systemd unit status today and saw that plasma-workspace.service was failing. It was trying to load the themes by looking at $XDG_DATA_DIRS variable, the logs were somewhat similar to the ones posted here on archlinux forums. The interesting bit was that $XDG_DATA_DIRS did not contain the /usr/share/:/usr/local/share/ paths which is basically the default system managed paths for these configs.

Fixed it by explicitly setting $XDG_DATA_DIRS with the default system paths in /etc/environment file. Haven’t managed to narrow down why it was missing in the first place.

Just wanted to post here and say thanks for putting this solution in the stable update thread. I had the same issue even with different kernel and an AMD system, but this workaround fixed it! I couldn’t even get a TTY though so had to boot from recovery USB, manjaro-chroot -a, and edit /etc/environment from there.

Will paste system info here just in case it’s useful for others somehow.

$ inxi -b
System:
  Host: travis-desktop Kernel: 6.7.0-0-MANJARO arch: x86_64 bits: 64
    Desktop: KDE Plasma v: 5.27.10 Distro: Manjaro Linux
Machine:
  Type: Desktop System: Gigabyte product: B650M K v: N/A
    serial: <superuser required>
  Mobo: Gigabyte model: B650M K v: x.x serial: <superuser required>
    UEFI: American Megatrends LLC. v: FB date: 07/13/2023
CPU:
  Info: 6-core AMD Ryzen 5 7600X [MT MCP] speed (MHz): avg: 2654
    min/max: 400/5453
Graphics:
  Device-1: AMD Navi 21 [Radeon RX 6800/6800 XT / 6900 XT] driver: amdgpu
    v: kernel
  Device-2: AMD Raphael driver: amdgpu v: kernel
  Display: x11 server: X.Org v: 21.1.10 driver: X: loaded: amdgpu
    unloaded: modesetting,radeon dri: radeonsi gpu: amdgpu resolution:
    1: 1920x1080 2: 1920x1080~60Hz
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 23.3.3-manjaro1.1
    renderer: AMD Radeon RX 6800 XT (radeonsi navi21 LLVM 16.0.6 DRM 3.56
    6.7.0-0-MANJARO)
Network:
  Device-1: Realtek RTL8125 2.5GbE driver: r8169
Drives:
  Local Storage: total: 1.83 TiB used: 621.81 GiB (33.1%)
Info:
  Processes: 323 Uptime: 5m Memory: total: 32 GiB note: est.
  available: 30.51 GiB used: 4.2 GiB (13.8%) Shell: Zsh inxi: 3.3.31

Is this the correct link?
It doesnt seem to mention anything about $XDG_DATA_DIRS

i guess, he is only refering to the ‘similar log file’
but

Can you please write the complete line here, what you did add to your etc/enviroment file, because mine is empty and only says

# This file is parsed by pam_env module
#
# Syntax: simple "KEY=VAL" pairs on separate lines
#

You can put in there something like

# https://forum.manjaro.org/t/bad-environment-variables-leads-to-broken-workspace/155044
XDG_DATA_DIRS="/usr/share/:/usr/local/share/"

(with a comment to link here in case you forget why its there)


But I am still interested in … more information on all the things :slight_smile:

1 Like

Apologies for the confusion! I was referring to the similarity in the log files there. As for the effect of environment variables, its documented here (specifically under “Application Data”):

https://userbase.kde.org/KDE_System_Administration/XDG_Filesystem_Hierarchy

The paths in the variable were reflected in the logs and it did not contain the default paths mentioned in KDE documentation.

@cscs already posted about it (and yes, those are the same values as well). Its like assigning variables in a shell script.

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