You are not logged in.

#1 2018-03-30 17:54:50

freyr
Member
From: Hungary
Registered: 2010-02-04
Posts: 131

Lock with sflock on suspend/hibernate

Hi!

I'm trying to figure out how to lock my desktop with sflock on suspend/hibernate.
For now I was trying to make it work with suspend, but the only thing I managed to achieve is to make the system freeze, or crash, don't know which one.

First I tried running

xss-lock -- sflock -h

but when I tried to resume from suspend, I saw only a black screen and nothing was responding, not even the Num lock.

The same happened when I created a suspend@.service file based on the Arch Wiki:

[Unit]
Description=User suspend actions
Before=sleep.target

[Service]
User=lynx
Type=forking
Environment=DISPLAY=:0
ExecStart=/usr/bin/sflock -h
ExecStartPost=/usr/bin/sleep 1

[Install]
WantedBy=sleep.target

When I suspend, I see sflock for a split second, but when I wake up the system, there's nothing. Here's the relevant journalctl entry:

Mar 30 19:30:03 Ayumi NetworkManager[473]: <info>  [1522431003.7904] manager: sleep: sleep requested (sleeping: no  enabled: yes)
Mar 30 19:30:03 Ayumi NetworkManager[473]: <info>  [1522431003.7905] manager: NetworkManager state is now ASLEEP
Mar 30 19:30:04 Ayumi systemd[1]: Created slice system-suspend.slice.
Mar 30 19:30:04 Ayumi systemd[1]: Starting User suspend actions...
Mar 30 19:30:05 Ayumi systemd[1]: Started User suspend actions.
Mar 30 19:30:05 Ayumi systemd[1]: Reached target Sleep.
Mar 30 19:30:05 Ayumi systemd[1]: Starting Suspend...
Mar 30 19:30:05 Ayumi systemd-sleep[1694]: Suspending system...
Mar 30 19:30:05 Ayumi kernel: PM: suspend entry (deep)
Mar 30 19:30:05 Ayumi kernel: PM: Syncing filesystems ... done.
-- Reboot --

I disabled it then tried the same with resume@.service, but this time the system woke up normally without sflock.

[Unit]
Description=Local system resume actions
After=suspend.target

[Service]
Type=simple
ExecStart=/usr/bin/sflock -h

[Install]
WantedBy=suspend.target

In journalctl the only difference is that I see

sflock[1512]: sflock: cannot open dpy

but I don't know why it's there, Google yielded no results apart from the source code, there the only thing I could find is that dpy has something to do with the display and the message is in a die() function so for some reason sflock quits.

I'm running LXQt and suspending using oblogout with the command: systemctl suspend, which has its defaults since I haven't modified anything there.

sflock works on its own as it should.

Any ideas?

Also, LXQt wants xscreensaver, I see a message before suspend that it couldn't launch it ("An error occurred starting screensaver. Action 'activate' failed. Ensure you have xscreensaver installed and running."). Most likely because it's not installed, I don't need it. How can I disable that?

Last edited by freyr (2018-04-04 12:50:16)


What, so everyone's supposed to sleep every single night now? You realize that nighttime makes up half of all time?

Offline

#2 2018-03-30 20:39:55

peterklarc
Member
Registered: 2017-03-28
Posts: 28

Re: Lock with sflock on suspend/hibernate

I use of slock in a  simple way:

xautolock -detectsleep -time 25 -locker "slock" -killtime 26 -killer "systemctl suspend" &

xautolock is an AUR thing.
or
Install xfce4-power-manger and xflock4 and edited for sflock (usr/bin/xflock4)
Note at the black screen just type your password until it opens or it's red=wrong password.

Offline

#3 2018-04-04 10:53:20

cthael
Member
Registered: 2018-04-03
Posts: 5

Re: Lock with sflock on suspend/hibernate

peterklarc wrote:

I use of slock in a  simple way:

xautolock -detectsleep -time 25 -locker "slock" -killtime 26 -killer "systemctl suspend" &

xautolock is an AUR thing.
or
Install xfce4-power-manger and xflock4 and edited for sflock (usr/bin/xflock4)
Note at the black screen just type your password until it opens or it's red=wrong password.

Sorry for bothering you.
The command in your code block do you invoke it manually or did you automate it?


Current Hardware: T470

Offline

#4 2018-04-04 11:23:04

freyr
Member
From: Hungary
Registered: 2010-02-04
Posts: 131

Re: Lock with sflock on suspend/hibernate

peterklarc wrote:

I use of slock in a  simple way:

xautolock -detectsleep -time 25 -locker "slock" -killtime 26 -killer "systemctl suspend" &

xautolock is an AUR thing.
or
Install xfce4-power-manger and xflock4 and edited for sflock (usr/bin/xflock4)
Note at the black screen just type your password until it opens or it's red=wrong password.

xautolock works, thanks! But it's in the community repo, not in AUR.

Edit: I have to take it back. If I use this, it locks the screen when I'm watching YouTube. Sigh, I thought this problem is long gone everywhere, haven't experienced it in ages with the default power savings.

Last edited by freyr (2018-04-04 12:52:37)


What, so everyone's supposed to sleep every single night now? You realize that nighttime makes up half of all time?

Offline

#5 2018-04-20 06:20:42

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: Lock with sflock on suspend/hibernate

Mod note: Removed rogerthat's post.

Offline

#6 2018-04-20 20:43:36

peterklarc
Member
Registered: 2017-03-28
Posts: 28

Re: Lock with sflock on suspend/hibernate

um...
use the -corners option. For the left hand upper corner: -corners -000 in the above xautolock command line.
Also check this:
Arch Linux Reddit

This is in the  autostart settings config.

---------
...I just touch the mouse sometimes...

Last edited by peterklarc (2018-04-20 20:47:05)

Offline

#7 2018-04-23 00:28:18

rogerthat
Member
Registered: 2016-11-15
Posts: 56

Re: Lock with sflock on suspend/hibernate

Interestingly, I get the same message as you from sflock but when I use a suspend system-sleep script as suggested on the wiki. (https://wiki.archlinux.org/index.php/Power_management).

1) There is a custom wrapper script I made for sflock. (NOTE: This script works perfectly correctly when run by a non-root user by typing "lock".)

$ cat /usr/local/bin/lock
#!/bin/sh
echo "lock script running"
export DISPLAY
/usr/bin/sflock -f '-*-fixed-*-*-*--13-*-*-*-*-*-*-*'

$ ls -l /usr/local/bin/lock
-rwxr-xr-x 1 root root 91 Mar  5 15:52 /usr/local/bin/lock

