You are not logged in.
I am trying to make it so opentabletdriver.service does not automatically restart if I stop it manually, only restarting if something goes wrong.
I've done the following:
1. Set Restart=on-abnormal in /usr/lib/systemd/user/opentabletdriver.service. (Also tried Restart=no)
2. Run systemctl --user daemon-reload
3. Run systemctl --user stop opentabletdriver.service
4. Run systemctl --user status opentabletdriver.service
5. Wait a bit, then run systemctl --user status opentabletdriver.service again
The following is what i see at step 4:
phoenix@nyarch /u/l/s/user [3]> systemctl --user status opentabletdriver.service
○ opentabletdriver.service - OpenTabletDriver Daemon
Loaded: loaded (/usr/lib/systemd/user/opentabletdriver.service; enabled; preset: enabled)
Drop-In: /home/phoenix/.config/systemd/user/opentabletdriver.service.d
└─override.conf
Active: inactive (dead) since Sun 2024-09-08 10:45:24 MST; 8s ago
Duration: 3.268s
Invocation: a01623e9574141e6948cde5732a1bf6d
Process: 386163 ExecStart=otd-daemon (code=killed, signal=TERM)
Main PID: 386163 (code=killed, signal=TERM)
Mem peak: 28.6M
CPU: 957ms
Sep 08 10:45:21 nyarch otd-daemon[386193]: [Wacom CTH-680:Info] Output mode: Absolute Mode
Sep 08 10:45:21 nyarch otd-daemon[386193]: [Wacom CTH-680:Info] Display area: [1920x1080@<960, 540>:0°],
Sep 08 10:45:21 nyarch otd-daemon[386193]: [Wacom CTH-680:Info] Tablet area: [99.55556x56@<53, 64>:0°],
Sep 08 10:45:21 nyarch otd-daemon[386193]: [Wacom CTH-680:Info] Clipping: Enabled
Sep 08 10:45:21 nyarch otd-daemon[386193]: [Wacom CTH-680:Info] Ignoring reports outside area: Disabled
Sep 08 10:45:21 nyarch otd-daemon[386193]: [Wacom CTH-680:Info] Tip Binding: [Mouse Button Binding: Left]@0%
Sep 08 10:45:21 nyarch otd-daemon[386193]: [Wacom CTH-680:Info] Filters: Kuuube_s_Chatter_Exterminator.Kuuube_s_CHATTER_EXTERMINATOR_SMOOTH
Sep 08 10:45:21 nyarch otd-daemon[386193]: [Settings:Info] Driver is enabled.
Sep 08 10:45:24 nyarch systemd[1350]: Stopping OpenTabletDriver Daemon...
Sep 08 10:45:24 nyarch systemd[1350]: Stopped OpenTabletDriver Daemon.And then at step 5:
phoenix@nyarch /u/l/s/user [3]> systemctl --user status opentabletdriver.service
● opentabletdriver.service - OpenTabletDriver Daemon
Loaded: loaded (/usr/lib/systemd/user/opentabletdriver.service; enabled; preset: enabled)
Drop-In: /home/phoenix/.config/systemd/user/opentabletdriver.service.d
└─override.conf
Active: active (running) since Sun 2024-09-08 10:45:34 MST; 2s ago
Invocation: 11b9c1a228af4193a3ca095337744206
Main PID: 388981 (sh)
Tasks: 29 (limit: 38309)
Memory: 27.7M (peak: 28.7M)
CPU: 782ms
CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/opentabletdriver.service
├─388981 sh /usr/bin/otd-daemon
└─389011 /usr/lib/opentabletdriver/OpenTabletDriver.Daemon
Sep 08 10:45:34 nyarch otd-daemon[389011]: [Detect:Debug] Searching for tablet 'XP-Pen Star G960S'
Sep 08 10:45:34 nyarch otd-daemon[389011]: [Evdev:Debug] Successfully initialized virtual tablet. (code NONE)
Sep 08 10:45:34 nyarch otd-daemon[389011]: [Wacom CTH-680:Info] Output mode: Absolute Mode
Sep 08 10:45:34 nyarch otd-daemon[389011]: [Wacom CTH-680:Info] Display area: [1920x1080@<960, 540>:0°],
Sep 08 10:45:34 nyarch otd-daemon[389011]: [Wacom CTH-680:Info] Tablet area: [99.55556x56@<53, 64>:0°],
Sep 08 10:45:34 nyarch otd-daemon[389011]: [Wacom CTH-680:Info] Clipping: Enabled
Sep 08 10:45:34 nyarch otd-daemon[389011]: [Wacom CTH-680:Info] Ignoring reports outside area: Disabled
Sep 08 10:45:34 nyarch otd-daemon[389011]: [Wacom CTH-680:Info] Tip Binding: [Mouse Button Binding: Left]@0%
Sep 08 10:45:34 nyarch otd-daemon[389011]: [Wacom CTH-680:Info] Filters: Kuuube_s_Chatter_Exterminator.Kuuube_s_CHATTER_EXTERMINATOR_SMOOTH
Sep 08 10:45:34 nyarch otd-daemon[389011]: [Settings:Info] Driver is enabled.Here is the contents of /usr/lib/systemd/user/opentabletdriver.service:
[Unit]
Description=OpenTabletDriver Daemon
PartOf=graphical-session.target
After=graphical-session.target
ConditionEnvironment=|WAYLAND_DISPLAY
ConditionEnvironment=|DISPLAY
[Service]
ExecStart=otd-daemon
Restart=on-abnormal
RestartSec=3
[Install]
WantedBy=graphical-session.targetAnd then of the override file at /home/phoenix/.config/systemd/user/opentabletdriver.service.d/override.conf:
[Service]
Environment=DISPLAY=:0Any ideas?
Offline
https://man.archlinux.org/man/core/syst … en#OPTIONS
If set to on-abnormal, the service will be restarted when the process is terminated by a signal (including on core dump, excluding the aforementioned four signals), when an operation times out, or when the watchdog timeout is triggered.
You *are* abnormal (lennarts words, not mine
)
Try "on-failure" or "on-abort"
Offline
Actually the issue seems to be unrelated (although i think you're right that on-abnormal isn't correct). I couldn't get on-failure or on-abort to work, so I just decided to restart my PC, and surprisingly I found it working... but then I tried changing it back to Restart=always, and this time it after running systemctl --user daemon-reload and then stopping the service, it now never restarts. Restarting my PC caused it to automatically restart again. I am fairly certain now that the real issue is that systemctl --user daemon-reload is not working as expected, but I'm not sure why... Reloading results in the following output:
Sep 09 09:36:55 nyarch systemd[1155]: Reload requested from client PID 3284396 ('systemctl') (unit kitty-3161733-0.scope)...
Sep 09 09:36:55 nyarch systemd[1155]: Reloading...
Sep 09 09:36:55 nyarch systemd[1155]: /home/phoenix/.config/systemd/user/xscreensaver.service:9: Failed to add dependency on org.gnome.ScreenSaver, ignoring: Invalid argument
Sep 09 09:36:55 nyarch systemd[1155]: /home/phoenix/.config/systemd/user/xscreensaver.service:9: Failed to add dependency on org.cinnamon.ScreenSaver, ignoring: Invalid argument
Sep 09 09:36:55 nyarch systemd[1155]: /home/phoenix/.config/systemd/user/xscreensaver.service:9: Failed to add dependency on org.mate.ScreenSaver, ignoring: Invalid argument
Sep 09 09:36:55 nyarch systemd[1155]: /home/phoenix/.config/systemd/user/xscreensaver.service:9: Failed to add dependency on org.xfce.ScreenSaver, ignoring: Invalid argument
Sep 09 09:36:55 nyarch systemd[1155]: /home/phoenix/.config/systemd/user/xscreensaver.service:9: Failed to add dependency on light-locker, ignoring: Invalid argument
Sep 09 09:36:55 nyarch systemd[1155]: Reloading finished in 208 ms.No errors related to opentabletdriver, so it should be reloading... but it doesn't.
Last edited by Phx_Blaster007 (2024-09-09 17:09:15)
Offline
If you first reload the daemon and then restart the service, does the subsequent termination have the expected result?
Alternatively try "systemctl --user edit opentabletdriver.service" as it should correctly reload the service configuration.
Might be a systemd bug unexpected but correct behavior concerning the Restart condition and service edits since it's a somewhat special configuration.
Offline