You are not logged in.
I'm sure most of you know, but maybe this is useful for the ones who don't know yet:
Editing systemd scripts with gedit can cause trouble!
I spent quite some time to find out why my network connection gets up so slowly after a resume from suspend. (It took about a minute)
Finally, I found out it's caused by the backup files created by gedit!: I have some scripts in /usr/lib/systemd/system-sleep (for hdparm settings and changing mousebuttons) and I sometimes repolished them. Gedit creates automatically a backup file in this case ending with ~.
The problem is now caused by the following: systemd runs each script file in /usr/lib/systemd/system-sleep, no matter if it ends with ~ or not.
As soon as I deleted all the ~ backup files, my network resume after suspend returned to work fast again. :-)
PS:
To put my observation in numbers:
before deleting the back up ~files in /usr/lib/systemd/system-sleep:
$ systemd-analyze blame
1min 20.245s systemd-suspend.service
6.664s NetworkManager-wait-online.service
1.492s NetworkManager.serviceafter deleting the ~backup files:
$ systemd-analyze blame
10.738s systemd-suspend.service
6.702s NetworkManager-wait-online.service
1.416s NetworkManager.servicequite a difference...
Offline
It''s a similar case to vim backup files in cron folders.
I once edited my /etc/cron.daily/backup.daily and my vim settings caused the creation of /etc/cron.daily/backup.daily~ , so every day two backups were created ...
I have no idea about gedit, but you can tell vim not to create backup files or create them in e.g. ~/.vimbackups instead of the same directory as the edited file.
Offline
I have no idea about gedit, but you can tell vim not to create backup files or create them in e.g. ~/.vimbackups instead of the same directory as the edited file.
I wonder if there is a setting in gedit that keeps the backups by default, or if it has changed to do it by default.
The last time I used gedit (and kate/kwite for that matter) the temporary 'backup' file was always cleaned away after closing the editor.
@Carl Do you have a setting set for this behaviour? Are you not cleanly exiting the editor? Just throwing some ideas out there.
Offline
Gedit does not automatically remove those backup files, it never has. You can disable the creation though, which is what I prefer anyway.
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Offline
Not an Arch Discussion. Moving to Applications & Desktop Environments.
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
@Carl Do you have a setting set for this behaviour? Are you not cleanly exiting the editor? Just throwing some ideas out there.
Yes, I found a setting and yes, I exit it cleanly.
The setting is in dconf under org.gnome.gedit.preferences.editor.create-backup-copy
Anyway, I don't know which setting is better as it is sometimes useful to have that backup. But sometimes, as in systemd folders, it can really mess u things as we have seen... ;-)
PS:
I posted it in "arch discussions" because of the relation to systemd which is not arch exclusive but typical for arch.
Offline
You can remove the backups manually or edit a copy of the file (e.g. copy /usr/lib/systemd/system-sleep to ~/.settings) and copy the edited file back to /usr/lib/systemd/system-sleep. Backups in ~/.settings won't hurt you.
Offline
You can remove the backups manually or edit a copy of the file (e.g. copy /usr/lib/systemd/system-sleep to ~/.settings) and copy the edited file back to /usr/lib/systemd/system-sleep. Backups in ~/.settings won't hurt you.
Yes, that's what I'm going to do from now on.
Offline