2) The system-sleep script I made: (NOTE: The "pid" and "IFS" lines are so I can run the lock command as the logged in user who has access to the display.)

$ cat /usr/lib/systemd/system-sleep/sleep-lock.sh
#!/bin/bash
case $1 in
  pre)
    echo "sleep-lock.sh script running: $1/$2"
    pid=$(pgrep openbox)
    IFS='=' read key val < <(grep -z USER /proc/$pid/environ)
    su -c /usr/local/bin/lock - $val
    echo "sleep-lock.sh script done: $1/$2"
    ;;
esac

$ ls -l /usr/lib/systemd/system-sleep/sleep-lock.sh
-rwxr-xr-x 1 root root 191 Mar  5 16:33 /usr/lib/systemd/system-sleep/sleep-lock.sh

The error in the journal shows the same as you... "sflock: cannot open dpy"

Apr 23 00:08:53 syst systemd[1]: Starting Suspend...
Apr 23 00:08:53 syst systemd-sleep[18723]: sleep-lock.sh script running: pre/suspend
Apr 23 00:08:53 syst su[18729]: (to roger) root on none
Apr 23 00:08:53 syst su[18729]: pam_unix(su-l:session): session opened for user roger by (uid=0)
Apr 23 00:08:53 syst systemd-sleep[18723]: lock script running
Apr 23 00:08:53 syst su[18729]: pam_unix(su-l:session): session closed for user roger
Apr 23 00:08:53 syst systemd-sleep[18723]: sflock: cannot open dpy
Apr 23 00:08:53 syst systemd-sleep[18723]: sleep-lock.sh script done: pre/suspend
Apr 23 00:08:53 syst systemd-sleep[18723]: Suspending system...
Apr 23 00:09:04 syst systemd-sleep[18723]: System resumed.
Apr 23 00:09:04 syst systemd[1]: Started Suspend.

Gotta keep researching that error. hmm

Last edited by rogerthat (2018-04-23 00:35:04)

Offline

#8 2018-04-23 00:42:00

rogerthat
Member
Registered: 2016-11-15
Posts: 56

Re: Lock with sflock on suspend/hibernate

Perhaps, the context in the sflock source is helpful...

I'm guessing the error has something to do with the fork() command and then inability to access the DISPLAY.

https://github.com/benruijl/sflock/blob/master/sflock.c  ::

143             /* deamonize */
144             pid = fork();
145             if (pid < 0) 
146                 die("Could not fork sflock.");
147             if (pid > 0) 
148                 exit(0); // exit parent 
149         
150         #ifndef HAVE_BSD_AUTH
151             pws = get_password();
152             username = getpwuid(geteuid())->pw_name;
153         #else
154             username = getlogin();
155         #endif
156         
157             if(!(dpy = XOpenDisplay(0)))
158         die("sflock: cannot open dpy\n");

Offline

#9 2018-04-24 05:32:43

rogerthat
Member
Registered: 2016-11-15
Posts: 56

Re: Lock with sflock on suspend/hibernate

(EDIT: Put improved code.)
I fixed the "cannot open dpy" error by exporting some environment variables in the lock wrapper script...

/usr/lib/systemd/system-sleep/sleep-lock.sh ::

#!/bin/bash
case $1 in
  pre)
    echo "sleep-lock.sh script running: $1/$2"
    pid=$(pgrep openbox)
    IFS='=' read key user < <(grep -z USER /proc/$pid/environ)
    su -c /usr/local/bin/lock - $user &
    /usr/bin/sleep 5
    echo "sleep-lock.sh script done: $1/$2"
    ;;
esac

/usr/local/bin/lock ::

#!/bin/bash
echo "lock script running"
pid=$(pgrep openbox)
IFS='=' read key display < <(grep -z DISPLAY /proc/$pid/environ)
env DISPLAY=$display /usr/bin/sflock -f '-*-fixed-*-*-*--13-*-*-*-*-*-*-*'
echo "lock script finished"

--------------------------
ORIGINAL CODE:

#!/bin/bash
echo "lock script running"
pid=$(pgrep openbox)
IFS='=' read key val < <(grep -z DISPLAY /proc/$pid/environ)
DISPLAY=$val
IFS='=' read key val < <(grep -z XAUTHORITY /proc/$pid/environ)
XAUTHORITY=$val
export DISPLAY
export XAUTHORITY
/usr/bin/sflock -f '-*-fixed-*-*-*--13-*-*-*-*-*-*-*'

Last edited by rogerthat (2018-04-24 21:53:42)

Offline

#10 2018-04-24 15:31:26

freyr
Member
From: Hungary
Registered: 2010-02-04
Posts: 131

Re: Lock with sflock on suspend/hibernate

rogerthat wrote:

Fixed the cannot open dpy error by exporting some environment variables in the lock wrapper script...

I've just tried this approach but my PC seemingly freezes with it, too.

This is the part of the log from when I tried waking it up:

