Systemd service working after being deleted

Hello.

System:
  Kernel: 5.8.18-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.8-x86_64 
  root=UUID=73af93b2-0824-465a-9ed3-a4f540eb9da9 rw quiet apparmor=1 
  security=apparmor udev.log_priority=3 
  Desktop: KDE Plasma 5.20.4 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11 
  dm: SDDM Distro: Manjaro Linux 
Machine:
  Type: Desktop Mobo: ASUSTeK model: ROG STRIX B350-F GAMING v: Rev X.0x 
  serial: <filter> UEFI: American Megatrends v: 5603 date: 07/28/2020 
CPU:
  Info: 6-Core model: AMD Ryzen 5 1600 bits: 64 type: MT MCP arch: Zen 
  family: 17 (23) model-id: 1 stepping: 1 microcode: 8001138 
  L2 cache: 3072 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm 
  bogomips: 86437 
  Speed: 3007 MHz min/max: 1550/3600 MHz boost: disabled Core speeds (MHz): 
  1: 3007 2: 1719 3: 1616 4: 1465 5: 1772 6: 2470 7: 1674 8: 1456 9: 2748 
  10: 1506 11: 2219 12: 2917 
  Vulnerabilities: Type: itlb_multihit status: Not affected 
  Type: l1tf status: Not affected 
  Type: mds status: Not affected 
  Type: meltdown status: Not affected 
  Type: spec_store_bypass 
  mitigation: Speculative Store Bypass disabled via prctl and seccomp 
  Type: spectre_v1 
  mitigation: usercopy/swapgs barriers and __user pointer sanitization 
  Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional, STIBP: 
  disabled, RSB filling 
  Type: srbds status: Not affected 
  Type: tsx_async_abort status: Not affected 
