Opened 11 years ago

Last modified 6 years ago

#7153 new defect

XMPP accounts stay online for hours after Hibernation

Reported by: Menedas Owned by: deryni
Milestone: Component: XMPP
Version: 2.5.0 Keywords: hibernation stay available
Cc: phannent

Description

Here on Ubuntu Hardy there is a Problem which annoys me. Everytime when the computer goes into Hibernation the XMPP Account (maybe accounts of other networks too) stays online and available for hours.

What could be done to change that? Always kill Pidgin on Hibernation and restart after waking up the computer?

Best would be if Pidgin detects Hibernation and goes offline on its own and reconnects later.

Change History (3)

comment:1 Changed 10 years ago by QuLogic

  • Owner changed from lschiere to rekkanoryo

comment:2 Changed 9 years ago by Robby

  • Component changed from unclassified to XMPP
  • Owner changed from rekkanoryo to deryni

comment:3 Changed 6 years ago by phannent

To me the obvious thing with this is that Pidgin doesn't get the chance to tell the servers its going offline. Searching around I found that there is a bit of a lack of an API for this, however a simple trick would be to shutdown Pidgin in the event of a suspend and restart it again on resume:

http://stackoverflow.com/questions/14376534/how-to-detect-whether-system-is-going-to-standby-in-linux-using-c

Which informs us that if we put a file in /etc/pm/sleep.d it will execute it before suspend. Something like:

#!/bin/bash
case $1 in
suspend)
    #suspending to RAM
    killall -s SIGTERM pidgin
    ;;
resume)
    #resume from suspend
    sleep 3
    pidgin
    ;;
esac

Now you can just either open Pidgin or tell it to close and this bug is fixed outside of Pidgin.

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!