Failed to start Update XDG user dir configuration

After every restart the journal always shows the same error message.

Failed to start Update XDG user dir configuration

I tried xdg-user-dirs-update to generate the file $HOME/.config/user-dirs.dirs

# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run.
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
# 
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

Another file $HOME/.config/user-dirs.locale only has one line: en_US

The files look correct and match my KDE Dolphin directories.

Their file permissions look default:

ls -l ~/.config/user-dirs.dirs ~/.config/user-dirs.locale
-rw------- 1 newgate newgate 633 Aug 30 15:23 /home/newgate/.config/user-dirs.dirs
-rw-r--r-- 1 newgate newgate   5 Aug 30 15:23 /home/newgate/.config/user-dirs.locale

But I have no idea why this error message persists after restart.

Does anyone have any idea?

Here is a log

xdg-user-dirs-update[846]: Can't save user-dirs.dirs
systemd[837]: xdg-user-dirs-update.service: Main process exited, code=exited, status=1/FAILURE
systemd[837]: xdg-user-dirs-update.service: Failed with result 'exit-code'.
systemd[837]: Failed to start Update XDG user dir configuration.

Did you edit/save the file as root at some point?

If so, it might be a permissions issue.

No, home user only.

When I try to start systemctl start --user xdg-user-dirs-update.service

○ xdg-user-dirs-update.service - Update XDG user dir configuration
     Loaded: loaded (/usr/lib/systemd/user/xdg-user-dirs-update.service; enabled; preset: enabled)
     Active: inactive (dead) since Fri 2024-08-30 16:35:14 CEST; 1s ago
 Invocation: 8243ce552bec462a8ebc8775c2436503
       Docs: man:xdg-user-dirs-update(1)
    Process: 12820 ExecStart=/usr/bin/xdg-user-dirs-update (code=exited, status=0/SUCCESS)
   Main PID: 12820 (code=exited, status=0/SUCCESS)
   Mem peak: 1.4M
        CPU: 3ms

Aug 30 16:35:14 newgate systemd[901]: Starting Update XDG user dir configuration...
Aug 30 16:35:14 newgate systemd[901]: Finished Update XDG user dir configuration.

No problem is shown, but the problem only appears after restarting my computer.

Have you tried xdg-user-dirs-update --force command?

Yes, I did. This does not help after the restart.

1 Like

Its funny… I’ve just run journalctl --since 'yesterday' | grep -i xdg and…

ago 30 13:52:32 c1 systemd[543]: Starting Update XDG user dir configuration...
ago 30 13:52:32 c1 xdg-user-dirs-update[554]: Can't save user-dirs.dirs
ago 30 13:52:32 c1 systemd[543]: xdg-user-dirs-update.service: Main process exited, code=exited, status=1/FAILURE
ago 30 13:52:32 c1 systemd[543]: xdg-user-dirs-update.service: Failed with result 'exit-code'.
ago 30 13:52:32 c1 systemd[543]: Failed to start Update XDG user dir configuration.
ago 30 13:53:15 c1 systemd[601]: Starting Update XDG user dir configuration...
ago 30 13:53:15 c1 systemd[601]: Finished Update XDG user dir configuration.

Also fails in my computer but one minute later succeeds. :open_mouth:

May be another service needs to be started before?

This issue is well known for many months, no one here can help you. Or this problem is simple ignored.

If you want to fix this issue, I have some questions:

  1. After rebooting without logging into KDE, try opening TTY by pressing Ctrl+Alt+F4 and logging in as root to see if the problem persists?

  2. If it persists, try deactivating SDDM service and reboot to see if this err message is gone?

1 Like

Yes, it persists

After deactivating the SSD service, there is no longer a problem in TTY.

What does that mean? But KDE needs SDDM service for login.

I knew this issue is related to bad SDDM config.

  1. Move /var/lib/sddm including many outdated configs to backup or delete it.

  2. Reinstall sddm

  3. Restart SDDM service or reboot.

However, KDE does not require installing SDDM only, but you can install LightDM for KDE.

1 Like

Wow, that works. :eyes:

Only you did. :smile:

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