You are not logged in.

#51 2022-03-16 06:53:53

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,256

Re: [SOLVED] Conky disappears from desktop when i login from suspend

So conky disappears it seems before going to S3.

https://wiki.archlinux.org/title/Networ … dispatcher ?

does it have to do anything with that?

I was under the impression that we had established that conky run from an interactive shell would not exhibit this behavior - so probably "yes". Not really sure, though, "how".

Offline

#52 2022-03-17 13:23:01

ozooha
Member
Registered: 2009-09-29
Posts: 184

Re: [SOLVED] Conky disappears from desktop when i login from suspend

seth wrote:

So conky disappears it seems before going to S3.

https://wiki.archlinux.org/title/Networ … dispatcher ?

I use systemd.networkd so this article talking about the NetworkManager might not apply???

seth wrote:

does it have to do anything with that?

I was under the impression that we had established that conky run from an interactive shell would not exhibit this behavior - so probably "yes". Not really sure, though, "how".

Yes I did start it using what is in the in ~/.config/autostart/conky.desktop
See below for the outputs:

OZLinux :: ~ » more .config/autostart/conky.desktop 
[Desktop Entry]
Name=Conky
GenericName=ConkyStartup
Comment=Start conky on boot
Exec=/usr/bin/zsh -c "/usr/bin/conky --pause=5 </dev/null &>/dev/null &"
Terminal=false
Type=Application
X-GNOME-Autostart-enabled=true
OZLinux :: ~ » /usr/bin/zsh -c "/usr/bin/conky --pause=5 </dev/null &>/dev/null &"
OZLinux :: ~ » sudo journalctl -b -u systemd-suspend.service

