We have moved to a new Sailfish OS Forum. Please start new discussions there.

Revision history [back]

click to hide/show revision 1
initial version

posted 2019-11-01 13:44:46 +0200

mia gravatar image

connman/lipstick stuttering and battery drain with WLAN enabled

Starting with (probably) 3.2.0.11, connman does something periodically (scanning WLANs?) that causes lipstick to stutter every few seconds, network I/O to stall and constant background CPU usage when WLAN is enabled. This also drains the battery very quickly, to the point where an Xperia X with no running apps and the display off won’t last even one day.

This happens whether or not the device is connected to a network, but the effect is much worse when no known networks are nearby.

Disabling WLAN makes these problems go away.

connman/lipstick stuttering and battery drain with WLAN enabled

Starting with (probably) 3.2.0.11, connman does something periodically (scanning WLANs?) that causes lipstick to stutter every few seconds, network I/O to stall and constant background CPU usage when WLAN is enabled. This also drains the battery very quickly, to the point where an Xperia X with no running apps and the display off won’t last even one day.

This happens whether or not the device is connected to a network, but the effect is much worse when no known networks are nearby.

Disabling WLAN makes these problems go away.

Edit: I just checked dbus-monitor and indeed it looks like connman is scanning wifi networks every 3 seconds or so, and then dumps all the info, which is very slow. This explains the above observations.

connman/lipstick stuttering and battery drain with WLAN enabled

Starting with (probably) 3.2.0.11, connman does something periodically (scanning WLANs?) that causes lipstick to stutter every few seconds, network I/O to stall and constant background CPU usage when WLAN is enabled. This also drains the battery very quickly, to the point where an Xperia X with no running apps and the display off won’t last even one day.

This happens whether or not the device is connected to a network, but the effect is much worse when no known networks are nearby.

Disabling WLAN makes these problems go away.

Edit: I just checked dbus-monitor and indeed it looks like connman is scanning wifi networks every 3 seconds or so, and then dumps all the info, which is very slow. This explains the above observations.

Edit 2: Setting breakpoints in connman with gdb points to connman/plugins/sailfish_wifi.c as the source of the problem. The autoscan timer appears to get registered too many times, which causes it to get triggered way too frequently. I have not tried to confirm this though.

connman/lipstick stuttering and battery drain with WLAN enabled

Starting with (probably) 3.2.0.11, connman does something periodically (scanning WLANs?) that causes lipstick to stutter every few seconds, network I/O to stall and constant background CPU usage when WLAN is enabled. This also drains the battery very quickly, to the point where an Xperia X with no running apps and the display off won’t last even one day.

This happens whether or not the device is connected to a network, but the effect is much worse when no known networks are nearby.

Disabling WLAN makes these problems go away.

Edit: I just checked dbus-monitor and indeed it looks like connman is scanning wifi networks every 3 seconds or so, and then dumps all the info, which is very slow. This explains the above observations.

Edit 2: Setting breakpoints in connman with gdb points to connman/plugins/sailfish_wifi.c as the source of the problem. The autoscan timer appears to get registered too many times, which causes it to get triggered way too frequently. I have not tried to confirm this though.

Edit 3: Found the offender: https://git.sailfishos.org/mer-core/connman/blob/master/connman/plugins/sailfish_wifi.c#L2645-2648

Commenting these lines fixes the problem but I have no idea why they’re there in the first place.

connman/lipstick stuttering and battery drain with WLAN enabled

Starting with (probably) 3.2.0.11, connman does something periodically (scanning WLANs?) that causes lipstick to stutter every few seconds, network I/O to stall and constant background CPU usage when WLAN is enabled. This also drains the battery very quickly, to the point where an Xperia X with no running apps and the display off won’t last even one day.

This happens whether or not the device is connected to a network, but the effect is much worse when no known networks are nearby.

Disabling WLAN makes these problems go away.

Edit: I just checked dbus-monitor and indeed it looks like connman is scanning wifi networks every 3 seconds or so, and then dumps all the info, which is very slow. This explains the above observations.

Edit 2: Setting breakpoints in connman with gdb points to connman/plugins/sailfish_wifi.c as the source of the problem. The autoscan timer appears to get registered too many times, which causes it to get triggered way too frequently. I have not tried to confirm this though.

Edit 3: Found the offender: offender, at least for the case where there’s an active connection: https://git.sailfishos.org/mer-core/connman/blob/master/connman/plugins/sailfish_wifi.c#L2645-2648

Commenting these lines fixes the problem but I have no idea why they’re there in the first place.

connman/lipstick stuttering and battery drain with WLAN enabled

Starting with (probably) 3.2.0.11, connman does something periodically (scanning WLANs?) that causes lipstick to stutter every few seconds, network I/O to stall and constant background CPU usage when WLAN is enabled. This also drains the battery very quickly, to the point where an Xperia X with no running apps and the display off won’t last even one day.

This happens whether or not the device is connected to a network, but the effect is much worse when no known networks are nearby.

Disabling WLAN makes these problems go away.

Edit: I just checked dbus-monitor and indeed it looks like connman is scanning wifi networks every 3 seconds or so, and then dumps all the info, which is very slow. This explains the above observations.

Edit 2: Setting breakpoints in connman with gdb points to connman/plugins/sailfish_wifi.c as the source of the problem. The autoscan timer appears to get registered too many times, which causes it to get triggered way too frequently. I have not tried to confirm this though.

Edit 3: Found the offender, at least for the case where there’s an active connection: https://git.sailfishos.org/mer-core/connman/blob/master/connman/plugins/sailfish_wifi.c#L2645-2648

Commenting these lines fixes the problem but I have no idea why they’re there in the first place.

Edit 4: Found what’s causing problems when not associated with a network: https://git.sailfishos.org/mer-core/connman/blob/master/connman/plugins/sailfish_wifi.c#L2859-2868

IMO this is completely unnecessary.

tl;dr connman has never been tested in densely populated areas with lots of wifi networks, and scans way too frequently, which drains the battery and makes the system less responsive

connman/lipstick stuttering and battery drain with WLAN enabled

Starting with (probably) 3.2.0.11, connman Connman does something periodically (scanning WLANs?) that causes lipstick to stutter every few seconds, network I/O to stall and constant background CPU usage when WLAN is enabled. This also drains the battery very quickly, to the point where an Xperia X with no running apps and the display off won’t last even one day.

This happens whether or not the device is connected to a network, but the effect is much worse when no known networks are nearby.

Disabling WLAN makes these problems go away.

Edit: I just checked dbus-monitor and indeed it looks like connman is scanning wifi networks every 3 seconds or so, and then dumps all the info, which is very slow. This explains the above observations.

Edit 2: Setting breakpoints in connman with gdb points to connman/plugins/sailfish_wifi.c as the source of the problem. The autoscan timer appears to get registered too many times, which causes it to get triggered way too frequently. I have not tried to confirm this though.

Edit 3: Found the offender, at least for the case where there’s an active connection: https://git.sailfishos.org/mer-core/connman/blob/master/connman/plugins/sailfish_wifi.c#L2645-2648

Commenting these lines fixes the problem but I have no idea why they’re there in the first place.

Edit 4: Found what’s causing problems when not associated with a network: https://git.sailfishos.org/mer-core/connman/blob/master/connman/plugins/sailfish_wifi.c#L2859-2868

IMO this is completely unnecessary.

tl;dr connman has never been tested in densely populated areas with lots of wifi networks, and scans way too frequently, which drains the battery and makes the system less responsive