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 2015-06-10 11:03:38 +0200

how to prevent charging from USB

If you are on laptop with limited battery, and don't want to use that for charging your phone, but need to connect phone via USB to your laptop, this might be handy. (Read warnings and disclaimers first)

as root, to disable charging:

echo 1 >  /sys/module/pm8921_charger/parameters/disabled

and to re-enable charging:

echo 0 >  /sys/module/pm8921_charger/parameters/disabled

When disabled and connected to charger, polite notification says that charging does not work, please try another charger.

image description

Warning: Do not allow phone battery to drain completely while charging disabled.

Disclaimer: Use at your own risk.

Disclaimer: I haven't tested does reboot restore this setting.

how to prevent charging from USB

If you are on laptop with limited battery, and don't want to use that for charging your phone, but need to connect phone via USB to your laptop, this might be handy. (Read warnings and disclaimers first)

as root, to disable charging:

echo 1 >  /sys/module/pm8921_charger/parameters/disabled

and to re-enable charging:

echo 0 >  /sys/module/pm8921_charger/parameters/disabled

When disabled and connected to charger, polite notification says that charging does not work, please try another charger.

image description

Warning: Do not allow phone battery to drain completely while charging disabled.

Disclaimer: Use at your own risk.

Disclaimer: I haven't tested does reboot restore this setting.

Credits to @xkr47 for ask this on IRC

how to prevent charging from USB

If you are on laptop with limited battery, and don't want to use that for charging your phone, but need to connect phone via USB to your laptop, this might be handy. (Read warnings and disclaimers first)

as root, to disable charging:

echo 1 >  /sys/module/pm8921_charger/parameters/disabled

and to re-enable charging:

echo 0 >  /sys/module/pm8921_charger/parameters/disabled

When disabled and connected to charger, polite notification says that charging does not work, please try another charger.

image description

Warning: Do not allow phone battery to drain completely while charging disabled.

Disclaimer: Use at your own risk.

Disclaimer: I haven't tested does reboot restore this setting.

Credits to @xkr47 for ask asking this on IRC

how to prevent charging from USB

If you are on laptop with limited battery, and don't want to use that for charging your phone, but need to connect phone via USB to your laptop, this might be handy. (Read warnings and disclaimers first)

as root, to disable charging:

echo 1 >  /sys/module/pm8921_charger/parameters/disabled

and to re-enable charging:

echo 0 >  /sys/module/pm8921_charger/parameters/disabled

When disabled and connected to charger, polite notification says that charging does not work, please try another charger.

image description

Warning: Do not allow phone battery to drain completely while charging disabled.

Disclaimer: Use at your own risk.

Disclaimer: I haven't tested does reboot restore this setting.

Credits to @xkr47 for asking this on IRC

how to prevent charging from USB

If you are on laptop with limited battery, and don't want to use that for charging your phone, but need to connect phone via USB to your laptop, this might be handy. (Read warnings and disclaimers first)

as root, to disable charging:

echo 1 >  /sys/module/pm8921_charger/parameters/disabled

and to re-enable charging:

echo 0 >  /sys/module/pm8921_charger/parameters/disabled

When disabled and connected to charger, polite notification says that charging does not work, please try another charger.

image description

Warning: Do not allow phone battery to drain completely while charging disabled.

Disclaimer: Use at your own risk.

Disclaimer: I haven't tested does reboot restore this setting.

Credits to @xkr47 for asking this on IRC

Update:

<<< Here is @xkr47 "Charger Control" app. All feedback welcome. IRC: #chargercontrol on freenode. https://openrepos.net/content/xkr47/charger-control <<<