Apr 24 17:14:02 mypc kernel: Freezing user space processes ... (elapsed 0.001 seconds) done.
Apr 24 17:14:02 mypc kernel: OOM killer disabled.
Apr 24 17:14:02 mypc kernel: Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Apr 24 17:14:02 mypc kernel: Suspending console(s) (use no_console_suspend to debug)
Apr 24 17:14:02 mypc kernel: sd 0:0:0:0: [sda] Synchronizing SCSI cache
Apr 24 17:14:02 mypc kernel: sd 0:0:0:0: [sda] Stopping disk
Apr 24 17:14:02 mypc kernel: sd 1:0:0:0: [sdb] Synchronizing SCSI cache
Apr 24 17:14:02 mypc kernel: sd 1:0:0:0: [sdb] Stopping disk
Apr 24 17:14:02 mypc kernel: ACPI: Preparing to enter system sleep state S3
Apr 24 17:14:02 mypc kernel: PM: Saving platform NVS memory
Apr 24 17:14:02 mypc kernel: Disabling non-boot CPUs ...
Apr 24 17:14:02 mypc kernel: smpboot: CPU 1 is now offline
Apr 24 17:14:02 mypc kernel: ACPI: Low-level resume complete
Apr 24 17:14:02 mypc kernel: PM: Restoring platform NVS memory
Apr 24 17:14:02 mypc kernel: Enabling non-boot CPUs ...
Apr 24 17:14:02 mypc kernel: x86: Booting SMP configuration:
Apr 24 17:14:02 mypc kernel: smpboot: Booting Node 0 Processor 1 APIC 0x2
Apr 24 17:14:02 mypc kernel:  cache: parent cpu1 should not be sleeping
Apr 24 17:14:02 mypc kernel: CPU1 is up
Apr 24 17:14:02 mypc kernel: ACPI: Waking up from system sleep state S3
Apr 24 17:14:02 mypc kernel: usb usb1: root hub lost power or was reset
Apr 24 17:14:02 mypc kernel: usb usb2: root hub lost power or was reset
Apr 24 17:14:02 mypc kernel: sd 0:0:0:0: [sda] Starting disk
Apr 24 17:14:02 mypc kernel: sd 1:0:0:0: [sdb] Starting disk
Apr 24 17:14:02 mypc kernel: r8169 0000:03:00.0 enp3s0: link down
Apr 24 17:14:02 mypc kernel: ata3: SATA link down (SStatus 0 SControl 300)
Apr 24 17:14:02 mypc kernel: ata5: SATA link down (SStatus 0 SControl 300)
Apr 24 17:14:02 mypc kernel: ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Apr 24 17:14:02 mypc kernel: ata6: SATA link down (SStatus 0 SControl 300)
Apr 24 17:14:02 mypc kernel: ata4: SATA link down (SStatus 0 SControl 300)
Apr 24 17:14:02 mypc kernel: ata2.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
Apr 24 17:14:02 mypc kernel: ata2.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
Apr 24 17:14:02 mypc kernel: ata2.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
Apr 24 17:14:02 mypc kernel: ata2.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
Apr 24 17:14:02 mypc kernel: ata2.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
Apr 24 17:14:02 mypc kernel: ata2.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
Apr 24 17:14:02 mypc kernel: ata2.00: configured for UDMA/133
Apr 24 17:14:02 mypc kernel: OOM killer enabled.
Apr 24 17:14:02 mypc kernel: Restarting tasks ...
Apr 24 17:14:02 mypc kernel: NVRM: GPU at PCI:0000:01:00: GPU-ca38436e-0404-0000-0000-000000000000
Apr 24 17:14:02 mypc kernel: NVRM: Xid (PCI:0000:01:00): 13, Graphics Exception: ChID 0001, Class 00008597, Offset 00001694, Data 00000100
Apr 24 17:14:02 mypc kernel: pci_bus 0000:06: Allocating resources
Apr 24 17:14:02 mypc kernel: pci 0000:05:00.0: bridge window [mem 0x00100000-0x000fffff 64bit pref] to [bus 06] add_size 200000 add_align 100000
Apr 24 17:14:02 mypc kernel: pci 0000:05:00.0: bridge window [mem 0x00100000-0x000fffff] to [bus 06] add_size 200000 add_align 100000
Apr 24 17:14:02 mypc kernel: pci 0000:05:00.0: BAR 14: no space for [mem size 0x00200000]
Apr 24 17:14:02 mypc kernel: pci 0000:05:00.0: BAR 14: failed to assign [mem size 0x00200000]
Apr 24 17:14:02 mypc kernel: pci 0000:05:00.0: BAR 15: no space for [mem size 0x00200000 64bit pref]
Apr 24 17:14:02 mypc kernel: pci 0000:05:00.0: BAR 15: failed to assign [mem size 0x00200000 64bit pref]
Apr 24 17:14:02 mypc kernel: pci 0000:05:00.0: BAR 14: no space for [mem size 0x00200000]
Apr 24 17:14:02 mypc kernel: pci 0000:05:00.0: BAR 14: failed to assign [mem size 0x00200000]
Apr 24 17:14:02 mypc kernel: pci 0000:05:00.0: BAR 15: no space for [mem size 0x00200000 64bit pref]
Apr 24 17:14:02 mypc kernel: pci 0000:05:00.0: BAR 15: failed to assign [mem size 0x00200000 64bit pref]
Apr 24 17:14:02 mypc kernel: done.
Apr 24 17:14:02 mypc kernel: PM: suspend exit
Apr 24 17:14:02 mypc dhcpcd[533]: enp3s0: carrier lost
Apr 24 17:14:02 mypc systemd-sleep[2866]: System resumed.
Apr 24 17:14:02 mypc systemd[1]: Started Suspend.
Apr 24 17:14:02 mypc systemd[1]: sleep.target: Unit not needed anymore. Stopping.
Apr 24 17:14:02 mypc systemd[1]: Stopped target Sleep.
Apr 24 17:14:02 mypc systemd[1]: Reached target Suspend.
Apr 24 17:14:02 mypc systemd[1]: suspend.target: Unit not needed anymore. Stopping.
Apr 24 17:14:02 mypc systemd[1]: Stopped target Suspend.
Apr 24 17:14:02 mypc systemd-logind[477]: Operation 'sleep' finished.
Apr 24 17:14:02 mypc NetworkManager[479]: <info>  [1524582842.6357] manager: sleep: wake requested (sleeping: yes  enabled: yes)
Apr 24 17:14:02 mypc NetworkManager[479]: <info>  [1524582842.6358] manager: NetworkManager state is now CONNECTED_GLOBAL
Apr 24 17:14:02 mypc dhcpcd[533]: enp3s0: adding default route via fe80::1
Apr 24 17:14:02 mypc dhcpcd[533]: if_route (ADD): File exists
Apr 24 17:14:02 mypc dhcpcd[533]: enp3s0: deleting address fdxx::xx/64
Apr 24 17:14:02 mypc avahi-daemon[464]: Withdrawing address record for fdxx::xx on enp3s0.
Apr 24 17:14:02 mypc avahi-daemon[464]: Leaving mDNS multicast group on interface enp3s0.IPv6 with address fdxx::xx.
Apr 24 17:14:02 mypc avahi-daemon[464]: Joining mDNS multicast group on interface enp3s0.IPv6 with address fdxx::xx.
Apr 24 17:14:02 mypc dhcpcd[533]: enp3s0: deleting address 2001::xx/64
Apr 24 17:14:02 mypc avahi-daemon[464]: Withdrawing address record for 2001::xx on enp3s0.
Apr 24 17:14:02 mypc dhcpcd[533]: enp3s0: deleting route to fdxx::xx/64
Apr 24 17:14:02 mypc dhcpcd[533]: enp3s0: deleting route to 2001::xx/64
Apr 24 17:14:02 mypc dhcpcd[533]: enp3s0: deleting address fexx::xx
Apr 24 17:14:02 mypc avahi-daemon[464]: Withdrawing address record for 192.168.1.1 on enp3s0.
Apr 24 17:14:02 mypc avahi-daemon[464]: Leaving mDNS multicast group on interface enp3s0.IPv4 with address 192.168.1.1.
Apr 24 17:14:02 mypc avahi-daemon[464]: Interface enp3s0.IPv4 no longer relevant for mDNS.
Apr 24 17:14:02 mypc dhcpcd[533]: enp3s0: deleting route to 192.168.1.0/24
Apr 24 17:14:02 mypc dhcpcd[533]: enp3s0: deleting default route via 192.168.1.254
Apr 24 17:14:02 mypc kernel: r8169 0000:03:00.0 enp3s0: link up
Apr 24 17:14:02 mypc dhcpcd[533]: enp3s0: carrier acquired
Apr 24 17:14:02 mypc NetworkManager[479]: <info>  [1524582842.9369] device (enp3s0): carrier: link connected
Apr 24 17:14:02 mypc NetworkManager[479]: <info>  [1524582842.9378] device (enp3s0): DHCPv4 lease renewal requested
Apr 24 17:14:02 mypc NetworkManager[479]: <info>  [1524582842.9378] dhcp4 (enp3s0): canceled DHCP transaction
Apr 24 17:14:02 mypc NetworkManager[479]: <info>  [1524582842.9378] dhcp4 (enp3s0): state changed bound -> done
Apr 24 17:14:02 mypc NetworkManager[479]: <info>  [1524582842.9382] dhcp4 (enp3s0): activation: beginning transaction (timeout in 45 seconds)
Apr 24 17:14:02 mypc dhcpcd[533]: enp3s0: IAID 22:ec:4d:ae
Apr 24 17:14:03 mypc kernel:  sdc: sdc1
Apr 24 17:14:03 mypc dhcpcd[533]: enp3s0: rebinding lease of 192.168.1.1
Apr 24 17:14:03 mypc dhcpcd[533]: enp3s0: soliciting an IPv6 router
Apr 24 17:14:03 mypc ntpd[548]: Deleting interface #6 enp3s0, fexx::xx%2#123, interface stats: received=0, sent=0, dropped=0, active_time=546 secs
Apr 24 17:14:03 mypc ntpd[548]: Deleting interface #8 enp3s0, 192.168.1.1#123, interface stats: received=47, sent=47, dropped=0, active_time=539 secs
Apr 24 17:14:03 mypc ntpd[548]: x.x.x.x local addr 192.168.1.1 -> <null>
Apr 24 17:14:03 mypc ntpd[548]: x.x.x.x local addr 192.168.1.1 -> <null>
Apr 24 17:14:03 mypc ntpd[548]: x.x.x.x local addr 192.168.1.1 -> <null>
Apr 24 17:14:03 mypc ntpd[548]: Deleting interface #11 enp3s0, 2001::xx#123, interface stats: received=0, sent=0, dropped=0, active_time=539 secs
Apr 24 17:14:03 mypc ntpd[548]: Deleting interface #12 enp3s0, fdxx::xx#123, interface stats: received=0, sent=0, dropped=0, active_time=539 secs
Apr 24 17:14:05 mypc ModemManager[466]: <info>  Couldn't check support for device '/sys/devices/pci0000:00/0000:00:1c.4/0000:03:00.0': not supported by any plugin
Apr 24 17:14:05 mypc kernel: ata1: link is slow to respond, please be patient (ready=0)
Apr 24 17:14:05 mypc kernel: ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
Apr 24 17:14:05 mypc kernel: ata1.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
Apr 24 17:14:05 mypc kernel: ata1.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
Apr 24 17:14:05 mypc kernel: ata1.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
Apr 24 17:14:05 mypc kernel: ata1.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
Apr 24 17:14:05 mypc kernel: ata1.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
Apr 24 17:14:05 mypc kernel: ata1.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
Apr 24 17:14:05 mypc kernel: ata1.00: configured for UDMA/133
Apr 24 17:14:07 mypc dhcpcd[533]: enp3s0: Router Advertisement from fe80::1
Apr 24 17:14:07 mypc dhcpcd[533]: enp3s0: adding address fdxx::xx/64
Apr 24 17:14:07 mypc dhcpcd[533]: enp3s0: adding address 2001::xx/64
Apr 24 17:14:07 mypc dhcpcd[533]: enp3s0: adding route to fdxx::xx/64
Apr 24 17:14:07 mypc dhcpcd[533]: enp3s0: adding route to 2001::xx/64
Apr 24 17:14:07 mypc dhcpcd[533]: enp3s0: adding default route via fe80::1
Apr 24 17:14:07 mypc dhcpcd[533]: enp3s0: soliciting a DHCPv6 lease
Apr 24 17:14:07 mypc dhcpcd[533]: enp3s0: DHCPv6 REPLY: No Addresses Available
Apr 24 17:14:08 mypc dhcpcd[533]: enp3s0: DHCP lease expired
Apr 24 17:14:08 mypc dhcpcd[533]: enp3s0: soliciting a DHCP lease
Apr 24 17:14:08 mypc dhcpcd[533]: enp3s0: DHCPv6 REPLY: No Addresses Available
Apr 24 17:14:08 mypc ntpd[548]: bind(23) AF_INET6 2001::xx#123 flags 0x11 failed: Cannot assign requested address
Apr 24 17:14:08 mypc ntpd[548]: unable to create socket on enp3s0 (13) for 2001::xx#123
Apr 24 17:14:08 mypc ntpd[548]: failed to init interface for address 2001::xx
Apr 24 17:14:08 mypc ntpd[548]: bind(23) AF_INET6 fdxx::xx#123 flags 0x11 failed: Cannot assign requested address
Apr 24 17:14:08 mypc ntpd[548]: unable to create socket on enp3s0 (14) for fdxx::xx#123
Apr 24 17:14:08 mypc ntpd[548]: failed to init interface for address fdxx::xx
Apr 24 17:14:09 mypc avahi-daemon[464]: Registering new address record for 2001::xx on enp3s0.*.
Apr 24 17:14:09 mypc avahi-daemon[464]: Registering new address record for fdxx::xx on enp3s0.*.
Apr 24 17:14:10 mypc dhcpcd[533]: enp3s0: DHCPv6 REPLY: No Addresses Available
Apr 24 17:14:10 mypc ntpd[548]: Listen normally on 15 enp3s0 [2001::xx]:123
Apr 24 17:14:10 mypc ntpd[548]: Listen normally on 16 enp3s0 [fdxx::xx]:123
Apr 24 17:14:10 mypc ntpd[548]: new interface(s) found: waking up resolver
Apr 24 17:14:12 mypc dhcpcd[533]: enp3s0: offered 192.168.1.1 from 192.168.1.254
Apr 24 17:14:13 mypc dhcpcd[533]: enp3s0: DHCPv6 REPLY: No Addresses Available
Apr 24 17:14:14 mypc NetworkManager[479]: <info>  [1524582854.6193] dhcp4 (enp3s0):   address 192.168.1.1
Apr 24 17:14:14 mypc NetworkManager[479]: <info>  [1524582854.6193] dhcp4 (enp3s0):   plen 24
Apr 24 17:14:14 mypc NetworkManager[479]: <info>  [1524582854.6193] dhcp4 (enp3s0):   expires in 86400 seconds
Apr 24 17:14:14 mypc NetworkManager[479]: <info>  [1524582854.6194] dhcp4 (enp3s0):   nameserver '192.168.1.254'
Apr 24 17:14:14 mypc NetworkManager[479]: <info>  [1524582854.6194] dhcp4 (enp3s0):   nameserver '192.168.1.254'
Apr 24 17:14:14 mypc NetworkManager[479]: <info>  [1524582854.6194] dhcp4 (enp3s0):   domain name 'Speedport_W_724V_09021602_00_053'
Apr 24 17:14:14 mypc NetworkManager[479]: <info>  [1524582854.6194] dhcp4 (enp3s0):   gateway 192.168.1.254
Apr 24 17:14:14 mypc NetworkManager[479]: <info>  [1524582854.6212] dhcp4 (enp3s0): state changed unknown -> bound
Apr 24 17:14:14 mypc avahi-daemon[464]: Joining mDNS multicast group on interface enp3s0.IPv4 with address 192.168.1.1.
Apr 24 17:14:14 mypc NetworkManager[479]: <info>  [1524582854.6217] policy: set 'Telekom' (enp3s0) as default for IPv4 routing and DNS
Apr 24 17:14:14 mypc avahi-daemon[464]: New relevant interface enp3s0.IPv4 for mDNS.
Apr 24 17:14:14 mypc systemd[1]: Starting Network Manager Script Dispatcher Service...
Apr 24 17:14:14 mypc avahi-daemon[464]: Registering new address record for 192.168.1.1 on enp3s0.IPv4.
Apr 24 17:14:14 mypc dbus-daemon[463]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.7' (uid=0 pid=479 comm="/usr/bin/NetworkManager --no-daemon ")
Apr 24 17:14:14 mypc dbus-daemon[463]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Apr 24 17:14:14 mypc systemd[1]: Started Network Manager Script Dispatcher Service.
Apr 24 17:14:14 mypc nm-dispatcher[3085]: req:1 'dhcp4-change' [enp3s0]: new request (0 scripts)
Apr 24 17:14:14 mypc nm-dispatcher[3085]: req:1 'dhcp4-change' [enp3s0]: completed: no scripts
Apr 24 17:14:14 mypc dhcpcd[533]: enp3s0: leased 192.168.1.1 for 86400 seconds
Apr 24 17:14:14 mypc dhcpcd[533]: enp3s0: adding route to 192.168.1.0/24
Apr 24 17:14:14 mypc dhcpcd[533]: enp3s0: adding default route via 192.168.1.254
Apr 24 17:14:15 mypc kernel: [UFW BLOCK] IN=enp3s0 OUT= MAC=xx::xx SRC=x.x.x.x DST=192.168.1.1 LEN=98 TOS=0x00 PREC=0x20 TTL=51 ID=46143 DF PROTO=TCP SPT=993 DPT=58004 WINDOW=252 RES=0x00 ACK PSH URGP=0
Apr 24 17:14:15 mypc kernel: [UFW BLOCK] IN=enp3s0 OUT= MAC=xx::xx SRC=x.x.x.x DST=192.168.1.1 LEN=98 TOS=0x00 PREC=0x20 TTL=51 ID=56483 DF PROTO=TCP SPT=993 DPT=58006 WINDOW=252 RES=0x00 ACK PSH URGP=0
Apr 24 17:14:15 mypc ntpd[548]: Listen normally on 17 enp3s0 192.168.1.1:123
Apr 24 17:14:15 mypc ntpd[548]: new interface(s) found: waking up resolver
Apr 24 17:14:16 mypc kernel: [UFW BLOCK] IN=enp3s0 OUT= MAC=xx::xx SRC=x.x.x.x DST=192.168.1.1 LEN=98 TOS=0x00 PREC=0x20 TTL=51 ID=31285 DF PROTO=TCP SPT=993 DPT=57996 WINDOW=252 RES=0x00 ACK PSH URGP=0
Apr 24 17:14:17 mypc kernel: [UFW BLOCK] IN=enp3s0 OUT= MAC=xx::xx SRC=x.x.x.x DST=192.168.1.1 LEN=98 TOS=0x00 PREC=0x20 TTL=51 ID=44599 DF PROTO=TCP SPT=993 DPT=58012 WINDOW=252 RES=0x00 ACK PSH URGP=0
Apr 24 17:14:20 mypc dhcpcd[533]: enp3s0: DHCPv6 REPLY: No Addresses Available
-- Reboot --

