You are not logged in.

#26 2022-03-08 20:18:58

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

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

So lets try whether we can extract some information from that…

Exec=/usr/bin/bash -c "/usr/bin/conky --pause=5 </dev/null &>/tmp/conky.log &"

Offline

#27 2022-03-09 03:03:25

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

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

seth wrote:

So lets try whether we can extract some information from that…

Exec=/usr/bin/bash -c "/usr/bin/conky --pause=5 </dev/null &>/tmp/conky.log &"

This is what i got for the log:

conky: desktop window (400010) is subwindow of root window (6c9)
conky: window type - desktop
conky: drawing to created window (0x1600002)
conky: drawing to double buffer
conky: curl: no data from server, got HTTP status 503

Seems like what it gave me from the terminal.
Nothing changed.

Offline

#28 2022-03-09 06:42:32

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

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

There's just one curl call in your conky:

${color}${execi 1200 curl -s www.wttr.in/xxxxxx | sed -n '3,7{s/\d27\[[0-9;]*m//g;s/^..//;s/ *$//;p}'}

What if you comment/remove that and try conky's behavior w/o it?

Offline

#29 2022-03-09 21:21:17

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

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

seth wrote:

There's just one curl call in your conky:

${color}${execi 1200 curl -s www.wttr.in/xxxxxx | sed -n '3,7{s/\d27\[[0-9;]*m//g;s/^..//;s/ *$//;p}'}

What if you comment/remove that and try conky's behavior w/o it?

I commented out the curl and ran conky with