Graphics:
  Device-1: NVIDIA GP104 [GeForce GTX 1070] vendor: ZOTAC driver: nvidia 
  v: 455.45.01 alternate: nouveau,nvidia_drm bus ID: 08:00.0 
  chip ID: 10de:1b81 
  Display: x11 server: X.Org 1.20.10 compositor: kwin_x11 driver: nvidia 
  display ID: :0 screens: 1 
  Screen-1: 0 s-res: 1920x1080 s-dpi: 92 s-size: 528x297mm (20.8x11.7") 
  s-diag: 606mm (23.9") 
  Monitor-1: DP-1 res: 1920x1080 hz: 60 dpi: 93 size: 525x297mm (20.7x11.7") 
  diag: 603mm (23.7") 
  OpenGL: renderer: GeForce GTX 1070/PCIe/SSE2 v: 4.6.0 NVIDIA 455.45.01 
  direct render: Yes 
Audio:
  Device-1: NVIDIA GP104 High Definition Audio vendor: ZOTAC 
  driver: snd_hda_intel v: kernel bus ID: 08:00.1 chip ID: 10de:10f0 
  Device-2: AMD Family 17h HD Audio vendor: ASUSTeK driver: snd_hda_intel 
  v: kernel bus ID: 0a:00.3 chip ID: 1022:1457 
  Device-3: Logitech Webcam C170 type: USB driver: snd-usb-audio,uvcvideo 
  bus ID: 1-6:4 chip ID: 046d:082b 
  Sound Server: ALSA v: k5.8.18-1-MANJARO 
Network:
  Device-1: Intel I211 Gigabit Network vendor: ASUSTeK driver: igb v: 5.6.0-k 
  port: e000 bus ID: 03:00.0 chip ID: 8086:1539 
  IF: enp3s0 state: up speed: 100 Mbps duplex: full mac: <filter> 
Drives:
  Local Storage: total: 1.14 TiB used: 647.02 GiB (55.6%) 
  SMART Message: Unable to run smartctl. Root privileges required. 
  ID-1: /dev/sda vendor: Seagate model: ST1000LM014-1EJ164 size: 931.51 GiB 
  block size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s 
  rotation: 5400 rpm serial: <filter> rev: SM14 scheme: MBR 
  ID-2: /dev/sdb vendor: Samsung model: SSD 850 EVO 250GB size: 232.89 GiB 
  block size: physical: 512 B logical: 512 B speed: 6.0 Gb/s serial: <filter> 
  rev: 2B6Q scheme: GPT 
Partition:
  ID-1: / raw size: 70.53 GiB size: 69.17 GiB (98.07%) used: 43.48 GiB (62.9%) 
  fs: ext4 dev: /dev/sdb7 
  ID-2: /home raw size: 50.70 GiB size: 49.78 GiB (98.19%) 
  used: 34.94 GiB (70.2%) fs: ext4 dev: /dev/sdb5 
Swap:
  Kernel: swappiness: 60 (default) cache pressure: 100 (default) 
  ID-1: swap-1 type: file size: 8.00 GiB used: 337.2 MiB (4.1%) priority: -2 
  file: /swapfile 
Sensors:
  System Temperatures: cpu: 46.2 C mobo: N/A gpu: nvidia temp: 42 C 
  Fan Speeds (RPM): N/A gpu: nvidia fan: 30% 
Info:
  Processes: 362 Uptime: 9d 8h 45m Memory: 15.64 GiB used: 10.09 GiB (64.6%) 
  Init: systemd v: 246 Compilers: gcc: 10.2.0 alt: 5/9 clang: 11.0.0 Packages: 
  pacman: 1662 lib: 419 flatpak: 0 Shell: Bash v: 5.0.18 running in: konsole 
  inxi: 3.1.08

Some months ago I had a problem: after resuming from sleep the compositor stopped working.
Searching through internet, i found nothing useful but this

So, i created the service ant it fixed the problem: every time I resumed from sleep, a notification from “Kwin Window Manager” popped-up saying “Desktop effects were restarted due to a graphics reset”
Now, after months, I wanted to see if any update fixed the problem once and for all.

So I tried to disable the service using systemd disable but next time after resuming the notification was still there (I rebooted meanwhile). I tried with systemd mask, with no results whatsoever. Finally, I decided to delete the service. And guess what? The notification still appears after resuming…
I checked inside /usr/lib/systemd/system/ and /etc/systemd/system/, the service I created is nowhere.

This is form the journal:
[luigi@Luigi-pc ~]$ journalctl -b | grep "restart"
dic 07 09:43:53 Luigi-pc latte-dock[1331]: "An instance is already running!, use --replace to restart Latte"
dic 16 18:10:03 Luigi-pc polkit-kde-authentication-agent-1[1264]: Message of action: "Authentication is required to start 'kwin-restart@luigi.service'."
dic 16 18:10:05 Luigi-pc polkitd[572]: Operator of unix-session:2 successfully authenticated as unix-user:luigi to gain TEMPORARY authorization for action org.freedesktop.systemd1.manage-units for system-bus-name::1.54906 [systemctl start
kwin-restart@luigi.service] (owned by unix-user:luigi)
dic 16 22:09:23 Luigi-pc dbus-daemon[567]: [system] Activating via systemd: service name='org.freedesktop.home1' unit='dbus-org.freedesktop.home1.service' requested by ':1.56418' (uid=0 pid=817116 comm="sudo systemctl stop kwin-restart@lu
igi.service " label="unconfined")
dic 16 22:09:23 Luigi-pc sudo[817116]: luigi : TTY=pts/1 ; PWD=/home/luigi ; USER=root ; COMMAND=/usr/bin/systemctl stop kwin-restart@luigi.service
dic 16 22:09:37 Luigi-pc dbus-daemon[567]: [system] Activating via systemd: service name='org.freedesktop.home1' unit='dbus-org.freedesktop.home1.service' requested by ':1.56422' (uid=0 pid=817158 comm="sudo systemctl disable kwin-restart
@luigi.service " label="unconfined")
dic 16 22:09:37 Luigi-pc sudo[817158]: luigi : TTY=pts/1 ; PWD=/home/luigi ; USER=root ; COMMAND=/usr/bin/systemctl disable kwin-restart@luigi.service
dic 16 22:09:52 Luigi-pc dbus-daemon[567]: [system] Activating via systemd: service name='org.freedesktop.home1' unit='dbus-org.freedesktop.home1.service' requested by ':1.56426' (uid=0 pid=817206 comm="sudo systemctl stop kwin-restart@lu
igi.service " label="unconfined")
dic 16 22:09:52 Luigi-pc sudo[817206]: luigi : TTY=pts/1 ; PWD=/home/luigi ; USER=root ; COMMAND=/usr/bin/systemctl stop kwin-restart@luigi.service

With systemctl status this is what I get
[luigi@Luigi-pc ~]$ systemctl status kwin-restart@luigi.service
Unit kwin-restart@luigi.service could not be found.

I have no idea why this is happening. Any thoughts?
Thank you and sorry for my English.

Edit: formatting and add inxi -Fazy

Did you executed sudo systemctl daemon-reload ?
EDIT:

The right steps should be (before to delete the unit file):

sudo systemctl stop kwin-restart@$USER.service
sudo systemctl disable kwin-restart@$USER.service
sudo systemctl daemon-reload

A very good guide about systemd is here:
https://wiki.archlinux.org/index.php/systemd

I read the wiki already and yes, I tried all these command, many times in many orders for despair :joy:


this is what i get

Edit: I added jornal log

I’m sorry, but none of that command worked.

[luigi@Luigi-pc ~]$ sudo systemctl is-enabled kw
kwalletd5        kwallet-query    kwin_x11         kwriteconfig5    
kwalletmanager5  kwin_wayland     kwrapper5        
[luigi@Luigi-pc ~]$ sudo systemctl is-enabled kw
kwalletd5        kwallet-query    kwin_x11         kwriteconfig5    
kwalletmanager5  kwin_wayland     kwrapper5        
[luigi@Luigi-pc ~]$ sudo systemctl is-enabled kwin-restart@luigi.service
[sudo] password for luigi: 
Failed to get unit file state for kwin-restart@luigi.service: No such file or directory
[luigi@Luigi-pc ~]$ sudo systemctl is-enabled kwin-restart@$USER.service
Failed to get unit file state for kwin-restart@luigi.service: No such file or directory
[luigi@Luigi-pc ~]$ sudo systemctl is-enabled kwin-restart@.service
Failed to get unit file state for kwin-restart@.service: No such file or directory
[luigi@Luigi-pc ~]$ sudo systemctl stop kwin-restart@luigi.service
Failed to stop kwin-restart@luigi.service: Unit kwin-restart@luigi.service not loaded.
[luigi@Luigi-pc ~]$ sudo systemctl stop kwin-restart@.service
Failed to stop kwin-restart@.service: Unit name kwin-restart@.service is missing the instance name.
See system logs and 'systemctl status kwin-restart@.service' for details.
[luigi@Luigi-pc ~]$ 
[luigi@Luigi-pc ~]$ systemctl status kwin-restart@.service
Failed to get properties: Unit name kwin-restart@.service is neither a valid invocation ID nor unit name.
[luigi@Luigi-pc ~]$ sudo systemctl disable kwin-restart@luigi.service
Failed to disable unit: Unit file kwin-restart@luigi.service does not exist.
[luigi@Luigi-pc ~]$ sudo systemctl disable kwin-restart@.service
Failed to disable unit: Unit file kwin-restart@.service does not exist.
[luigi@Luigi-pc ~]$ sudo rm /etc/systemd/system/kwin-restart@luigi.service
rm: cannot remove '/etc/systemd/system/kwin-restart@luigi.service': No such file or directory
[luigi@Luigi-pc ~]$ sudo rm /etc/systemd/system/kwin-restart@.service
rm: cannot remove '/etc/systemd/system/kwin-restart@.service': No such file or directory
[luigi@Luigi-pc ~]$ sudo rm /urs/lib/systemd/system/kwin-restart@luigi.service
rm: cannot remove '/urs/lib/systemd/system/kwin-restart@luigi.service': No such file or directory
[luigi@Luigi-pc ~]$ sudo rm /urs/lib/systemd/system/kwin-restart@.service
rm: cannot remove '/urs/lib/systemd/system/kwin-restart@.service': No such file or directory
[luigi@Luigi-pc ~]$ systemctl daemon-reload
[luigi@Luigi-pc ~]$ systemctl reset-failed
[luigi@Luigi-pc ~]$ systemctl is-enabled kwin-restart@luigi.service
Failed to get unit file state for kwin-restart@luigi.service: No such file or directory
[luigi@Luigi-pc ~]$ systemctl is-enabled kwin-restart@.service
Failed to get unit file state for kwin-restart@.service: No such file or directory

How can I do this? The wiki doesn’t say anything about removing symlinks

Thank you

Unfortunately the kwin service isn’t there.

I don’t see this particular service when you used the is-enabled so it should not be active speciale after the systemctl reset-failed

Does it still show up after you rebooted?

Yes:
-systemctl reset-failed
-reboot
-sleep
-wake from sleep
-this puppy appears Screenshot_20201217_110604

The folder systemd dosn’t exist in ~/.local/share nor in ~/.config

If the popup is still showing, even after you have stopped/disabled/masked/removed the service file, then it only means that the functionality was implemented in some other place after the updates.
Because as you know a computer can not execute something that is not there anymore :wink:

Some update must have incorporated a similar fix in some part of it.
Wasn’t that what you wanted to find out in first place?

You think it’s more likely this than the kwin-restart@.service still active somewhere in the system?
Maybe, I guess I’ll never know for sure

Edit: it’s hard to believe because at a first glance I didn’t find evidence of a similar fix

Your title in combination with

plus explanation, point to /etc/systemd/system/kwin-restart@.service that you created.
Which looking at the commands it executes, is only to suspend/resume the compositor.

That is a totally different service which if im not mistaken is part of KDE it self, which is separate from the service file mentioned at top of this reply…
Hence don’t mix apples and oranges… :wink:

I’m sorry for being misleading in the latest message, I meant kwin-restart@.service…

If there’s no service anymore, then your graphics reset has been initiated by something else.

Is there a way to find out who’s the trigger?
Also, look at this

[luigi@Luigi-pc ~]$ sudo systemctl stop kwin-restart@luigi.service
Failed to stop kwin-restart@luigi.service: Unit kwin-restart@luigi.service not loaded.
[luigi@Luigi-pc ~]$ sudo systemctl stop kwin-restart@.service
Failed to stop kwin-restart@.service: Unit name kwin-restart@.service is missing the instance name.
See system logs and 'systemctl status kwin-restart@.service' for details.
[luigi@Luigi-pc ~]$ systemctl status kwin-restart@.service
Failed to get properties: Unit name kwin-restart@.service is neither a valid invocation ID nor unit name.

Why different outputs is neither kwin-restart@.service and kwin-restart@luigi.service exist?

That service can not be active anywhere because it is an “Instance template”, which will only be used when you have a service enabled like kwin-restart@luigi.service, take note of the name after the @ sign…

PS: When you post multi-line terminal output please use tripple back-ticks on own line followed by your output followed by another tripple back-ticks on own line, instead of single lines between a single back-tick…

Actually kwin-restart@luigi.service is just a symbolic link to kwin-restart@.service when you enable a service named kwin-restart@luigi.service :wink:

Because you can not start/stop or ask the status of service templates you get those error messages when you use the bare template name without an instance name.

Thank you for the clear explanation :hugs:

OT, but what the heck:

That kernel is EOL and you should switch to a supported one, see

$ mhwd-kernel -l

Thank you sir :relaxed:

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