I removed some IP and MAC addresses but everything's as is.

Edit:
And this is what I get after a successful resume. My untrained eyes don't see relevant changes. The end popped out at first but then i realized it's just the firewall.

Apr 24 17:33:33 mypc kernel: Freezing user space processes ... (elapsed 0.001 seconds) done.
Apr 24 17:33:33 mypc kernel: OOM killer disabled.
Apr 24 17:33:33 mypc kernel: Freezing remaining freezable tasks ... (elapsed 0.000 seconds) done.
Apr 24 17:33:33 mypc kernel: Suspending console(s) (use no_console_suspend to debug)
Apr 24 17:33:33 mypc kernel: sd 1:0:0:0: [sdb] Synchronizing SCSI cache
Apr 24 17:33:33 mypc kernel: sd 0:0:0:0: [sda] Synchronizing SCSI cache
Apr 24 17:33:33 mypc kernel: sd 0:0:0:0: [sda] Stopping disk
Apr 24 17:33:33 mypc kernel: sd 1:0:0:0: [sdb] Stopping disk
Apr 24 17:33:33 mypc kernel: ACPI: Preparing to enter system sleep state S3
Apr 24 17:33:33 mypc kernel: PM: Saving platform NVS memory
Apr 24 17:33:33 mypc kernel: Disabling non-boot CPUs ...
Apr 24 17:33:33 mypc kernel: smpboot: CPU 1 is now offline
Apr 24 17:33:33 mypc kernel: ACPI: Low-level resume complete
Apr 24 17:33:33 mypc kernel: PM: Restoring platform NVS memory
Apr 24 17:33:33 mypc kernel: Enabling non-boot CPUs ...
Apr 24 17:33:33 mypc kernel: x86: Booting SMP configuration:
Apr 24 17:33:33 mypc kernel: smpboot: Booting Node 0 Processor 1 APIC 0x2
Apr 24 17:33:33 mypc kernel:  cache: parent cpu1 should not be sleeping
Apr 24 17:33:33 mypc kernel: CPU1 is up
Apr 24 17:33:33 mypc kernel: ACPI: Waking up from system sleep state S3
Apr 24 17:33:33 mypc kernel: usb usb2: root hub lost power or was reset
Apr 24 17:33:33 mypc kernel: usb usb3: root hub lost power or was reset
Apr 24 17:33:33 mypc kernel: sd 0:0:0:0: [sda] Starting disk
Apr 24 17:33:33 mypc kernel: sd 1:0:0:0: [sdb] Starting disk
Apr 24 17:33:33 mypc kernel: r8169 0000:03:00.0 enp3s0: link down
Apr 24 17:33:33 mypc kernel: ata3: SATA link down (SStatus 0 SControl 300)
Apr 24 17:33:33 mypc kernel: ata6: SATA link down (SStatus 0 SControl 300)
Apr 24 17:33:33 mypc kernel: ata5: SATA link down (SStatus 0 SControl 300)
Apr 24 17:33:33 mypc kernel: ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Apr 24 17:33:33 mypc kernel: ata4: SATA link down (SStatus 0 SControl 300)
Apr 24 17:33:33 mypc kernel: ata2.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
Apr 24 17:33:33 mypc kernel: ata2.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
Apr 24 17:33:33 mypc kernel: ata2.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
Apr 24 17:33:33 mypc kernel: ata2.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
Apr 24 17:33:33 mypc kernel: ata2.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
Apr 24 17:33:33 mypc kernel: ata2.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
Apr 24 17:33:33 mypc kernel: ata2.00: configured for UDMA/133
Apr 24 17:33:33 mypc kernel: OOM killer enabled.
Apr 24 17:33:33 mypc kernel: Restarting tasks ...
Apr 24 17:33:33 mypc kernel: pci_bus 0000:06: Allocating resources
Apr 24 17:33:33 mypc kernel: pci 0000:05:00.0: bridge window [mem 0x00100000-0x000fffff 64bit pref] to [bus 06] add_size 200000 add_align 100000
Apr 24 17:33:33 mypc kernel: pci 0000:05:00.0: bridge window [mem 0x00100000-0x000fffff] to [bus 06] add_size 200000 add_align 100000
Apr 24 17:33:33 mypc kernel: pci 0000:05:00.0: BAR 14: no space for [mem size 0x00200000]
Apr 24 17:33:33 mypc kernel: pci 0000:05:00.0: BAR 14: failed to assign [mem size 0x00200000]
Apr 24 17:33:33 mypc kernel: pci 0000:05:00.0: BAR 15: no space for [mem size 0x00200000 64bit pref]
Apr 24 17:33:33 mypc kernel: pci 0000:05:00.0: BAR 15: failed to assign [mem size 0x00200000 64bit pref]
Apr 24 17:33:33 mypc kernel: pci 0000:05:00.0: BAR 14: no space for [mem size 0x00200000]
Apr 24 17:33:33 mypc kernel: pci 0000:05:00.0: BAR 14: failed to assign [mem size 0x00200000]
Apr 24 17:33:33 mypc kernel: pci 0000:05:00.0: BAR 15: no space for [mem size 0x00200000 64bit pref]
Apr 24 17:33:33 mypc kernel: pci 0000:05:00.0: BAR 15: failed to assign [mem size 0x00200000 64bit pref]
Apr 24 17:33:33 mypc kernel: done.
Apr 24 17:33:33 mypc dhcpcd[530]: enp3s0: carrier lost
Apr 24 17:33:33 mypc dhcpcd[530]: enp3s0: adding default route via fe80::1
Apr 24 17:33:33 mypc dhcpcd[530]: if_route (ADD): File exists
Apr 24 17:33:33 mypc dhcpcd[530]: enp3s0: deleting address fdxx::xx/64
Apr 24 17:33:33 mypc avahi-daemon[469]: Withdrawing address record for fdxx::xx on enp3s0.
Apr 24 17:33:33 mypc systemd-sleep[3298]: System resumed.
Apr 24 17:33:33 mypc kernel: PM: suspend exit
Apr 24 17:33:33 mypc systemd[1]: Started Suspend.
Apr 24 17:33:33 mypc systemd[1]: sleep.target: Unit not needed anymore. Stopping.
Apr 24 17:33:33 mypc systemd[1]: Stopped target Sleep.
Apr 24 17:33:33 mypc systemd[1]: Reached target Suspend.
Apr 24 17:33:33 mypc systemd[1]: suspend.target: Unit not needed anymore. Stopping.
Apr 24 17:33:33 mypc systemd[1]: Stopped target Suspend.
Apr 24 17:33:33 mypc systemd-logind[471]: Operation 'sleep' finished.
Apr 24 17:33:33 mypc NetworkManager[460]: <info>  [1524584013.7616] manager: sleep: wake requested (sleeping: yes  enabled: yes)
Apr 24 17:33:33 mypc NetworkManager[460]: <info>  [1524584013.7616] manager: NetworkManager state is now CONNECTED_GLOBAL
Apr 24 17:33:33 mypc dhcpcd[530]: enp3s0: deleting address 2001::xx/64
Apr 24 17:33:33 mypc avahi-daemon[469]: Withdrawing address record for 2001::xx on enp3s0.
Apr 24 17:33:33 mypc avahi-daemon[469]: Leaving mDNS multicast group on interface enp3s0.IPv6 with address 2001::xx.
Apr 24 17:33:33 mypc dhcpcd[530]: enp3s0: deleting route to fdxx::xx/64
Apr 24 17:33:33 mypc dhcpcd[530]: enp3s0: deleting route to 2001::xx/64
Apr 24 17:33:33 mypc avahi-daemon[469]: Joining mDNS multicast group on interface enp3s0.IPv6 with address fdxx::xx.
Apr 24 17:33:33 mypc dhcpcd[530]: enp3s0: deleting address fexx::xx
Apr 24 17:33:33 mypc avahi-daemon[469]: Withdrawing address record for 192.168.1.1 on enp3s0.
Apr 24 17:33:33 mypc avahi-daemon[469]: Leaving mDNS multicast group on interface enp3s0.IPv4 with address 192.168.1.1.
Apr 24 17:33:33 mypc avahi-daemon[469]: Interface enp3s0.IPv4 no longer relevant for mDNS.
Apr 24 17:33:33 mypc dhcpcd[530]: enp3s0: deleting route to 192.168.1.0/24
Apr 24 17:33:33 mypc dhcpcd[530]: enp3s0: deleting default route via 192.168.1.254
Apr 24 17:33:33 mypc /usr/bin/gpm[465]: *** info [mice.c(1990)]:
Apr 24 17:33:33 mypc /usr/bin/gpm[465]: imps2: Auto-detected intellimouse PS/2
Apr 24 17:33:34 mypc NetworkManager[460]: <info>  [1524584014.0485] device (enp3s0): carrier: link connected
Apr 24 17:33:34 mypc NetworkManager[460]: <info>  [1524584014.0494] device (enp3s0): DHCPv4 lease renewal requested
Apr 24 17:33:34 mypc kernel: r8169 0000:03:00.0 enp3s0: link up
Apr 24 17:33:34 mypc NetworkManager[460]: <info>  [1524584014.0494] dhcp4 (enp3s0): canceled DHCP transaction
Apr 24 17:33:34 mypc NetworkManager[460]: <info>  [1524584014.0494] dhcp4 (enp3s0): state changed bound -> done
Apr 24 17:33:34 mypc NetworkManager[460]: <info>  [1524584014.0498] dhcp4 (enp3s0): activation: beginning transaction (timeout in 45 seconds)
Apr 24 17:33:34 mypc dhcpcd[530]: enp3s0: carrier acquired
Apr 24 17:33:34 mypc dhcpcd[530]: enp3s0: IAID 22:ec:4d:ae
Apr 24 17:33:34 mypc kernel:  sdc: sdc1
Apr 24 17:33:34 mypc dhcpcd[530]: enp3s0: soliciting an IPv6 router
Apr 24 17:33:34 mypc dhcpcd[530]: enp3s0: rebinding lease of 192.168.1.1
Apr 24 17:33:35 mypc ntpd[555]: Deleting interface #4 enp3s0, fexx::xx%2#123, interface stats: received=0, sent=0, dropped=0, active_time=1094 secs
Apr 24 17:33:35 mypc ntpd[555]: Deleting interface #8 enp3s0, 2001::xx#123, interface stats: received=0, sent=0, dropped=0, active_time=1089 secs
Apr 24 17:33:35 mypc ntpd[555]: Deleting interface #9 enp3s0, fdxx::xx#123, interface stats: received=0, sent=0, dropped=0, active_time=1089 secs
Apr 24 17:33:35 mypc ntpd[555]: Deleting interface #10 enp3s0, 192.168.1.1#123, interface stats: received=70, sent=70, dropped=0, active_time=1086 secs
Apr 24 17:33:35 mypc ntpd[555]: x.x.x.x local addr 192.168.1.1 -> <null>
Apr 24 17:33:35 mypc ntpd[555]: x.x.x.x local addr 192.168.1.1 -> <null>
Apr 24 17:33:35 mypc ntpd[555]: x.x.x.x local addr 192.168.1.1 -> <null>
Apr 24 17:33:36 mypc ModemManager[467]: <info>  Couldn't check support for device '/sys/devices/pci0000:00/0000:00:1c.4/0000:03:00.0': not supported by any plugin
Apr 24 17:33:36 mypc kernel: ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
Apr 24 17:33:36 mypc kernel: ata1.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
Apr 24 17:33:36 mypc kernel: ata1.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
Apr 24 17:33:36 mypc kernel: ata1.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
Apr 24 17:33:36 mypc kernel: ata1.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
Apr 24 17:33:36 mypc kernel: ata1.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
Apr 24 17:33:36 mypc kernel: ata1.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
Apr 24 17:33:36 mypc kernel: ata1.00: configured for UDMA/133
Apr 24 17:33:38 mypc dhcpcd[530]: enp3s0: Router Advertisement from fe80::1
Apr 24 17:33:38 mypc dhcpcd[530]: enp3s0: adding address fdxx::xx/64
Apr 24 17:33:38 mypc dhcpcd[530]: enp3s0: adding address 2001::xx/64
Apr 24 17:33:38 mypc dhcpcd[530]: enp3s0: adding route to fd4a:ca1:7e60:1::/64
Apr 24 17:33:38 mypc dhcpcd[530]: enp3s0: adding route to 2001:4c4e:1388:fde9::/64
Apr 24 17:33:38 mypc dhcpcd[530]: enp3s0: adding default route via fe80::1
Apr 24 17:33:38 mypc dhcpcd[530]: enp3s0: soliciting a DHCPv6 lease
Apr 24 17:33:38 mypc dhcpcd[530]: enp3s0: DHCPv6 REPLY: No Addresses Available
Apr 24 17:33:39 mypc avahi-daemon[469]: Registering new address record for fdxx::xx on enp3s0.*.
Apr 24 17:33:39 mypc avahi-daemon[469]: Registering new address record for 2001::xx on enp3s0.*.
Apr 24 17:33:39 mypc dhcpcd[530]: enp3s0: DHCPv6 REPLY: No Addresses Available
Apr 24 17:33:39 mypc dhcpcd[530]: enp3s0: DHCP lease expired
Apr 24 17:33:39 mypc dhcpcd[530]: enp3s0: soliciting a DHCP lease
Apr 24 17:33:41 mypc ntpd[555]: Listen normally on 11 enp3s0 [2001::xx]:123
Apr 24 17:33:41 mypc ntpd[555]: Listen normally on 12 enp3s0 [fdxx::xx]:123
Apr 24 17:33:41 mypc ntpd[555]: new interface(s) found: waking up resolver
Apr 24 17:33:41 mypc dhcpcd[530]: enp3s0: DHCPv6 REPLY: No Addresses Available
Apr 24 17:33:41 mypc NetworkManager[460]: <info>  [1524584021.9686] dhcp4 (enp3s0):   address 192.168.1.1
Apr 24 17:33:41 mypc NetworkManager[460]: <info>  [1524584021.9686] dhcp4 (enp3s0):   plen 24
Apr 24 17:33:41 mypc NetworkManager[460]: <info>  [1524584021.9686] dhcp4 (enp3s0):   expires in 86400 seconds
Apr 24 17:33:41 mypc NetworkManager[460]: <info>  [1524584021.9687] dhcp4 (enp3s0):   nameserver '192.168.1.254'
Apr 24 17:33:41 mypc NetworkManager[460]: <info>  [1524584021.9687] dhcp4 (enp3s0):   nameserver '192.168.1.254'
Apr 24 17:33:41 mypc NetworkManager[460]: <info>  [1524584021.9687] dhcp4 (enp3s0):   domain name 'Speedport_W_724V_09021602_00_053'
Apr 24 17:33:41 mypc NetworkManager[460]: <info>  [1524584021.9687] dhcp4 (enp3s0):   gateway 192.168.1.254
Apr 24 17:33:41 mypc NetworkManager[460]: <info>  [1524584021.9711] dhcp4 (enp3s0): state changed unknown -> bound
Apr 24 17:33:41 mypc NetworkManager[460]: <info>  [1524584021.9717] policy: set 'Telekom' (enp3s0) as default for IPv4 routing and DNS
Apr 24 17:33:41 mypc dbus-daemon[459]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.6' (uid=0 pid=460 comm="/usr/bin/NetworkManager --no-daemon ")
Apr 24 17:33:41 mypc avahi-daemon[469]: Joining mDNS multicast group on interface enp3s0.IPv4 with address 192.168.1.1.
Apr 24 17:33:41 mypc systemd[1]: Starting Network Manager Script Dispatcher Service...
Apr 24 17:33:41 mypc avahi-daemon[469]: New relevant interface enp3s0.IPv4 for mDNS.
Apr 24 17:33:41 mypc avahi-daemon[469]: Registering new address record for 192.168.1.1 on enp3s0.IPv4.
Apr 24 17:33:41 mypc dbus-daemon[459]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Apr 24 17:33:41 mypc systemd[1]: Started Network Manager Script Dispatcher Service.
Apr 24 17:33:41 mypc nm-dispatcher[3512]: req:1 'dhcp4-change' [enp3s0]: new request (0 scripts)
Apr 24 17:33:41 mypc nm-dispatcher[3512]: req:1 'dhcp4-change' [enp3s0]: completed: no scripts
Apr 24 17:33:42 mypc dhcpcd[530]: enp3s0: offered 192.168.1.1 from 192.168.1.254
Apr 24 17:33:42 mypc dhcpcd[530]: enp3s0: leased 192.168.1.1 for 86400 seconds
Apr 24 17:33:42 mypc dhcpcd[530]: enp3s0: adding route to 192.168.1.0/24
Apr 24 17:33:42 mypc dhcpcd[530]: enp3s0: adding default route via 192.168.1.254
Apr 24 17:33:43 mypc ntpd[555]: Listen normally on 13 enp3s0 192.168.1.1:123
Apr 24 17:33:43 mypc ntpd[555]: new interface(s) found: waking up resolver
Apr 24 17:33:45 mypc dhcpcd[530]: enp3s0: DHCPv6 REPLY: No Addresses Available