[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

After 15 mins of being idle, PC was went into suspension mode and upon logging back I saw conky to be intact on the desktop.
However if I logged back in after more than 60 mins, it seems to disappear.

Last edited by ozooha (2022-03-10 01:01:45)

Offline

#30 2022-03-10 07:17:42

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

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

However if I logged back in after more than 60 mins, it seems to disappear.

So the curl error might be a red herring.

However, I just SIGSEGV'd and SIGABRT'd conky and it clearly leaves a coredump behind, so either it's just terminating (for whatever reason) or you need to look a bit closer at the coredumps.
In doubt,

Exec=/usr/bin/strace -o /tmp/conky.strace /usr/bin/conky  --pause=5

it…

Offline

#31 2022-03-10 16:55:23

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

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

seth wrote:

However if I logged back in after more than 60 mins, it seems to disappear.

So the curl error might be a red herring.

However, I just SIGSEGV'd and SIGABRT'd conky and it clearly leaves a coredump behind, so either it's just terminating (for whatever reason) or you need to look a bit closer at the coredumps.
In doubt,

Exec=/usr/bin/strace -o /tmp/conky.strace /usr/bin/conky  --pause=5

it…

it ended with

recvmsg(4, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="[\3Rp\2\0`\1\5\0`\1\311!\16\0\0\0\0\0\353\0\371\2\245\5\36\0\353\0\371\2", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(4, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=4, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}])
writev(4, [{iov_base="\212\v\4\0\7\0`\1\0\0\0\0\353\0\371\2\212\r\4\0\6\0`\1\7\0`\1\6\0`\1", iov_len=32}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 32
recvmsg(4, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
pselect6(4, [3], NULL, NULL, {tv_sec=0, tv_nsec=0}, NULL) = 0 (Timeout)
poll([{fd=4, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}])
writev(4, [{iov_base="\217\3\4\0\5\0`\1\6\0`\1\0\0\0\0\212\v\2\0\6\0`\1", iov_len=24}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 24
recvmsg(4, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
pselect6(5, [4], NULL, NULL, {tv_sec=0, tv_nsec=845365000}, NULL) = 0 (Timeout)
futex(0x56266e7ab5d8, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x56266e72a058, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x56266e72fbb8, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x56266e72b4f8, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x56266e70ce98, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x56266e72cab8, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x56266e72cd38, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x56266e72db18, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x56266c9677c0, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, FUTEX_BITSET_MATCH_ANY) = ?
+++ killed by SIGPIPE +++

Search for SIGSEGV or SIGABRT revealed nothing.
I have the file (conky.strace) but am not sure what you are looking for since its content is large.
Is there a site where i can upload to? or do u care for any grep words?

Let me know.
Thanks,
OZooHA

Last edited by ozooha (2022-03-10 18:25:22)

Offline

#32 2022-03-10 20:52:39

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

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

+++ killed by SIGPIPE +++

https://github.com/brndnmtthws/conky/issues/446 - old and claimed fixed, but worth a shot (remove the rss call and see whether that stabilizes things)

Offline

#33 2022-03-11 03:42:52

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

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

seth wrote:

+++ killed by SIGPIPE +++

https://github.com/brndnmtthws/conky/issues/446 - old and claimed fixed, but worth a shot (remove the rss call and see whether that stabilizes things)

The rss feed was commenting out and conky remains intact on the desktop, after logging back from suspension for more than 60 mins.

Conky's rss feed is the cause despite the claim of resolving that issue as per your link. 

I guess I have to do without the rss feature....what a bummer.

Thanks for you effort.

I will edit the header to include SOLVED.

Cheers.

OZooHA

Offline

#34 2022-03-11 06:23:04

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

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

You could file a bug against conky - what's curious is the surrounding requirements (the conky invocation through the autostart entry and the S3 trigger, since this smells like a network issue)
Maybe you could have https://wiki.archlinux.org/title/Power_ … stem-sleep that SIGSTOP and SIGCONT conky around the S3?

Offline

#35 2022-03-11 18:20:59

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

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

seth wrote:

You could file a bug against conky - what's curious is the surrounding requirements (the conky invocation through the autostart entry and the S3 trigger, since this smells like a network issue)
Maybe you could have https://wiki.archlinux.org/title/Power_ … stem-sleep that SIGSTOP and SIGCONT conky around the S3?

Based on the Arch link above, if I understand you correctly, I could use that script to:

/usr/lib/systemd/system-sleep/example.sh

#!/bin/sh
case $1/$2 in
  pre/*)
    echo "Going to $2..."
    kill -9 $(pidof conky)
    ;;
  post/*)
    echo "Waking up from $2..."
    conky </dev/null &>/dev/null &
    ;;
esac

Correct me if I am wrong, if not help me with the script.

OZooHA

Offline

#36 2022-03-11 19:43:06

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

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

You're wrong  tongue
You could do sth. like that but would have to change the user and export some environment variables, because the script is run by root and outside an X11 session, but the plan was actually to "pkill -SIGSTOP conky" and "pkill -SIGCONT conky"
I assume the rss reader doesn't like that network is withdrawn during the S3, so stopping the process before and continuing it after the system goes to sleep might sufficiently hide that incident.
You might have to eg. "(sleep 5; pkill -SIGCONT conky) &" to wait for the network to return.

Offline

#37 2022-03-11 23:56:07

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

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

seth wrote:

You're wrong  tongue
You could do sth. like that but would have to change the user and export some environment variables, because the script is run by root and outside an X11 session, but the plan was actually to "pkill -SIGSTOP conky" and "pkill -SIGCONT conky"
I assume the rss reader doesn't like that network is withdrawn during the S3, so stopping the process before and continuing it after the system goes to sleep might sufficiently hide that incident.
You might have to eg. "(sleep 5; pkill -SIGCONT conky) &" to wait for the network to return.

Didn't you love sayin it big_smile.

I apologize for my ignorance but I get  the overall gist, just not the bash script portion which you suggest.

So would that script change to

#!/bin/sh
case $1/$2 in
  pre/*)
    echo "Going to $2..."
    pkill -SIGSTOP conky
    ;;
  post/*)
    echo "Waking up from $2..."
    sleep 5; pkill -SIGCONT conky &
    ;;
esac

Again, would appreciate your input for me to run this and validate it.
Thanks,
OZooHA

Last edited by ozooha (2022-03-11 23:56:57)

Offline

#38 2022-03-12 07:16:55

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

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

sleep 5; pkill -SIGCONT conky &

(sleep 5; pkill -SIGCONT conky) &

The braces open a subshell and you're forking that. Within the subshell, pkill waits for the sleep to end.
Forking pkill as in your line makes no sense whatsoever.

I get off on people having to admit that I was right, but I don't get anything out of telling others that they're wrong smile

Offline

#39 2022-03-12 17:37:27

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

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

seth wrote:

sleep 5; pkill -SIGCONT conky &

(sleep 5; pkill -SIGCONT conky) &

The braces open a subshell and you're forking that. Within the subshell, pkill waits for the sleep to end.
Forking pkill as in your line makes no sense whatsoever.

I get off on people having to admit that I was right, but I don't get anything out of telling others that they're wrong smile


Did not work as in conky wasn't there on desktop. RSS was enable in conky. The file was made executable

OZLinux systemd/system-sleep » ls -al /usr/lib/systemd/system-sleep      
total 12
drwxr-xr-x  2 root root 4096 Mar 12 10:58 .
drwxr-xr-x 18 root root 4096 Feb 27 23:24 ..
-rwxr-xr-x  1 root root  183 Mar 12 10:58 conky_wake.sh
OZLinux systemd/system-sleep » more /usr/lib/systemd/system-sleep/conky_wake.sh 
#!/bin/sh
case $1/$2 in
  pre/*)
    echo "Going to $2..."
    pkill -SIGSTOP conky
    ;;
  post/*)
    echo "Waking up from $2..."
    (sleep 5; pkill -SIGCONT conky) &
    ;;
esac
OZLinux systemd/system-sleep » 

The following was shown

OZLinux systemd/system-sleep » sudo journalctl -b -u systemd-suspend.service

Mar 12 11:18:44 OZLinux systemd[1]: Starting System Suspend...
Mar 12 11:18:44 OZLinux systemd-sleep[894]: Going to suspend...
Mar 12 11:20:14 OZLinux systemd-sleep[892]: Entering sleep state 'suspend'...
Mar 12 12:25:20 OZLinux systemd-sleep[892]: System returned from sleep state.
Mar 12 12:25:20 OZLinux systemd-sleep[999]: Waking up from suspend...
Mar 12 12:25:20 OZLinux systemd[1]: systemd-suspend.service: Deactivated successfully.
Mar 12 12:25:20 OZLinux systemd[1]: Finished System Suspend.
OZLinux systemd/system-sleep » 

However when i ran   (sleep 5; pkill -SIGCONT conky) &, conky did start up.

Any ideas?
OZooHA

Last edited by ozooha (2022-03-12 17:55:22)

Offline

#40 2022-03-12 20:32:08

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

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

conky did start up

It cannot have started conky, but if conky was still stopped at the time, either the subshell was killed or the timeout is too short (?)

#!/bin/sh
case $1/$2 in
  pre/*)
    echo "Going to $2..."
    pkill -SIGSTOP conky
    ;;
  post/*)
    echo "Waking up from $2..."
    (sleep 5;  echo "continue conky" > /tmp/conky.debug; pkill -SIGCONT conky) &
    ;;
esac

See whether you get /tmp/conky.debug - if yes, try to increase the timeout (though that'd be weird). If no, don't sleep, subshell or fork - just "pkill -SIGCONT conky" right away.

Offline

#41 2022-03-12 23:51:55

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

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

seth wrote:

conky did start up

It cannot have started conky, but if conky was still stopped at the time, either the subshell was killed or the timeout is too short (?)

#!/bin/sh
case $1/$2 in
  pre/*)
    echo "Going to $2..."
    pkill -SIGSTOP conky
    ;;
  post/*)
    echo "Waking up from $2..."
    (sleep 5;  echo "continue conky" > /tmp/conky.debug; pkill -SIGCONT conky) &
    ;;
esac

See whether you get /tmp/conky.debug - if yes, try to increase the timeout (though that'd be weird). If no, don't sleep, subshell or fork - just "pkill -SIGCONT conky" right away.

So it did not work as in the /tmp/conky.debug did not get created. So the option was to check

OZLinux➜  system-sleep  ᐅ  sudo journalctl -b -u systemd-suspend.service

Mar 12 18:08:41 OZLinux systemd[1]: Starting System Suspend...
Mar 12 18:08:41 OZLinux systemd-sleep[891]: Going to suspend...
Mar 12 18:08:41 OZLinux [890]: /usr/lib/systemd/system-sleep/conky_wake.sh failed with exit status 1.
Mar 12 18:08:41 OZLinux systemd-sleep[889]: Entering sleep state 'suspend'...
Mar 12 18:28:27 OZLinux systemd-sleep[968]: Waking up from suspend...
Mar 12 18:28:27 OZLinux systemd-sleep[889]: System returned from sleep state.
Mar 12 18:28:27 OZLinux systemd[1]: systemd-suspend.service: Deactivated successfully.
Mar 12 18:28:27 OZLinux systemd[1]: Finished System Suspend.
OZLinux➜  system-sleep  ᐅ  

Dunno why it failed.

Offline

#42 2022-03-13 06:39:50

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

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

/usr/lib/systemd/system-sleep/conky_wake.sh failed with exit status 1.

There was no conky process around at the time?

/tmp/conky.debug did not get created

#!/bin/bash

Also you might want to test whether this can be a mitigation at all by manually SIGSTOP'ing and SIGCONT'ing conky around the S3

Offline

#43 2022-03-13 15:53:21

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

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

seth wrote:

/tmp/conky.debug did not get created

#!/bin/bash

Also you might want to test whether this can be a mitigation at all by manually SIGSTOP'ing and SIGCONT'ing conky around the S3

Ruling the latter out as it worked:

[oh-my-zsh] Random theme 'sorin' loaded
~ ❯ pkill -SIGSTOP conky 
~ ❯ (sleep 5; echo "continue conky" > /tmp/conky.debug; pkill -SIGCONT conky) &        
[1] 2653
~ ❯ 
[1]  + 2653 done       ( sleep 5; echo "continue conky" > /tmp/conky.debug; pkill -SIGCONT conky; )
~ ❯ more /tmp/conky.debug 
continue conky
~ ❯ 

Offline

#44 2022-03-13 15:56:18

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

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

I'm very confident that SIGSTOP and SIGCONT will work. The question is whether doing so around the S3 prevents conky from SIGPIPE'ing.

Offline

#45 2022-03-13 15:59:12

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

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

seth wrote:

/usr/lib/systemd/system-sleep/conky_wake.sh failed with exit status 1.

There was no conky process around at the time?

it appears to be there just when the screen shuts to suspend mode.

Offline

#46 2022-03-14 11:50:33

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

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

seth wrote:

I'm very confident that SIGSTOP and SIGCONT will work. The question is whether doing so around the S3 prevents conky from SIGPIPE'ing.

How does one test it just before reaching the S3 state?
Wouldn't it wake up the system just before it goes into the S3 state?
Maybe I misunderstood you, so could you clarify, how I can test it.
Thanks,
OZooHA

Offline

#47 2022-03-14 12:06:17

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

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

You just stop the process, then wait until the timout triggers the S3, then wake the system and then (assumign the conky process survived) continue it and see what happens.

Offline

#48 2022-03-15 00:34:04

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

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

seth wrote:

You just stop the process, then wait until the timout triggers the S3, then wake the system and then (assumign the conky process survived) continue it and see what happens.

So i stopped i using

pkill -SIGSTOP conky

and it froze. After it when into S3, I logged back to see if it was there - it did not.
I had to manually do this for it to come back.

ozooha@OZLinux:~ $ (sleep 5; echo "continue conky" > /tmp/conky.debug; pkill -SIGCONT conky) &
[1] 1352
ozooha@OZLinux:~ $ 
[1]  + 1352 done       ( sleep 5; echo "continue conky" > /tmp/conky.debug; pkill -SIGCONT conky; )

Was I correct in my understanding of what you wanted me to do?

Offline

#49 2022-03-15 07:02:17

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

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

"pkill -SIGCONT conky" would have done in this context, but apparently the STOP/CONT can prevent the rss induced PIPE

So back to your script… try this first:

#!/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

Offline

#50 2022-03-16 01:17:46

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

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

seth wrote:

"pkill -SIGCONT conky" would have done in this context, but apparently the STOP/CONT can prevent the rss induced PIPE

So back to your script… try this first:

#!/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

Forgive my tardiness.
This is the resulting output:

OZLinux :: ~ % sudo journalctl -b -u systemd-suspend.service                                                                                                                                        

Mar 15 20:49:49 OZLinux systemd[1]: Starting System Suspend...
Mar 15 20:49:49 OZLinux systemd-sleep[3403]: Entering sleep state 'suspend'...
Mar 15 20:49:49 OZLinux systemd-sleep[3406]: Going to suspend...
Mar 15 20:49:49 OZLinux systemd-sleep[3405]: No conky before S3 :(
Mar 15 21:01:53 OZLinux systemd-sleep[3489]: Waking up from suspend...
Mar 15 21:01:53 OZLinux systemd-sleep[3403]: System returned from sleep state.
Mar 15 21:01:53 OZLinux systemd-sleep[3485]: No conky after S3 :(
Mar 15 21:01:53 OZLinux systemd[1]: systemd-suspend.service: Deactivated successfully.
Mar 15 21:01:53 OZLinux systemd[1]: Finished System Suspend.

So conky disappears it seems before going to S3.
I start it using the autostart feature of gnome (as mentioned earlier in this thread), does it have to do anything with that?

Last edited by ozooha (2022-03-16 01:18:05)

Offline

Board footer

Powered by FluxBB