You are not logged in.

#1 2023-05-04 12:20:26

zebulon
Member
Registered: 2008-10-20
Posts: 360

[SOLVED] systemctl does not find xsettingsd.service

Hi,

KDE now uses Xsettingsd to configure Xorg applications, notably rendering.
The xsettingsd package provides a /usr/lib/systemd/user/xsettingsd.service file, but systemctl fails to detect it after installing, contrary to what the wiki page says.

This is the output of systemctl commands:

# systemctl enable xsettingsd.service
Failed to enable unit: Unit file xsettingsd.service does not exist.

# systemd-analyze verify xsettingsd.service
Unit xsettingsd.service not found.

# systemd-analyze verify /usr/lib/systemd/user/xsettingsd.service

# systemctl enable /usr/lib/systemd/user/xsettingsd.service
Created symlink /etc/systemd/system/xsettingsd.service → /usr/lib/systemd/user/xsettingsd.service.
The unit files have no installation config (WantedBy=, RequiredBy=, Also=,
Alias= settings in the [Install] section, and DefaultInstance= for template
units). This means they are not meant to be enabled or disabled using systemctl.
 
Possible reasons for having this kind of units are:
• A unit may be statically enabled by being symlinked from another unit's
  .wants/ or .requires/ directory.
• A unit's purpose may be to act as a helper for some other unit which has
  a requirement dependency on it.
• A unit may be started when needed via activation (socket, path, timer,
  D-Bus, udev, scripted systemctl call, ...).
• In case of template units, the unit is meant to be enabled with some
  instance name specified.

# systemctl start xsettingsd.service

In the end I was able to enable it, but I had to specify the full path of the service file. Is that normal? Thanks!

Last edited by zebulon (2023-05-06 06:09:11)

Offline

#2 2023-05-04 12:24:44

zebulon
Member
Registered: 2008-10-20
Posts: 360

Re: [SOLVED] systemctl does not find xsettingsd.service

Just to add:
- contrary to what the wiki says, kde-gtk-config does not enable xsettingsd.service
- when starting the service manually, I get this error:

$ sudo systemctl status xsettingsd.service
× xsettingsd.service - XSETTINGS-protocol daemon
     Loaded: loaded (/etc/systemd/system/xsettingsd.service; linked; preset: disabled)
     Active: failed (Result: exit-code) since Thu 2023-05-04 14:22:41 CEST; 1s ago
   Duration: 1ms
    Process: 5574 ExecStart=/usr/bin/xsettingsd (code=exited, status=1/FAILURE)
   Main PID: 5574 (code=exited, status=1/FAILURE)
        CPU: 1ms

mai 01 14:22:41 arch systemd[1]: Started XSETTINGS-protocol daemon.
mai 01 14:22:41 arch xsettingsd[5574]: xsettingsd: Couldn't find config file. Tried the following:
mai 01 14:22:41 arch xsettingsd[5574]:   /etc/xsettingsd/xsettingsd.conf
mai 01 14:22:41 arch systemd[1]: xsettingsd.service: Main process exited, code=exited, status=1/FAILURE
mai 01 14:22:41 arch systemd[1]: xsettingsd.service: Failed with result 'exit-code'.

Offline

#3 2023-05-04 12:27:18

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 22,132

Re: [SOLVED] systemctl does not find xsettingsd.service

Yes that is normal, you are trying to operate on an user service with a system/root instance of systemd, which isn't expected to work and depending on what "I was able to enable it, but I had to specify the full path of the service file" exactly means you might have done something quite wrong and probably want to revert that and do it correctly.

That's for the disclaimer. As mentioned this is an user service that is expected to be enabled/started/used on a per-user rather than a system basis. systemctl has an --user flag for that to be ran from your normal, non-root user which will interact with user service files. See https://wiki.archlinux.org/title/Systemd/User

Last edited by V1del (2023-05-04 12:28:01)

Offline

#4 2023-05-04 12:29:51

zebulon
Member
Registered: 2008-10-20
Posts: 360

Re: [SOLVED] systemctl does not find xsettingsd.service

V1del wrote:

Yes that is normal, you are trying to operate on an user service with a system/root instance of systemd, which isn't expected to work and depending on what "I was able to enable it, but I had to specify the full path of the service file" exactly means you might have done something quite wrong and probably want to revert that and do it correctly.

That's for the disclaimer. As mentioned this is an user service that is expected to be enabled/started/used on a per-user rather than a system basis. systemctl has an --user flag for that to be ran from your normal, non-root user which will interact with user service files. See https://wiki.archlinux.org/title/Systemd/User

Thanks a lot! OK that clarifies it. Does that also explain the error I get after starting service?

Offline

#5 2023-05-04 12:33:30

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 22,132

Re: [SOLVED] systemctl does not find xsettingsd.service

likely, as $HOME will probably not have been set logically so it would only opt for a fallback config path instead of ~/.config/xsettingsd which it would if started normally.

Offline

#6 2023-05-04 16:52:02

zebulon
Member
Registered: 2008-10-20
Posts: 360

Re: [SOLVED] systemctl does not find xsettingsd.service

Thank you.

Offline

#7 2023-05-04 17:04:42

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 22,132

Re: [SOLVED] systemctl does not find xsettingsd.service

Please mark as [SOLVED] by editing the title in your first post if there are no further questions and that worked.

Offline

#8 2023-05-09 20:03:40

Strangiato
Member
Registered: 2020-01-10
Posts: 382

Re: [SOLVED] systemctl does not find xsettingsd.service

On my system running KDE Plasma a process called xsettingsd keeps running after login but the xsettingsd service is inactive.

$ systemctl status --user xsettingsd.service
○ xsettingsd.service - XSETTINGS-protocol daemon
     Loaded: loaded (/usr/lib/systemd/user/xsettingsd.service; static)
     Active: inactive (dead)

Is this correct?

Offline

Board footer

Powered by FluxBB