Last edited by freyr (2018-04-24 15:45:48)


What, so everyone's supposed to sleep every single night now? You realize that nighttime makes up half of all time?

Offline

#11 2018-04-24 21:59:47

rogerthat
Member
Registered: 2016-11-15
Posts: 56

Re: Lock with sflock on suspend/hibernate

Weeeeiiiirrd.
I don't get a freeze, but I am seeing that the lock actually only lasts as long as the systemd suspend thread is running (because I have a sleep in there for testing). Then the screen unlocks itself!

This sflock doesn't seem to work so great! All I want is a screen lock on suspend. hmm

See if your freeze goes away if you change from a "pre)" condition to a "post)" condition:

/usr/lib/systemd/system-sleep/sleep-lock.sh ::

#!/bin/bash
case $1 in
  post)
    echo "sleep-lock.sh script running: $1/$2"
    pid=$(pgrep openbox)
    IFS='=' read key user < <(grep -z USER /proc/$pid/environ)
    su -c /usr/local/bin/lock - $user
    /usr/bin/sleep 9
    echo "sleep-lock.sh script done: $1/$2"
    ;;
esac

/usr/local/bin/lock ::

#!/bin/bash
echo "lock script running"
pid=$(pgrep openbox)
IFS='=' read key display < <(grep -z DISPLAY /proc/$pid/environ)
env DISPLAY=$display /usr/bin/sflock -f '-*-fixed-*-*-*--13-*-*-*-*-*-*-*'
echo "lock script finished"