[sudo] password for ozooha: 
Mar 16 20:21:46 OZLinux systemd[1]: Starting System Suspend...
Mar 16 20:21:47 OZLinux systemd-sleep[974]: Going to suspend...
Mar 16 20:21:47 OZLinux systemd-sleep[976]: 881 590
Mar 16 20:21:47 OZLinux systemd-sleep[973]: Stopping conky
Mar 16 20:23:17 OZLinux systemd-sleep[971]: Entering sleep state 'suspend'...
Mar 17 09:10:54 OZLinux systemd-sleep[971]: System returned from sleep state.
Mar 17 09:10:54 OZLinux systemd-sleep[1088]: Waking up from suspend...
Mar 17 09:10:54 OZLinux systemd-sleep[1093]: 881 590
Mar 17 09:10:54 OZLinux systemd-sleep[1087]: Continue conky
Mar 17 09:10:52 OZLinux systemd[1]: systemd-suspend.service: Deactivated successfully.
Mar 17 09:10:52 OZLinux systemd[1]: Finished System Suspend.
OZLinux :: ~ » more /usr/lib/systemd/system-sleep/conky_wake.sh  
#!/bin/bash
case $1/$2 in
  pre/*)
    if pidof conky; then
        echo "Stopping conky"
        pkill -SIGSTOP conky
    else
        echo "No conky before S3 :("
    fi
    ;;
  post/*)
    if pidof conky; then
        echo "Continue conky"
        pkill -SIGCONT conky
    else
        echo "No conky after S3 :("
    fi
    ;;
esac
OZLinux :: ~ » 

Looks like conky is being recognized when run straight from the shell since in the if portion of the sh there exist pidof conky.
However am not sure about the pkill SIGSTOP/SIGCONT portions as conky seems absent on the desktop when i log back.

Again apologize for the delay in my response.

Offline

#53 2022-03-17 14:31:08

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,256

Re: [SOLVED] Conky disappears from desktop when i login from suspend

so this article talking about the NetworkManager might not apply?

No, sorry - I was under the false impression that you're using NM.

as conky seems absent on the desktop when i log back.

Did you check the unfiltered journal on whether the SIGCONT is being run resp. the process list on whether conky is still there?
This is however moot if this context doesn't cause the SIGPIPE to begin with.

On more thing: "881 590" - are there two conky processes?

Offline

#54 2022-03-17 18:00:29

ozooha
Member
Registered: 2009-09-29
Posts: 184

Re: [SOLVED] Conky disappears from desktop when i login from suspend

seth wrote:

so this article talking about the NetworkManager might not apply?

No, sorry - I was under the false impression that you're using NM.

as conky seems absent on the desktop when i log back.

Did you check the unfiltered journal on whether the SIGCONT is being run resp. the process list on whether conky is still there?
This is however moot if this context doesn't cause the SIGPIPE to begin with.

On more thing: "881 590" - are there two conky processes?


So I re-did the above and the outputs are below with my comments:

[oh-my-zsh] Random theme 'sunrise' loaded
--- ~ » /usr/bin/zsh -c "/usr/bin/conky --pause=5 </dev/null &>/dev/null &"
--- ~ » sudo journalctl -b -u systemd-suspend.service
[sudo] password for ozooha: 
Mar 17 12:54:47 OZLinux systemd[1]: Starting System Suspend...
Mar 17 12:54:47 OZLinux systemd-sleep[930]: Going to suspend...
Mar 17 12:54:47 OZLinux systemd-sleep[932]: 813
Mar 17 12:54:47 OZLinux systemd-sleep[929]: Stopping conky
Mar 17 12:56:17 OZLinux systemd-sleep[927]: Entering sleep state 'suspend'...
Mar 17 13:35:43 OZLinux systemd-sleep[1039]: Waking up from suspend...
Mar 17 13:35:43 OZLinux systemd-sleep[927]: System returned from sleep state.
Mar 17 13:35:43 OZLinux systemd-sleep[1046]: 813
Mar 17 13:35:43 OZLinux systemd-sleep[1038]: Continue conky
Mar 17 13:35:43 OZLinux systemd[1]: systemd-suspend.service: Deactivated successfully.
Mar 17 13:35:43 OZLinux systemd[1]: Finished System Suspend.

unfiltered journal output here

[oh-my-zsh] Random theme 'jispwoso' loaded
ozooha@OZLinux: /home/ozooha  
➜   sudo journalctl -S "2022-03-17 12:54:00" | grep conky         
[sudo] password for ozooha: 
Mar 17 12:54:47 OZLinux systemd-sleep[929]: Stopping conky
Mar 17 13:35:43 OZLinux systemd-sleep[1038]: Continue conky
Mar 17 13:35:43 OZLinux systemd[1]: mnt-NFSDrive.automount: Got automount request for /mnt/NFSDrive, triggered by 834 (conky)
ozooha@OZLinux: /home/ozooha  
➜   

So i greped the conky process, it seems to be there.

My attempt at getting it to the foreground doesn't work as it say it doesn't exist. I do that because I do not see it on my desktop.

OZLinux:~ $ ps aux | grep conky
ozooha      2311  0.0  0.0   6672  2624 pts/2    S+   13:46   0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox conky
OZLinux:~ $ jobs
OZLinux:~ $ ps aux | grep 813  
ozooha       403  0.0  0.0  18132 10904 ?        Ss   12:39   0:00 /usr/lib/systemd/systemd --user
ozooha      2364  0.0  0.0   6672  2580 pts/2    S+   13:48   0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox 813
OZLinux:~ $ fg 813
fg: job not found: 813
OZLinux:~ $ fg $(pidof conky)                                                                                          127 
fg: no current job
OZLinux:~ $   

I am confused, since it (sudo journalctl -b -u systemd-suspend.service) says that it gets resumed but it doesn't show up on the desktop.
The latter being confirmed by the bringing it into the foreground.

I am not sure whats happening. Please help.

Offline

#55 2022-03-17 20:28:00

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,256

Re: [SOLVED] Conky disappears from desktop when i login from suspend

OZLinux:~ $ ps aux | grep conky
OZLinux:~ $ ps aux | grep 813

Seems conky dies after the sigcont… does that mean the way conky is started is ultimately irrelevant?

#!/bin/bash
case $1/$2 in
  pre/*)
    if pidof conky; then
        echo "Stopping conky"
        pkill -SIGSTOP conky
    else
        echo "No conky before S3 :("
    fi
    ;;
  post/*)
    if pidof conky; then
        echo "Continue conky later"
        (sleep 5; echo "Continue conky now" > /tmp/savemyconky.dbg; pkill -SIGCONT conky) &
    else
        echo "No conky after S3 :("
    fi
    ;;
esac

fg 813

fg requires a job ID, not a process ID.
Try "jobs"

Offline

#56 2022-03-18 00:19:22

ozooha
Member
Registered: 2009-09-29
Posts: 184

Re: [SOLVED] Conky disappears from desktop when i login from suspend

seth wrote:
#!/bin/bash
case $1/$2 in
  pre/*)
    if pidof conky; then
        echo "Stopping conky"
        pkill -SIGSTOP conky
    else
        echo "No conky before S3 :("
    fi
    ;;
  post/*)
    if pidof conky; then
        echo "Continue conky later"
        (sleep 5; echo "Continue conky now" > /tmp/savemyconky.dbg; pkill -SIGCONT conky) &
    else
        echo "No conky after S3 :("
    fi
    ;;
esac

the /tmp/savemyconky.dbg does not get created

The output for this using the

╭─ozooha@OZLinux ~  
╰─➤  sudo journalctl -b -u systemd-suspend.service                 
[sudo] password for ozooha: 
Mar 17 20:00:37 OZLinux systemd[1]: Starting System Suspend...
Mar 17 20:00:37 OZLinux systemd-sleep[944]: Going to suspend...
Mar 17 20:00:37 OZLinux systemd-sleep[946]: 830
Mar 17 20:00:37 OZLinux systemd-sleep[943]: Stopping conky
Mar 17 20:00:37 OZLinux systemd-sleep[948]: 830
Mar 17 20:00:37 OZLinux systemd-sleep[945]: Stopping conky
Mar 17 20:02:07 OZLinux systemd-sleep[941]: Entering sleep state 'suspend'...
Mar 17 20:09:29 OZLinux systemd-sleep[941]: System returned from sleep state.
Mar 17 20:09:29 OZLinux systemd-sleep[1056]: Waking up from suspend...
Mar 17 20:09:29 OZLinux systemd-sleep[1063]: 830
Mar 17 20:09:29 OZLinux systemd-sleep[1057]: Continue conky
Mar 17 20:09:29 OZLinux systemd-sleep[1064]: 830
Mar 17 20:09:29 OZLinux systemd-sleep[1055]: Continue conky later
Mar 17 20:09:29 OZLinux systemd[1]: systemd-suspend.service: Deactivated successfully.
Mar 17 20:09:29 OZLinux systemd[1]: Finished System Suspend.
╭─ozooha@OZLinux ~  
╰─➤  

There doesn't seem to be any jobs output.

Needless to add, I did not see any conky on my desktop after resuming from suspend.

Last edited by ozooha (2022-03-18 00:20:33)

Offline

#57 2022-03-18 08:17:39

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,256

Re: [SOLVED] Conky disappears from desktop when i login from suspend

the /tmp/savemyconky.dbg does not get created

(sleep 5; echo "Continue conky now" > /tmp/savemyconky.dbg; pkill -SIGCONT conky) & disown

Mar 17 20:00:37 OZLinux systemd-sleep[944]: Going to suspend...
Mar 17 20:00:37 OZLinux systemd-sleep[946]: 830
Mar 17 20:00:37 OZLinux systemd-sleep[943]: Stopping conky
Mar 17 20:00:37 OZLinux systemd-sleep[948]: 830
Mar 17 20:00:37 OZLinux systemd-sleep[945]: Stopping conky
Mar 17 20:02:07 OZLinux systemd-sleep[941]: Entering sleep state 'suspend'...
Mar 17 20:09:29 OZLinux systemd-sleep[941]: System returned from sleep state.
Mar 17 20:09:29 OZLinux systemd-sleep[1056]: Waking up from suspend...
Mar 17 20:09:29 OZLinux systemd-sleep[1063]: 830
Mar 17 20:09:29 OZLinux systemd-sleep[1057]: Continue conky
Mar 17 20:09:29 OZLinux systemd-sleep[1064]: 830
Mar 17 20:09:29 OZLinux systemd-sleep[1055]: Continue conky later

This looks as if you've multiple iterations of the hook in place??

Offline

#58 2022-03-18 13:28:08

ozooha
Member
Registered: 2009-09-29
Posts: 184

Re: [SOLVED] Conky disappears from desktop when i login from suspend

the /tmp/savemyconky.dbg does not get created

(sleep 5; echo "Continue conky now" > /tmp/savemyconky.dbg; pkill -SIGCONT conky) & disown

This still did not produce a dbg file as expected



Mar 17 20:00:37 OZLinux systemd-sleep[944]: Going to suspend...
Mar 17 20:00:37 OZLinux systemd-sleep[946]: 830
Mar 17 20:00:37 OZLinux systemd-sleep[943]: Stopping conky
Mar 17 20:00:37 OZLinux systemd-sleep[948]: 830
Mar 17 20:00:37 OZLinux systemd-sleep[945]: Stopping conky
Mar 17 20:02:07 OZLinux systemd-sleep[941]: Entering sleep state 'suspend'...
Mar 17 20:09:29 OZLinux systemd-sleep[941]: System returned from sleep state.
Mar 17 20:09:29 OZLinux systemd-sleep[1056]: Waking up from suspend...
Mar 17 20:09:29 OZLinux systemd-sleep[1063]: 830
Mar 17 20:09:29 OZLinux systemd-sleep[1057]: Continue conky
Mar 17 20:09:29 OZLinux systemd-sleep[1064]: 830
Mar 17 20:09:29 OZLinux systemd-sleep[1055]: Continue conky later

This looks as if you've multiple iterations of the hook in place??

Here is the new output:

% sudo journalctl -b -u systemd-suspend.service                      
[sudo] password for ozooha: 
Mar 18 08:57:58 OZLinux systemd[1]: Starting System Suspend...
Mar 18 08:57:58 OZLinux systemd-sleep[937]: 817
Mar 18 08:57:58 OZLinux systemd-sleep[936]: Stopping conky
Mar 18 08:59:28 OZLinux systemd-sleep[934]: Entering sleep state 'suspend'...
Mar 18 09:19:05 OZLinux systemd-sleep[934]: System returned from sleep state.
Mar 18 09:19:05 OZLinux systemd-sleep[1047]: 817
Mar 18 09:19:05 OZLinux systemd-sleep[1042]: Continue conky later
Mar 18 09:19:11 OZLinux systemd[1]: systemd-suspend.service: Deactivated successfully.
Mar 18 09:19:11 OZLinux systemd[1]: Finished System Suspend.
9:19 ozooha@OZLinux /home/ozooha

Offline

#59 2022-03-18 15:35:48

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,256

Re: [SOLVED] Conky disappears from desktop when i login from suspend

pfff…

#!/bin/bash
case $1/$2 in
  pre/*)
    if pidof conky; then
        echo "Stopping conky"
        pkill -SIGSTOP conky
    else
        echo "No conky before S3 :("
    fi
    ;;
  post/*)
    if pidof conky; then
        echo "Continue conky later"
        sleep 5
        echo "Continue conky now"
        pkill -SIGCONT conky
    else
        echo "No conky after S3 :("
    fi
    ;;
esac

Offline

#60 2022-03-18 16:22:57

ozooha
Member
Registered: 2009-09-29
Posts: 184

Re: [SOLVED] Conky disappears from desktop when i login from suspend

seth wrote:

pfff…

#!/bin/bash
case $1/$2 in
  pre/*)
    if pidof conky; then
        echo "Stopping conky"
        pkill -SIGSTOP conky
    else
        echo "No conky before S3 :("
    fi
    ;;
  post/*)
    if pidof conky; then
        echo "Continue conky later"
        sleep 5
        echo "Continue conky now"
        pkill -SIGCONT conky
    else
        echo "No conky after S3 :("
    fi
    ;;
esac

Got this but still no dice as conky does not show up on the desktop.

 ozooha@OZLinux  /home/ozooha   sudo journalctl -b -u systemd-suspend.service                                  11:41:44 
[sudo] password for ozooha: 
Mar 18 11:56:48 OZLinux systemd[1]: Starting System Suspend...
Mar 18 11:56:48 OZLinux systemd-sleep[945]: 799
Mar 18 11:56:48 OZLinux systemd-sleep[944]: Stopping conky
Mar 18 11:58:18 OZLinux systemd-sleep[942]: Entering sleep state 'suspend'...
Mar 18 12:16:32 OZLinux systemd-sleep[942]: System returned from sleep state.
Mar 18 12:16:32 OZLinux systemd-sleep[1050]: 799
Mar 18 12:16:32 OZLinux systemd-sleep[1046]: Continue conky later
Mar 18 12:16:37 OZLinux systemd-sleep[1046]: Continue conky now
Mar 18 12:16:37 OZLinux systemd[1]: systemd-suspend.service: Deactivated successfully.
Mar 18 12:16:37 OZLinux systemd[1]: Finished System Suspend.

pkill -SIGCONT conky does not enable it to show up on the desktop.

Offline

#61 2022-03-18 16:31:40

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,256

Re: [SOLVED] Conky disappears from desktop when i login from suspend

pkill -SIGCONT conky does not enable it to show up on the desktop.

he more interesting question is whether there's still a conky process at theis time (there certainly is after the wakeup from the S3)

Offline

#62 2022-03-18 19:15:32

ozooha
Member
Registered: 2009-09-29
Posts: 184

Re: [SOLVED] Conky disappears from desktop when i login from suspend

seth wrote:

pkill -SIGCONT conky does not enable it to show up on the desktop.

he more interesting question is whether there's still a conky process at theis time (there certainly is after the wakeup from the S3)

I don't think so give this output below.
The output below is the same as the one above but i repeated it again after it goes to suspend the second time.....see timestamp (duplicate is the 12 hrs one from above and the repeat is from 15hrs).
It clearly states at 15:03 that it has no conky. So, this implies that after the first instance at 12 it did not exist after the wakeup.

 ozooha@OZLinux  /home/ozooha   sudo journalctl -b -u systemd-suspend.service                                  12:16:49 
[sudo] password for ozooha: 
Mar 18 11:56:48 OZLinux systemd[1]: Starting System Suspend...
Mar 18 11:56:48 OZLinux systemd-sleep[945]: 799
Mar 18 11:56:48 OZLinux systemd-sleep[944]: Stopping conky
Mar 18 11:58:18 OZLinux systemd-sleep[942]: Entering sleep state 'suspend'...
Mar 18 12:16:32 OZLinux systemd-sleep[942]: System returned from sleep state.
Mar 18 12:16:32 OZLinux systemd-sleep[1050]: 799
Mar 18 12:16:32 OZLinux systemd-sleep[1046]: Continue conky later
Mar 18 12:16:37 OZLinux systemd-sleep[1046]: Continue conky now
Mar 18 12:16:37 OZLinux systemd[1]: systemd-suspend.service: Deactivated successfully.
Mar 18 12:16:37 OZLinux systemd[1]: Finished System Suspend.
Mar 18 12:38:06 OZLinux systemd[1]: Starting System Suspend...
Mar 18 12:38:06 OZLinux systemd-sleep[1645]: Entering sleep state 'suspend'...
Mar 18 15:08:01 OZLinux systemd-sleep[1647]: No conky before S3 :(
Mar 18 15:08:01 OZLinux systemd-sleep[1721]: No conky after S3 :(
Mar 18 15:08:01 OZLinux systemd-sleep[1645]: System returned from sleep state.
Mar 18 15:08:01 OZLinux systemd[1]: systemd-suspend.service: Deactivated successfully.
Mar 18 15:08:01 OZLinux systemd[1]: Finished System Suspend.
 ozooha@OZLinux  /home/ozooha     

Let me know your thoughts.


Now the unfiltered journal output:

[sudo] password for ozooha: 
Mar 18 11:56:48 OZLinux systemd-sleep[944]: Stopping conky
Mar 18 12:16:32 OZLinux systemd-sleep[1046]: Continue conky later
Mar 18 12:16:37 OZLinux systemd-sleep[1046]: Continue conky now
Mar 18 12:16:37 OZLinux systemd[1]: mnt-NFSDrive.automount: Got automount request for /mnt/NFSDrive, triggered by 854 (conky)
Mar 18 15:08:01 OZLinux systemd-sleep[1647]: No conky before S3 :(
Mar 18 15:08:01 OZLinux systemd-sleep[1721]: No conky after S3 :(
~ ᐅ 

Conky seems to exist after waking up the first time at 12 hrs as it requests the automount of my network drive and then (speculation here) it crashes upon executing the RSS portion.
This probably explains why at 15 hrs it  ceases  to exist.

So given what you had provided about the resolution of conky's rss issue, it confirms that the crash issue still exist.

Last edited by ozooha (2022-03-18 19:24:44)

Offline

#63 2022-03-18 20:05:37

ozooha
Member
Registered: 2009-09-29
Posts: 184

Re: [SOLVED] Conky disappears from desktop when i login from suspend

Just to validate my point above that RSS in conky is the issue I commented it out and reran conky.
The output is presented below i.e. runing conky and the unfiltered journalctl:

~ ᐅ /usr/bin/zsh -c "/usr/bin/conky --pause=5 </dev/null &>/dev/null &"
~ ᐅ sudo journalctl -S "2022-03-18 11:55:00" | grep conky              
[sudo] password for ozooha: 
Mar 18 11:56:48 OZLinux systemd-sleep[944]: Stopping conky
Mar 18 12:16:32 OZLinux systemd-sleep[1046]: Continue conky later
Mar 18 12:16:37 OZLinux systemd-sleep[1046]: Continue conky now
Mar 18 12:16:37 OZLinux systemd[1]: mnt-NFSDrive.automount: Got automount request for /mnt/NFSDrive, triggered by 854 (conky)
Mar 18 15:08:01 OZLinux systemd-sleep[1647]: No conky before S3 :(
Mar 18 15:08:01 OZLinux systemd-sleep[1721]: No conky after S3 :(
Mar 18 15:26:35 OZLinux systemd[1]: mnt-NFSDrive.automount: Got automount request for /mnt/NFSDrive, triggered by 2510 (conky)
Mar 18 15:41:35 OZLinux systemd-sleep[2594]: Stopping conky
Mar 18 15:57:59 OZLinux systemd-sleep[2693]: Continue conky later
Mar 18 15:58:05 OZLinux systemd-sleep[2693]: Continue conky now
Mar 18 15:58:05 OZLinux systemd[1]: mnt-NFSDrive.automount: Got automount request for /mnt/NFSDrive, triggered by 2536 (conky)
~ ᐅ 

Also the filtered journalctl for post S3

⚡ sudo journalctl -b -u systemd-suspend.service
Mar 18 11:56:48 OZLinux systemd[1]: Starting System Suspend...
Mar 18 11:56:48 OZLinux systemd-sleep[945]: 799
Mar 18 11:56:48 OZLinux systemd-sleep[944]: Stopping conky
Mar 18 11:58:18 OZLinux systemd-sleep[942]: Entering sleep state 'suspend'...
Mar 18 12:16:32 OZLinux systemd-sleep[942]: System returned from sleep state.
Mar 18 12:16:32 OZLinux systemd-sleep[1050]: 799
Mar 18 12:16:32 OZLinux systemd-sleep[1046]: Continue conky later
Mar 18 12:16:37 OZLinux systemd-sleep[1046]: Continue conky now
Mar 18 12:16:37 OZLinux systemd[1]: systemd-suspend.service: Deactivated successfully.
Mar 18 12:16:37 OZLinux systemd[1]: Finished System Suspend.
Mar 18 12:38:06 OZLinux systemd[1]: Starting System Suspend...
Mar 18 12:38:06 OZLinux systemd-sleep[1645]: Entering sleep state 'suspend'...
Mar 18 15:08:01 OZLinux systemd-sleep[1647]: No conky before S3 :(
Mar 18 15:08:01 OZLinux systemd-sleep[1721]: No conky after S3 :(
Mar 18 15:08:01 OZLinux systemd-sleep[1645]: System returned from sleep state.
Mar 18 15:08:01 OZLinux systemd[1]: systemd-suspend.service: Deactivated successfully.
Mar 18 15:08:01 OZLinux systemd[1]: Finished System Suspend.
Mar 18 15:41:35 OZLinux systemd[1]: Starting System Suspend...
Mar 18 15:41:35 OZLinux systemd-sleep[2595]: 2510
Mar 18 15:41:35 OZLinux systemd-sleep[2594]: Stopping conky
Mar 18 15:43:05 OZLinux systemd-sleep[2592]: Entering sleep state 'suspend'...
Mar 18 15:57:59 OZLinux systemd-sleep[2592]: System returned from sleep state.
Mar 18 15:57:59 OZLinux systemd-sleep[2703]: 2510
Mar 18 15:57:59 OZLinux systemd-sleep[2693]: Continue conky later
Mar 18 15:58:05 OZLinux systemd-sleep[2693]: Continue conky now
Mar 18 15:58:05 OZLinux systemd[1]: systemd-suspend.service: Deactivated successfully.
Mar 18 15:58:05 OZLinux systemd[1]: Finished System Suspend.

Needless to add conky was present on the desktop after logging back from S3.
So RSS is the issue and more likely the in built curl within conky.

Let me know your thoughts.

Offline

#64 2022-03-18 21:06:42

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,256

Re: [SOLVED] Conky disappears from desktop when i login from suspend

The last thing I could suggest is to increase the sleep (try "60" instead of "5") and file a bug against conky.
(Though the circumstance will make it rather hard to debug this one - you might be able to trigger this by just stopping the network?)

Offline

#65 2022-03-20 15:05:59

ozooha
Member
Registered: 2009-09-29
Posts: 184

Re: [SOLVED] Conky disappears from desktop when i login from suspend

seth wrote:

The last thing I could suggest is to increase the sleep (try "60" instead of "5") and file a bug against conky.
(Though the circumstance will make it rather hard to debug this one - you might be able to trigger this by just stopping the network?)

I will file a bug.
Stopping the network as in systemctl stop systemd-networkd.service?

Offline

#66 2022-03-20 15:12:20

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,256

Re: [SOLVED] Conky disappears from desktop when i login from suspend

Probably - I've zero experience w/ systemd-networkd

Offline

#67 2022-03-20 16:05:18

ozooha
Member
Registered: 2009-09-29
Posts: 184

Re: [SOLVED] Conky disappears from desktop when i login from suspend

seth wrote:

The last thing I could suggest is to increase the sleep (try "60" instead of "5") and file a bug against conky.

well, well, what would you know i tried the sleep of 60 secs and conky appears on its own along with the rss feed.
So yes, it works but with much delay. ( your rationale for this?)

The script and the output from the CLI:

[oh-my-zsh] Random theme 'awesomepanda' loaded
➜  ~ more /usr/lib/systemd/system-sleep/conky_wake.sh
#!/bin/bash
case $1/$2 in
  pre/*)
    if pidof conky; then
        echo "Stopping conky"
        pkill -SIGSTOP conky
    else
        echo "No conky before S3 :("
    fi
    ;;
  post/*)
    if pidof conky; then
        echo "Continue conky later"
        sleep 60
	echo "Continue conky now" 
	pkill -SIGCONT conky
    else
        echo "No conky after S3 :("
    fi
    ;;
esac
➜  ~ sudo journalctl -b -u systemd-suspend.service        
[sudo] password for ozooha: 
Mar 20 11:25:20 OZLinux systemd[1]: Starting System Suspend...
Mar 20 11:25:20 OZLinux systemd-sleep[877]: 566
Mar 20 11:25:20 OZLinux systemd-sleep[876]: Stopping conky
Mar 20 11:26:50 OZLinux systemd-sleep[874]: Entering sleep state 'suspend'...
Mar 20 11:57:31 OZLinux systemd-sleep[874]: System returned from sleep state.
Mar 20 11:57:31 OZLinux systemd-sleep[986]: 566
Mar 20 11:57:31 OZLinux systemd-sleep[982]: Continue conky later
➜  ~ sudo journalctl -b -u systemd-suspend.service
Mar 20 11:25:20 OZLinux systemd[1]: Starting System Suspend...
Mar 20 11:25:20 OZLinux systemd-sleep[877]: 566
Mar 20 11:25:20 OZLinux systemd-sleep[876]: Stopping conky
Mar 20 11:26:50 OZLinux systemd-sleep[874]: Entering sleep state 'suspend'...
Mar 20 11:57:31 OZLinux systemd-sleep[874]: System returned from sleep state.
Mar 20 11:57:31 OZLinux systemd-sleep[986]: 566
Mar 20 11:57:31 OZLinux systemd-sleep[982]: Continue conky later
Mar 20 11:58:31 OZLinux systemd-sleep[982]: Continue conky now
Mar 20 11:58:31 OZLinux systemd[1]: systemd-suspend.service: Deactivated successfully.
Mar 20 11:58:31 OZLinux systemd[1]: Finished System Suspend.
➜  ~ 

So all is well in the conky land for me.

Thanks for your help Seth. You are a very patient guy.
Cheers and happy rest of the day to you.
OZooHA

Offline

#68 2022-03-20 16:08:17

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,256

Re: [SOLVED] Conky disappears from desktop when i login from suspend

The rationale is that you need to wait out until the network is available again. Probably.

while ! ping -qc1 $SERVER > /dev/null 2>&1; do
    sleep 0.5
done

Replace $SERVER w/ a relevant host or, in doubt, google.com ;-)

Offline

#69 2022-03-21 23:39:11

ozooha
Member
Registered: 2009-09-29
Posts: 184

Re: [SOLVED] Conky disappears from desktop when i login from suspend

For those who have this issue the idea was to delay conky enough to access the network because it has RSS components in it.
So no need to use this /usr/lib/systemd/system-sleep/conky_wake.sh script but to change the actual ~/.config/autostart/conky.desktop script:

[Desktop Entry]
Name=Conky
GenericName=ConkyStartup
Comment=Start conky on boot
Exec=/usr/bin/zsh -c "/usr/bin/conky --pause=10 </dev/null &>/dev/null &"
Terminal=false
Type=Application
X-GNOME-Autostart-enabled=true

The delay was from 5 secs to 10 secs.

I hope this helps others.
Cheers to Seth for patiently helping out - he da man.

OZooHA

Last edited by ozooha (2022-03-24 00:24:15)

Offline

#70 2022-03-22 04:23:29

kermit63
Member
Registered: 2018-07-04
Posts: 372

Re: [SOLVED] Conky disappears from desktop when i login from suspend

One problem I foresee with this approach is it assumes your network and the servers it accesses are always available after the initial delay, which may not always be the case. If for some reason your network goes down, the conky script may stall.

An added precaution is to enclose those conky statements that require network access with ${if_up network_device} and $endif commands to make sure other parts of the conky script will execute even if the network is down. As such, you can probably reduce the pause to 5 seconds. The parts of the script that require network access may not show up initially, but will show up once network connection is established on the next refresh.

NOTE: I didn't read the thread in its entirety, so I apologize if someone has already mentioned this.


Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.

Offline

#71 2022-03-22 06:57:26

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,256

Re: [SOLVED] Conky disappears from desktop when i login from suspend

-p, --pause=SECS          pause for SECS seconds at startup before doing anything

I don't see how the change in #69 can have *any* relevance to the SIGPIPE on waking from an S3 (except if the DE was to kill ands restart every autostart process around an S3, hat would be insane)

Offline

#72 2022-03-24 00:18:13

ozooha
Member
Registered: 2009-09-29
Posts: 184

Re: [SOLVED] Conky disappears from desktop when i login from suspend

kermit63 wrote:

One problem I foresee with this approach is it assumes your network and the servers it accesses are always available after the initial delay, which may not always be the case. If for some reason your network goes down, the conky script may stall.

An added precaution is to enclose those conky statements that require network access with ${if_up network_device} and $endif commands to make sure other parts of the conky script will execute even if the network is down. As such, you can probably reduce the pause to 5 seconds. The parts of the script that require network access may not show up initially, but will show up once network connection is established on the next refresh.

NOTE: I didn't read the thread in its entirety, so I apologize if someone has already mentioned this.

Point taken, but since this is a desktop wired directly to the router I won't face that issue.
If the internet is down then what do I care, I know why its the case.
But for all functional purposes this is a great insight/solution given that I didn't know why it disappeared after logging back from S3.

OZooHA

Last edited by ozooha (2022-03-24 00:25:00)

Offline

Board footer

Powered by FluxBB