You are not logged in.

#26 2026-08-29 07:25:41

Enrico1989
Member
Registered: 2018-07-05
Posts: 422

Re: Hardware boots, but the system doesn't

Changed the script to this

#!/bin/sh
case $1/$2 in
  pre/*)
    echo "Going to $2..."
    echo 'Trying to exit transmission…'
    sudo -u enrico transmission-remote --exit
    echo "Exit code was $?"
    ;;
  post/*)
    echo "Waking up from $2..."
    echo 'Trying to start transmission…'
    while ! sudo -u enrico transmission-daemon; do
      echo 'Failed, trying again in 1 sec…'
      sleep 1
    done
    echo 'Running transmission-daemon completed successfully.'
    ;;
esac

And the journal

Aug 29 09:19:08 greywarden systemd-sleep[595800]: Going to suspend...
Aug 29 09:19:08 greywarden systemd-sleep[595800]: Trying to exit transmission…
Aug 29 09:19:08 greywarden sudo[595801]:     root : PWD=/ ; USER=enrico ; COMMAND=/usr/bin/transmission-remote --exit
Aug 29 09:19:08 greywarden sudo[595801]: pam_unix(sudo:session): session opened for user enrico(uid=1000) by (uid=0)
Aug 29 09:19:08 greywarden systemd-sleep[595803]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 09:19:08 greywarden systemd-sleep[595800]: Exit code was 1
Aug 29 09:19:08 greywarden sudo[595801]: pam_unix(sudo:session): session closed for user enrico
Aug 29 09:19:08 greywarden systemd-sleep[595797]: Performing sleep operation 'suspend'...
Aug 29 09:19:31 greywarden systemd-sleep[595797]: System returned from sleep operation 'suspend'.
Aug 29 09:19:31 greywarden systemd-sleep[595921]: Waking up from suspend...
Aug 29 09:19:31 greywarden systemd-sleep[595921]: Trying to start transmission…
Aug 29 09:19:31 greywarden sudo[595926]:     root : PWD=/ ; USER=enrico ; COMMAND=/usr/bin/transmission-daemon
Aug 29 09:19:31 greywarden sudo[595926]: pam_unix(sudo:session): session opened for user enrico(uid=1000) by (uid=0)
Aug 29 09:19:31 greywarden sudo[595926]: pam_unix(sudo:session): session closed for user enrico
Aug 29 09:19:31 greywarden systemd-sleep[595921]: Running transmission-daemon completed successfully.
Aug 29 09:19:32 greywarden transmission-daemon[595960]: ip-cache.cc:306 Couldn't obtain source address in any IP protocol, no network connections possible (ip-cache.cc:306)
Aug 29 09:19:49 greywarden transmission-daemon[595960]: Closing session
Aug 29 09:19:49 greywarden systemd[1]: systemd-suspend.service: Deactivated successfully.
Aug 29 09:19:49 greywarden systemd[1]: Finished System Suspend.
Aug 29 09:19:49 greywarden systemd[1]: systemd-suspend.service: Consumed 3.297s CPU time over 25.771s wall clock time, 12.3M memory peak.

initially looked more reassuring, because the message 'Running transmission-daemon completed successfully' was printed, meaning that 'sudo -u enrico transmission-daemon' did run successfully, no?

Yet

$ transmission-remote -l
Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server

Offline

#27 2026-08-29 15:13:13

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

Re: Hardware boots, but the system doesn't

How do you normally start transmission? It comes w/ a systemd service and a sysusers entry, so probably what you want to do is simply "systemctl stop transmission-daemon" and "systemctl start transmission-daemon" ?

Offline

#28 2026-08-29 15:26:01

Enrico1989
Member
Registered: 2018-07-05
Posts: 422

Re: Hardware boots, but the system doesn't

I normally just run

transmission-daemon

Offline

#29 2026-08-29 15:33:15

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

Re: Hardware boots, but the system doesn't

Couldn't obtain source address in any IP protocol

probably means there's no network.
For this basic test it would suffice to ensure transmission is stopped on suspend and then manually restart it afterwards but you could try to prepend this with

while ! ping -qc1 google.com > /dev/null 2>&1; do
        sleep 0.5
done

Offline

#30 2026-08-29 15:43:45

Enrico1989
Member
Registered: 2018-07-05
Posts: 422

Re: Hardware boots, but the system doesn't

seth wrote:

Couldn't obtain source address in any IP protocol

probably means there's no network.

Why should that have any influence?

I mean if this code

    while ! sudo -u enrico transmission-daemon; do
      echo 'Failed, trying again in 1 sec…'
      sleep 1
    done

doesn't loop forever, it means that

sudo -u enrico transmission-daemon

succeeded, so how is it possible that it's not running afterwards?

Offline

#31 2026-08-29 15:57:48

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

Re: Hardware boots, but the system doesn't

The daemon starts, later figures that

Aug 29 09:19:32 greywarden transmission-daemon[595960]: ip-cache.cc:306 Couldn't obtain source address in any IP protocol, no network connections possible (ip-cache.cc:306)
Aug 29 09:19:49 greywarden transmission-daemon[595960]: Closing session

If

transmission-daemon

returns to your shell (despite it now running) that means it forks, the while loop you're running becomes meaningless

if false & ; then echo snafu; fi

Offline

#32 2026-08-29 21:44:39

Enrico1989
Member
Registered: 2018-07-05
Posts: 422

Re: Hardware boots, but the system doesn't

I've tried with this

#!/bin/sh
case $1/$2 in
  pre/*)
    echo "Going to $2..."
    echo 'Trying to exit transmission-daemon (pid ' $(pidof transmission-daemon) ')…'
    while transmission-remote -l || [[ -n $(pidof transmission-daemon) ]]; do
      sudo -u enrico transmission-remote --exit
      sleep 1
    done
    echo 'transmission-daemon exited successfully.'
    ;;
  post/*)
    echo "Waking up from $2..."
    if [[ -n $(pidof transmission-daemon) ]]; then
      echo 'transmission-daemon already running??? (pid '"$(pidof transmission-daemon)"')'
    fi
    echo 'Trying to start transmission…'
    while ! ping -qc1 google.com > /dev/null 2>&1; do
      echo 'waiting for internet'
      sleep 1
    done
    while ! transmission-remote -l; do
      sudo -u enrico transmission-daemon
      echo 'Waiting for transmission-daemon to actually start'
      sleep 1
    done
    echo 'Running transmission-daemon completed successfully.'
    echo 'pidof transmission-daemon = ' $(pidof transmission-daemon)
    ;;
esac

but it still doesn't work.

Based on the output in the journal

Aug 29 23:35:42 greywarden systemd-sleep[1370615]: Going to suspend...
Aug 29 23:35:42 greywarden systemd-sleep[1370615]: Trying to exit transmission-daemon (pid  1370122 )…
Aug 29 23:35:42 greywarden systemd-sleep[1370617]:     ID    Done       Have  ETA              Up      Down  Ratio  Status       Name
Aug 29 23:35:42 greywarden systemd-sleep[1370617]:      1   0.00%       None  Unknown         0.0       0.0   0.00  Idle         Il.Premio.2017.iTALiAN.BRRip.XviD.BLUWORLD
Aug 29 23:35:42 greywarden systemd-sleep[1370617]:      2   84.1%    1.36 GB  Unknown         0.0       0.0   2.74  Idle         The Invitation (2015).H264.ita.eng.sub.ita.iCV-MIRCrew.mkv
Aug 29 23:35:42 greywarden systemd-sleep[1370617]:      5   39.5%   697.4 MB  Unknown         0.0       0.0   0.00  Idle         Point Break (2015) - BD Rip ITA-Eng HD.mkv
Aug 29 23:35:42 greywarden systemd-sleep[1370617]:      3     n/a       None  Unknown         0.0       0.0   None  Idle         Tutto+può+accadere+-+Career+opportunities+(1991)+[Mux+720p+-+H264+-+Ita+Eng+Aac]+HDTV
Aug 29 23:35:42 greywarden systemd-sleep[1370617]:      4   17.0%   212.8 MB  Unknown         0.0       0.0   0.03  Idle         Il principe delle maree
Aug 29 23:35:42 greywarden systemd-sleep[1370617]:      6    100%   22.65 GB  Done            0.0       0.0   0.00  Idle         One.Piece.2023.S02.1080p.NF.WEB-DL.DDP5.1.ENG.ITA.Atmos.H264-TheBlackKing
Aug 29 23:35:42 greywarden systemd-sleep[1370617]: Sum:             24.92 GB                  0.0       0.0
Aug 29 23:35:42 greywarden sudo[1370618]:     root : PWD=/ ; USER=enrico ; COMMAND=/usr/bin/transmission-remote --exit
Aug 29 23:35:42 greywarden sudo[1370618]: pam_unix(sudo:session): session opened for user enrico(uid=1000) by (uid=0)
Aug 29 23:35:42 greywarden systemd-sleep[1370620]: localhost:9091/transmission/rpc/ acknowledged notification
Aug 29 23:35:42 greywarden sudo[1370618]: pam_unix(sudo:session): session closed for user enrico
Aug 29 23:35:43 greywarden systemd-sleep[1370624]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:43 greywarden sudo[1370626]:     root : PWD=/ ; USER=enrico ; COMMAND=/usr/bin/transmission-remote --exit
Aug 29 23:35:43 greywarden sudo[1370626]: pam_unix(sudo:session): session opened for user enrico(uid=1000) by (uid=0)
Aug 29 23:35:43 greywarden systemd-sleep[1370628]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:43 greywarden sudo[1370626]: pam_unix(sudo:session): session closed for user enrico
Aug 29 23:35:44 greywarden systemd-sleep[1370658]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:44 greywarden sudo[1370660]:     root : PWD=/ ; USER=enrico ; COMMAND=/usr/bin/transmission-remote --exit
Aug 29 23:35:44 greywarden sudo[1370660]: pam_unix(sudo:session): session opened for user enrico(uid=1000) by (uid=0)
Aug 29 23:35:44 greywarden systemd-sleep[1370662]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:44 greywarden sudo[1370660]: pam_unix(sudo:session): session closed for user enrico
Aug 29 23:35:45 greywarden systemd-sleep[1370666]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:45 greywarden sudo[1370668]:     root : PWD=/ ; USER=enrico ; COMMAND=/usr/bin/transmission-remote --exit
Aug 29 23:35:45 greywarden sudo[1370668]: pam_unix(sudo:session): session opened for user enrico(uid=1000) by (uid=0)
Aug 29 23:35:45 greywarden systemd-sleep[1370670]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:45 greywarden sudo[1370668]: pam_unix(sudo:session): session closed for user enrico
Aug 29 23:35:46 greywarden systemd-sleep[1370692]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:46 greywarden sudo[1370694]:     root : PWD=/ ; USER=enrico ; COMMAND=/usr/bin/transmission-remote --exit
Aug 29 23:35:46 greywarden sudo[1370694]: pam_unix(sudo:session): session opened for user enrico(uid=1000) by (uid=0)
Aug 29 23:35:46 greywarden systemd-sleep[1370696]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:46 greywarden sudo[1370694]: pam_unix(sudo:session): session closed for user enrico
Aug 29 23:35:47 greywarden systemd-sleep[1370700]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:47 greywarden sudo[1370702]:     root : PWD=/ ; USER=enrico ; COMMAND=/usr/bin/transmission-remote --exit
Aug 29 23:35:47 greywarden sudo[1370702]: pam_unix(sudo:session): session opened for user enrico(uid=1000) by (uid=0)
Aug 29 23:35:47 greywarden systemd-sleep[1370704]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:47 greywarden sudo[1370702]: pam_unix(sudo:session): session closed for user enrico
Aug 29 23:35:48 greywarden systemd-sleep[1370726]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:48 greywarden sudo[1370728]:     root : PWD=/ ; USER=enrico ; COMMAND=/usr/bin/transmission-remote --exit
Aug 29 23:35:48 greywarden sudo[1370728]: pam_unix(sudo:session): session opened for user enrico(uid=1000) by (uid=0)
Aug 29 23:35:48 greywarden systemd-sleep[1370730]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:48 greywarden sudo[1370728]: pam_unix(sudo:session): session closed for user enrico
Aug 29 23:35:49 greywarden systemd-sleep[1370734]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:49 greywarden sudo[1370738]:     root : PWD=/ ; USER=enrico ; COMMAND=/usr/bin/transmission-remote --exit
Aug 29 23:35:49 greywarden sudo[1370738]: pam_unix(sudo:session): session opened for user enrico(uid=1000) by (uid=0)
Aug 29 23:35:49 greywarden systemd-sleep[1370740]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:49 greywarden sudo[1370738]: pam_unix(sudo:session): session closed for user enrico
Aug 29 23:35:50 greywarden systemd-sleep[1370765]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:50 greywarden sudo[1370767]:     root : PWD=/ ; USER=enrico ; COMMAND=/usr/bin/transmission-remote --exit
Aug 29 23:35:50 greywarden sudo[1370767]: pam_unix(sudo:session): session opened for user enrico(uid=1000) by (uid=0)
Aug 29 23:35:50 greywarden systemd-sleep[1370769]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:50 greywarden sudo[1370767]: pam_unix(sudo:session): session closed for user enrico
Aug 29 23:35:51 greywarden systemd-sleep[1370773]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:51 greywarden sudo[1370775]:     root : PWD=/ ; USER=enrico ; COMMAND=/usr/bin/transmission-remote --exit
Aug 29 23:35:51 greywarden sudo[1370775]: pam_unix(sudo:session): session opened for user enrico(uid=1000) by (uid=0)
Aug 29 23:35:51 greywarden systemd-sleep[1370777]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:51 greywarden sudo[1370775]: pam_unix(sudo:session): session closed for user enrico
Aug 29 23:35:53 greywarden systemd-sleep[1370800]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:53 greywarden sudo[1370802]:     root : PWD=/ ; USER=enrico ; COMMAND=/usr/bin/transmission-remote --exit
Aug 29 23:35:53 greywarden sudo[1370802]: pam_unix(sudo:session): session opened for user enrico(uid=1000) by (uid=0)
Aug 29 23:35:53 greywarden systemd-sleep[1370804]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:53 greywarden sudo[1370802]: pam_unix(sudo:session): session closed for user enrico
Aug 29 23:35:54 greywarden systemd-sleep[1370826]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:54 greywarden sudo[1370828]:     root : PWD=/ ; USER=enrico ; COMMAND=/usr/bin/transmission-remote --exit
Aug 29 23:35:54 greywarden sudo[1370828]: pam_unix(sudo:session): session opened for user enrico(uid=1000) by (uid=0)
Aug 29 23:35:54 greywarden systemd-sleep[1370830]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:54 greywarden sudo[1370828]: pam_unix(sudo:session): session closed for user enrico
Aug 29 23:35:55 greywarden systemd-sleep[1370834]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:55 greywarden sudo[1370836]:     root : PWD=/ ; USER=enrico ; COMMAND=/usr/bin/transmission-remote --exit
Aug 29 23:35:55 greywarden sudo[1370836]: pam_unix(sudo:session): session opened for user enrico(uid=1000) by (uid=0)
Aug 29 23:35:55 greywarden systemd-sleep[1370838]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:55 greywarden sudo[1370836]: pam_unix(sudo:session): session closed for user enrico
Aug 29 23:35:56 greywarden systemd-sleep[1370863]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:56 greywarden sudo[1370865]:     root : PWD=/ ; USER=enrico ; COMMAND=/usr/bin/transmission-remote --exit
Aug 29 23:35:56 greywarden sudo[1370865]: pam_unix(sudo:session): session opened for user enrico(uid=1000) by (uid=0)
Aug 29 23:35:56 greywarden systemd-sleep[1370867]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:56 greywarden sudo[1370865]: pam_unix(sudo:session): session closed for user enrico
Aug 29 23:35:57 greywarden systemd-sleep[1370871]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:57 greywarden sudo[1370873]:     root : PWD=/ ; USER=enrico ; COMMAND=/usr/bin/transmission-remote --exit
Aug 29 23:35:57 greywarden sudo[1370873]: pam_unix(sudo:session): session opened for user enrico(uid=1000) by (uid=0)
Aug 29 23:35:57 greywarden systemd-sleep[1370875]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:57 greywarden sudo[1370873]: pam_unix(sudo:session): session closed for user enrico
Aug 29 23:35:58 greywarden systemd-sleep[1370902]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:58 greywarden sudo[1370904]:     root : PWD=/ ; USER=enrico ; COMMAND=/usr/bin/transmission-remote --exit
Aug 29 23:35:58 greywarden sudo[1370904]: pam_unix(sudo:session): session opened for user enrico(uid=1000) by (uid=0)
Aug 29 23:35:58 greywarden systemd-sleep[1370906]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:58 greywarden sudo[1370904]: pam_unix(sudo:session): session closed for user enrico
Aug 29 23:35:59 greywarden systemd-sleep[1370910]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:35:59 greywarden systemd-sleep[1370615]: transmission-daemon exited successfully.
Aug 29 23:35:59 greywarden systemd-sleep[1370612]: Performing sleep operation 'suspend'...
Aug 29 23:36:09 greywarden systemd-sleep[1370612]: System returned from sleep operation 'suspend'.
Aug 29 23:36:09 greywarden systemd-sleep[1371003]: Waking up from suspend...
Aug 29 23:36:09 greywarden systemd-sleep[1371003]: Trying to start transmission…
Aug 29 23:36:09 greywarden systemd-sleep[1371003]: waiting for internet
Aug 29 23:36:10 greywarden systemd-sleep[1371003]: waiting for internet
Aug 29 23:36:11 greywarden systemd-sleep[1371003]: waiting for internet
Aug 29 23:36:12 greywarden systemd-sleep[1371003]: waiting for internet
Aug 29 23:36:13 greywarden systemd-sleep[1371003]: waiting for internet
Aug 29 23:36:14 greywarden systemd-sleep[1371003]: waiting for internet
Aug 29 23:36:15 greywarden systemd-sleep[1371003]: waiting for internet
Aug 29 23:36:16 greywarden systemd-sleep[1371003]: waiting for internet
Aug 29 23:36:17 greywarden systemd-sleep[1371003]: waiting for internet
Aug 29 23:36:18 greywarden systemd-sleep[1371003]: waiting for internet
Aug 29 23:36:19 greywarden systemd-sleep[1371003]: waiting for internet
Aug 29 23:36:21 greywarden systemd-sleep[1371669]: Unable to send request to 'http://localhost:9091/transmission/rpc/': Could not connect to server
Aug 29 23:36:21 greywarden sudo[1371670]:     root : PWD=/ ; USER=enrico ; COMMAND=/usr/bin/transmission-daemon
Aug 29 23:36:21 greywarden sudo[1371670]: pam_unix(sudo:session): session opened for user enrico(uid=1000) by (uid=0)
Aug 29 23:36:21 greywarden sudo[1371670]: pam_unix(sudo:session): session closed for user enrico
Aug 29 23:36:21 greywarden systemd-sleep[1371003]: Waiting for transmission-daemon to actually start
Aug 29 23:36:22 greywarden systemd-sleep[1371783]:     ID    Done       Have  ETA              Up      Down  Ratio  Status       Name
Aug 29 23:36:22 greywarden systemd-sleep[1371783]:      1   0.00%       None  Unknown         0.0       0.0   0.00  Idle         Il.Premio.2017.iTALiAN.BRRip.XviD.BLUWORLD
Aug 29 23:36:22 greywarden systemd-sleep[1371783]:      2   84.1%    1.36 GB  Unknown         0.0       0.0   2.74  Idle         The Invitation (2015).H264.ita.eng.sub.ita.iCV-MIRCrew.mkv
Aug 29 23:36:22 greywarden systemd-sleep[1371783]:      5   39.5%   697.4 MB  Unknown         0.0       0.0   0.00  Idle         Point Break (2015) - BD Rip ITA-Eng HD.mkv
Aug 29 23:36:22 greywarden systemd-sleep[1371783]:      3     n/a       None  Unknown         0.0       0.0   None  Idle         Tutto+può+accadere+-+Career+opportunities+(1991)+[Mux+720p+-+H264+-+Ita+Eng+Aac]+HDTV
Aug 29 23:36:22 greywarden systemd-sleep[1371783]:      4   17.0%   212.8 MB  Unknown         0.0       0.0   0.03  Idle         Il principe delle maree
Aug 29 23:36:22 greywarden systemd-sleep[1371783]:      6    100%   22.65 GB  Done            0.0       0.0   0.00  Idle         One.Piece.2023.S02.1080p.NF.WEB-DL.DDP5.1.ENG.ITA.Atmos.H264-TheBlackKing
Aug 29 23:36:22 greywarden systemd-sleep[1371783]: Sum:             24.92 GB                  0.0       0.0
Aug 29 23:36:22 greywarden systemd-sleep[1371003]: Running transmission-daemon completed successfully.
Aug 29 23:36:22 greywarden systemd-sleep[1371003]: pidof transmission-daemon =  1371673
Aug 29 23:36:37 greywarden transmission-daemon[1371673]: Closing session
Aug 29 23:36:37 greywarden systemd[1]: systemd-suspend.service: Deactivated successfully.
Aug 29 23:36:37 greywarden systemd[1]: Finished System Suspend.
Aug 29 23:36:37 greywarden systemd[1]: systemd-suspend.service: Consumed 4.448s CPU time over 51.594s wall clock time, 15.2M memory peak.

it looks like the daemon starts succesfully (see also lines printed at 23:36:22), but then the daemon closes again at 23:36:37.

Indeed, right after waking up from sleep, if I'm fast enough, I can execute

transmission-remote -l 

several times, and I'll see it fail a few times, succeed once (similar to what happens at 23:36:22 above?), and then fail again.

Offline

#33 2026-08-30 14:19:22

Enrico1989
Member
Registered: 2018-07-05
Posts: 422

Re: Hardware boots, but the system doesn't

If I run the script above manually,

sudo /usr/lib/systemd/system-sleep/transmission.sh pre foo

it does result in shutting down transmission, doing what's also in the journal above.

If I then run

sudo /usr/lib/systemd/system-sleep/transmission.sh post foo

it starts it again.

Why if the two commands above are run automatically when I suspend and wake up the system the latter step doesn't work?

Offline

#34 2026-08-30 17:25:00

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

Re: Hardware boots, but the system doesn't

Was your network up when running them manually?…

Offline

#35 2026-08-31 05:41:04

Enrico1989
Member
Registered: 2018-07-05
Posts: 422

Re: Hardware boots, but the system doesn't

Yes

Offline

#36 2026-08-31 05:42:37

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

Re: Hardware boots, but the system doesn't

That was a rather rhetorical question => https://bbs.archlinux.org/viewtopic.php … 4#p2308544

Offline

#37 2026-08-31 06:01:32

Enrico1989
Member
Registered: 2018-07-05
Posts: 422

Re: Hardware boots, but the system doesn't

But I have done that in the script I shared in the previous message.

Offline

#38 2026-08-31 06:04:30

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

Re: Hardware boots, but the system doesn't

That is not the same, you're trying to restart transmission until it fails starting, but it does start (and most likely forks), then after some seconds figures there's not network and self-deletes.

Offline

#39 2026-08-31 06:07:14

Enrico1989
Member
Registered: 2018-07-05
Posts: 422

Re: Hardware boots, but the system doesn't

But I'm first waiting for the network, no?

    while ! ping -qc1 google.com > /dev/null 2>&1; do
      echo 'waiting for internet'
      sleep 1
    done
    while ! transmission-remote -l; do
      sudo -u enrico transmission-daemon
      echo 'Waiting for transmission-daemon to actually start'
      sleep 1
    done

Offline

#40 2026-08-31 06:19:32

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

Re: Hardware boots, but the system doesn't

Oh, sorry - I completely missed that alteration.
But it actually does work:

Aug 29 23:36:21 greywarden sudo[1371670]: pam_unix(sudo:session): session opened for user enrico(uid=1000) by (uid=0)
Aug 29 23:36:21 greywarden sudo[1371670]: pam_unix(sudo:session): session closed for user enrico
Aug 29 23:36:21 greywarden systemd-sleep[1371003]: Waiting for transmission-daemon to actually start
Aug 29 23:36:22 greywarden systemd-sleep[1371783]:     ID    Done       Have  ETA              Up      Down  Ratio  Status       Name
Aug 29 23:36:22 greywarden systemd-sleep[1371783]:      1   0.00%       None  Unknown         0.0       0.0   0.00  Idle         Il.Premio.2017.iTALiAN.BRRip.XviD.BLUWORLD
Aug 29 23:36:22 greywarden systemd-sleep[1371783]:      2   84.1%    1.36 GB  Unknown         0.0       0.0   2.74  Idle         The Invitation (2015).H264.ita.eng.sub.ita.iCV-MIRCrew.mkv
Aug 29 23:36:22 greywarden systemd-sleep[1371783]:      5   39.5%   697.4 MB  Unknown         0.0       0.0   0.00  Idle         Point Break (2015) - BD Rip ITA-Eng HD.mkv
Aug 29 23:36:22 greywarden systemd-sleep[1371783]:      3     n/a       None  Unknown         0.0       0.0   None  Idle         Tutto+può+accadere+-+Career+opportunities+(1991)+[Mux+720p+-+H264+-+Ita+Eng+Aac]+HDTV
Aug 29 23:36:22 greywarden systemd-sleep[1371783]:      4   17.0%   212.8 MB  Unknown         0.0       0.0   0.03  Idle         Il principe delle maree
Aug 29 23:36:22 greywarden systemd-sleep[1371783]:      6    100%   22.65 GB  Done            0.0       0.0   0.00  Idle         One.Piece.2023.S02.1080p.NF.WEB-DL.DDP5.1.ENG.ITA.Atmos.H264-TheBlackKing
Aug 29 23:36:22 greywarden systemd-sleep[1371783]: Sum:             24.92 GB                  0.0       0.0
Aug 29 23:36:22 greywarden systemd-sleep[1371003]: Running transmission-daemon completed successfully.
Aug 29 23:36:22 greywarden systemd-sleep[1371003]: pidof transmission-daemon =  1371673
Aug 29 23:36:37 greywarden transmission-daemon[1371673]: Closing session

But it doesn't linger after the session closes.
https://wiki.archlinux.org/title/System … _instances
Is there no (other) running session for enrico during the sleep?

I'll remind that this is all tangential, you want to  figure whether transmission has any impact on the wakeup and to figure just that it will be sufficient to kill it with the sleep and manually restart it after the wakeup.
If it actually is the cause we can address the automatization of that dance.

Offline

#41 2026-08-31 08:06:39

Enrico1989
Member
Registered: 2018-07-05
Posts: 422

Re: Hardware boots, but the system doesn't

seth wrote:
Aug 29 23:36:37 greywarden transmission-daemon[1371673]: Closing session

But it doesn't linger after the session closes.

But why does it close at all? It shouldn't, should it?

I've read this once, but I need to understand why you're suggesting to do that (or aren't you?).

seth wrote:

Is there no (other) running session for enrico during the sleep?

Can you clarify what a "running session for enrico during sleep" means? Are we talking about me logging in other VTs? Plus, how can I check anything during sleep?

seth wrote:

you want to  figure whether transmission has any impact on the wakeup and to figure just that it will be sufficient to kill it with the sleep and manually restart it after the wakeup.

Yes, and I understand this is off-topic with respect to the question in the title, but I have stated it:

Enrico1989 wrote:

Incidentally, I just had to forcibly reboot the system because upon waking it from a sleep, it went in an infinite loop of failed attempts to wake up […] I wonder if it could be related to the original issue I've reported here.


Regarding

seth wrote:

If it actually is the cause we can address the automatization of that dance.

I'm not sure if you're suggesting to separate the thread or what.

Last edited by Enrico1989 (2026-08-31 08:09:44)

Offline

#42 2026-08-31 11:03:08

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,401

Re: Hardware boots, but the system doesn't

For clarity:
Enrico1989, are you starting transmission-daemon or transmission-daemon.service ?

The first runs transmission as a script under your username and does nothing with systemd.
The second uses systemd to start an instance that runs as the transmission user by default.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#43 2026-08-31 11:58:15

Enrico1989
Member
Registered: 2018-07-05
Posts: 422

Re: Hardware boots, but the system doesn't

Lone_Wolf wrote:

For clarity:
Enrico1989, are you starting transmission-daemon or transmission-daemon.service ?

I've always done the former, but I suppose you're telling me the latter is a better approach? And that latter approach would also make it easier to shut down transmissions and start it again upon sleep and wake resp.?

Last edited by Enrico1989 (2026-08-31 11:59:04)

Offline

#44 2026-08-31 12:44:58

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,401

Re: Hardware boots, but the system doesn't

Which of those you use is your call, not mine.
I use transmission-daemon to start it when I want it (which is maybe 2 times a week) and pkill transmission-da to stop it.
Have had no issues but on idle my desktop barely registers on the power meter (my yearly electric usage is around 1200 kWH, both my neighours (also single) use almost 2000 kWH). Ofcourse it runs on wall power and wired ethernet so no worries about battery capacity or wifi power usage.

In suspend/hibernation/sleep / wakeup cycles systemd plays a huge role these days. Allowing systemd to start/stop transmission may be worth a try.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#45 2026-08-31 13:29:42

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

Re: Hardware boots, but the system doesn't

But why does it close at all? It shouldn't, should it?

Is lingering enabled?

Can you clarify what a "running session for enrico during sleep" means?

Were you logged in on the desktop or did you logout or sleep from the console?
w/o lingering systemd will kill your processes once you exit the last session (login)

I'm not sure if you're suggesting to separate the thread or what.

No, I'm suggesting to automatically kill transmission on sleep, manually start it after the wakeup and see whether the original problem stays at its normal frequency/symptoms this way over the next week or so.

An alternative approach for the original issue would be to run nouveau for a while (because it doesn't do those entire drm/modeset dances) - albeit at a performance hit.

Offline

#46 2026-08-31 17:59:11

Enrico1989
Member
Registered: 2018-07-05
Posts: 422

Re: Hardware boots, but the system doesn't

seth wrote:

Is lingering enabled?

No, I haven't enabled yet because I haven't understood yet what it does.


seth wrote:

Were you logged in on the desktop or did you logout or sleep from the console?

Does "logged in on the desktop" mean "logged in a DE/WM as opposed to being logged in a virtual console?

If that's what it means, the answer is that the experiments I've been doing consist in sleeping from within XMonad.

seth wrote:

w/o lingering systemd will kill your processes once you exit the last session (login)

and which sessions am I "exiting"? I would think that sleeping/waking up doesn't mean exiting/entering anything… Am I mistaken?

seth wrote:

No, I'm suggesting to automatically kill transmission on sleep

So basically keeping the first half of the script above, so to say.

Last edited by Enrico1989 (2026-08-31 17:59:38)

Offline

#47 2026-08-31 21:06:32

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

Re: Hardware boots, but the system doesn't

consist in sleeping from within XMonad.

How do you start xmonad? startx/xinit?
Last link below, 2nd blue note - if you're not sourcing the session bus integration you're not logged in as far as logind/systemd is concerned.

So basically keeping the first half of the script above, so to say.

Yes.

Offline

#48 2026-09-01 06:00:58

Enrico1989
Member
Registered: 2018-07-05
Posts: 422

Re: Hardware boots, but the system doesn't

seth wrote:

How do you start xmonad? startx/xinit?

Yes, via startx:

# ~myself/.bash_profile
[[ -f ~/.bashrc ]] && . ~/.bashrc

if [[ ! $DISPLAY && ($XDG_VTNR == 1 || $XDG_VTNR == 2) ]]; then
  case $USER in
    'enrico' )
      exec startx || true
      ;;
    'angelina' )
      exec cosmic-session
      ;;
  esac
fi
# ~myself/.xinitrc
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

[[ -f ~/.Xresources ]] && xrdb -merge -I$HOME ~/.Xresources
xinput set-prop 11 "libinput Tapping Enabled" 1
xset dpms 0 0 0
xset s off
picom &
$HOME/miscellaneous/setscreens.sh && nitrogen --restore

export QT_QPA_PLATFORMTHEME=qt6ct
export GTK_THEME=Adwaita:dark

if [[ "$USER" == 'enrico' ]]; then
  [[ "$XDG_VTNR" -eq 1 ]] && exec xmonad
  [[ "$XDG_VTNR" -eq 2 ]] && exec i3
fi
seth wrote:

Last link below, 2nd blue note - if you're not sourcing the session bus integration you're not logged in as far as logind/systemd is concerned.

Yes, I've done that in the past, as you can see above.

Incidentally, I see that now "the last if block in /etc/X11/xinit/xinitrc" mentioned by your link can't be really copied and pasted verbatim, because it now spells "/etc/X11/xinit" as "$xinitdir". I think the wiki needs a minor rewording of that 2nd blue note.


seth wrote:

So basically keeping the first half of the script above, so to say.

Yes.

Ok. I'll do that and wait a few weeks/months.

Last edited by Enrico1989 (2026-09-01 06:01:27)

Offline

Board footer

Powered by FluxBB