Offline

#12 2018-04-25 15:01:17

freyr
Member
From: Hungary
Registered: 2010-02-04
Posts: 131

Re: Lock with sflock on suspend/hibernate

rogerthat wrote:

Weeeeiiiirrd.
I don't get a freeze, but I am seeing that the lock actually only lasts as long as the systemd suspend thread is running (because I have a sleep in there for testing). Then the screen unlocks itself!

This sflock doesn't seem to work so great! All I want is a screen lock on suspend. hmm

See if your freeze goes away if you change from a "pre)" condition to a "post)" condition:

In that case nothing happens. ...Do those echo statements go somewhere? I know that when I run a script with cron it goes to a dead.letter file as a failed email, is there something similar for echo?

Edit: even if I suspend from the command line, I get back the prompt immediately before the suspend happens and nothing gets echoed.

Last edited by freyr (2018-04-25 15:09:00)


What, so everyone's supposed to sleep every single night now? You realize that nighttime makes up half of all time?

Offline

#13 2018-04-26 04:22:47

rogerthat
Member
Registered: 2016-11-15
Posts: 56

Re: Lock with sflock on suspend/hibernate

Yeah, output is here...

journalctl -b -u systemd-suspend

Offline

#14 2018-04-26 15:12:12

freyr
Member
From: Hungary
Registered: 2010-02-04
Posts: 131

Re: Lock with sflock on suspend/hibernate

rogerthat wrote:

Yeah, output is here...

journalctl -b -u systemd-suspend

Well...

-- Logs begin at Fri 2018-03-30 19:31:03 CEST, end at Thu 2018-04-26 17:11:20 CEST. --
-- No entries --

What, so everyone's supposed to sleep every single night now? You realize that nighttime makes up half of all time?

Offline

#15 2018-04-27 04:57:06

rogerthat
Member
Registered: 2016-11-15
Posts: 56

Re: Lock with sflock on suspend/hibernate

frycking sflock

I just want a screen lock on suspend! Is that so much to ask?

Offline

#16 2018-04-27 12:52:28

freyr
Member
From: Hungary
Registered: 2010-02-04
Posts: 131

Re: Lock with sflock on suspend/hibernate

Indeed.

For now I'm switching to physlock.

Last edited by freyr (2018-04-27 12:52:52)


What, so everyone's supposed to sleep every single night now? You realize that nighttime makes up half of all time?

Offline

Board footer

Powered by FluxBB