Skip to content

Instantly share code, notes, and snippets.

@mbohun
Last active March 5, 2023 08:22
Show Gist options
  • Save mbohun/e8eb820b2c55fba2da04226460283fcf to your computer and use it in GitHub Desktop.
Save mbohun/e8eb820b2c55fba2da04226460283fcf to your computer and use it in GitHub Desktop.
time postmarketOS/phosh mobian/phosh
2022-03-04 14:33:38 93 89
2022-03-04 14:41:40 93 85
2022-03-04 14:49:42 92 83
2022-03-04 14:58:05 81
2022-03-04 15:06:07 92 80
2022-03-04 15:14:09 91 78
2022-03-04 15:22:11 90 75
2022-03-04 15:30:13 89 72
2022-03-04 15:38:15 88 69
2022-03-04 15:46:18 87 67
2022-03-04 15:54:20 85 64
2022-03-04 16:02:22 84 62
2022-03-04 16:10:24 83 60
2022-03-04 16:18:26 82 58
2022-03-04 16:26:28 81 56
2022-03-04 16:34:30 80 54
2022-03-04 16:42:32 79 53
2022-03-04 16:50:35 77 51
2022-03-04 16:58:37 76 50
2022-03-04 17:06:39 75 48
2022-03-04 17:14:41 74 47
2022-03-04 17:22:43 72 45
2022-03-04 17:30:45 71 44
2022-03-04 17:38:47 69 42
2022-03-04 17:46:49 67 41
2022-03-04 17:54:51 65 39
2022-03-04 18:02:53 63 38
2022-03-04 18:10:55 62 36
2022-03-04 18:18:57 60 34
2022-03-04 18:27:00 59 31
2022-03-04 18:35:02 58 28
2022-03-04 18:43:04 56 25
2022-03-04 18:51:06 55 22
2022-03-04 18:59:09 54 18
2022-03-04 19:07:11 53 16
2022-03-04 19:15:13 52 15
2022-03-04 19:23:15 51 15
2022-03-04 19:31:17 50 12
2022-03-04 19:39:19 49 5
2022-03-04 19:47:41 48
2022-03-04 19:56:04 48
2022-03-04 20:04:26 47
2022-03-04 20:12:48 46
2022-03-04 20:21:11 45
2022-03-04 20:29:33 44
2022-03-04 20:37:56 43
2022-03-04 20:46:18 42
2022-03-04 20:54:41 41
2022-03-04 21:03:03 41
2022-03-04 21:11:25 40
2022-03-04 21:19:48 39
time postmarketOS/phosh mobian/phosh
2022-03-05 13:25:16 100 87
2022-03-05 13:33:19 97 86
2022-03-05 13:41:21 96 83
2022-03-05 13:49:23 95 81
2022-03-05 13:57:25 94 80
2022-03-05 14:05:27 94 78
2022-03-05 14:13:29 93 76
2022-03-05 14:21:31 93 73
2022-03-05 14:29:33 92 70
2022-03-05 14:37:35 92 67
2022-03-05 14:45:37 91 64
2022-03-05 14:53:39 90 62
2022-03-05 15:01:42 90 60
2022-03-05 15:09:44 89 58
2022-03-05 15:17:46 87 55
2022-03-05 15:25:48 86 54
2022-03-05 15:33:50 84 52
2022-03-05 15:41:52 83 51
2022-03-05 15:49:54 82 49
2022-03-05 15:57:56 81 48
2022-03-05 16:05:58 80 46
2022-03-05 16:14:00 79 44
2022-03-05 16:22:02 77 43
2022-03-05 16:30:05 76 41
2022-03-05 16:38:07 75 40
2022-03-05 16:46:09 74 38
2022-03-05 16:54:11 72 37
2022-03-05 17:02:13 71 35
2022-03-05 17:10:16 69 33
2022-03-05 17:18:18 67 30
2022-03-05 17:26:20 65 27
2022-03-05 17:34:22 63 24
2022-03-05 17:42:24 62 20
2022-03-05 17:50:26 61 17
2022-03-05 17:58:28 59 16
2022-03-05 18:06:31 58 15
2022-03-05 18:14:33 56 14
2022-03-05 18:22:35 55 9
2022-03-05 18:30:37 54 3
2022-03-05 18:39:00 53
2022-03-05 18:47:22 52
2022-03-05 18:55:45 51
2022-03-05 19:04:08 50
2022-03-05 19:12:30 49
2022-03-05 19:20:52 48
2022-03-05 19:29:15 47
2022-03-05 19:37:37 46
2022-03-05 19:46:00 45
2022-03-05 19:54:22 44
2022-03-05 20:02:45 43
time postmarketOS/phosh mobian/phosh
2022-03-06 12:59:11 97 98
2022-03-06 13:07:13 95 95
2022-03-06 13:15:15 94 94
2022-03-06 13:23:17 94 93
2022-03-06 13:31:19 93 92
2022-03-06 13:39:21 93 92
2022-03-06 13:47:23 92 90
2022-03-06 13:55:25 92 88
2022-03-06 14:03:27 91 86
2022-03-06 14:11:29 91 83
2022-03-06 14:19:31 90 81
2022-03-06 14:27:33 89 79
2022-03-06 14:35:35 88 78
2022-03-06 14:43:38 86 75
2022-03-06 14:51:40 85 73
2022-03-06 14:59:42 83 70
2022-03-06 15:07:44 82 68
2022-03-06 15:15:47 81 66
2022-03-06 15:23:49 80 63
2022-03-06 15:31:51 79 62
2022-03-06 15:39:53 78 59
2022-03-06 15:47:55 76 58
2022-03-06 15:55:57 75 56
2022-03-06 16:03:59 74 54
2022-03-06 16:12:02 73 53
2022-03-06 16:20:04 71 51
2022-03-06 16:28:06 70 50
2022-03-06 16:36:08 68 49
2022-03-06 16:44:10 66 47
2022-03-06 16:52:12 64 45
2022-03-06 17:00:14 62 44
2022-03-06 17:08:17 61 42
2022-03-06 17:16:19 60 41
2022-03-06 17:24:21 58 40
2022-03-06 17:32:23 57 39
2022-03-06 17:40:25 56 37
2022-03-06 17:48:27 54 36
2022-03-06 17:56:29 53 34
2022-03-06 18:04:31 52 33
2022-03-06 18:12:33 51 30
2022-03-06 18:20:35 50 28
2022-03-06 18:28:37 50 24
2022-03-06 18:36:39 49 22
2022-03-06 18:44:41 48 18
2022-03-06 18:52:43 47 16
2022-03-06 19:00:46 46 15
2022-03-06 19:08:48 45 15
2022-03-06 19:16:50 44 14
2022-03-06 19:24:52 44 9
2022-03-06 19:32:54 43 4
2022-03-06 19:41:16 42
2022-03-06 19:49:39 41
2022-03-06 19:58:01 40
2022-03-06 20:06:23 39
2022-03-06 20:14:46 39
2022-03-06 20:23:08 38
2022-03-06 20:31:30 38
2022-03-06 20:39:53 37
2022-03-06 20:48:15 36
2022-03-06 20:56:38 36
2022-03-06 21:05:00 34
2022-03-06 21:13:23 34
2022-03-06 21:21:45 33
2022-03-06 21:30:07 32
2022-03-06 21:38:30 30
2022-03-06 21:46:52 29
2022-03-06 21:55:15 29
2022-03-06 22:03:37 28
2022-03-06 22:12:00 27
2022-03-06 22:20:22 25
2022-03-06 22:28:44 24
2022-03-06 22:37:07 23
2022-03-06 22:45:29 21
2022-03-06 22:53:52 19
2022-03-06 23:02:14 17
2022-03-06 23:10:57
time postmarketOS/phosh mobian/phosh
2022-03-06 23:46:25 18 5
2022-03-06 23:54:27 34 21
2022-03-07 00:02:29 48 25
2022-03-07 00:10:31 49 32
2022-03-07 00:18:33 51 38
2022-03-07 00:26:35 56 40
2022-03-07 00:34:37 62 43
2022-03-07 00:42:39 67 46
2022-03-07 00:50:41 73 50
2022-03-07 00:58:43 80 54
2022-03-07 01:06:45 87 59
2022-03-07 01:14:47 92 65
2022-03-07 01:22:50 93 70
2022-03-07 01:30:52 95 76
2022-03-07 01:38:54 98 83
2022-03-07 01:46:56 99 90
2022-03-07 01:54:57 99 92
2022-03-07 02:02:59 99 93
2022-03-07 02:11:02 99 94
2022-03-07 02:19:04 99 95
2022-03-07 02:27:06 100 97
2022-03-07 02:35:08 100 98
2022-03-07 02:43:10 100 99
2022-03-07 02:51:12 100 99
2022-03-07 02:59:14 100 100
2022-03-07 03:07:16 100 100
2022-03-07 03:15:18 100 100
2022-03-07 03:23:20 100 100
2022-03-07 03:31:22 100 100
2022-03-07 03:39:24 100 99
2022-03-07 03:47:26 100 99
2022-03-07 03:55:28 100 99
2022-03-07 04:03:30 99 98
2022-03-07 04:11:32 99 98
2022-03-07 04:19:34 99 98
2022-03-07 04:27:37 98 98
2022-03-07 04:35:39 98 97
2022-03-07 04:43:41 98 97
2022-03-07 04:51:43 97 97
2022-03-07 04:59:45 97 96
2022-03-07 05:07:47 97 96
2022-03-07 05:15:49 97 95
2022-03-07 05:23:51 96 95
2022-03-07 05:31:53 96 95
2022-03-07 05:39:55 96 95
2022-03-07 05:47:57 95 97
2022-03-07 05:55:59 95 99
2022-03-07 06:04:01 95 99
2022-03-07 06:12:03 95 99
2022-03-07 06:20:06 95 100
2022-03-07 06:28:08 94 100
2022-03-07 06:36:10 94 100
2022-03-07 06:44:13 94 100
2022-03-07 06:52:15 94 99
2022-03-07 07:00:17 94 99
2022-03-07 07:08:19 94 99
2022-03-07 07:16:21 94 98
2022-03-07 07:24:23 98 98
2022-03-07 07:32:25 99 98
2022-03-07 07:40:27 99 98
2022-03-07 07:48:29 99 97
2022-03-07 07:56:31 99 97
2022-03-07 08:04:34 100 97
2022-03-07 08:12:36 100 96
2022-03-07 08:20:38 100 96
2022-03-07 08:28:40 100 96
2022-03-07 08:36:42 100 95
2022-03-07 08:44:45 100 95
2022-03-07 08:52:47 100 95
2022-03-07 09:00:49 100 95
2022-03-07 09:08:51 100 95
2022-03-07 09:16:53 100 95
2022-03-07 09:24:55 100 94
2022-03-07 09:32:57 100 94
2022-03-07 09:40:59 99 94
2022-03-07 09:49:01 99 94
2022-03-07 09:57:03 99 94
#!/bin/bash
stats=pine_phone_battery_stats-`date +%s`.csv
echo "time,postmarketOS/phosh,mobian/phosh" >> $stats
while true
do
pos=`ssh -x [email protected] cat /sys/class/power_supply/axp20x-battery/capacity`
mob=`ssh -x [email protected] cat /sys/class/power_supply/axp20x-battery/capacity`
echo "`date +"%Y-%m-%d %X"`,${pos},${mob}" >> $stats
sleep 480
done
@mbohun
Copy link
Author

mbohun commented Mar 6, 2022

Although their "normal usage" battery lifetime would apx. 2x and more.

This was with all autosuspend set to OFF, so the stats collecting script can ssh into those phones to read/sample /sys/class/power_supply/axp20x-battery/capacity

...but still postmarketOS offers significantly better battery lifetime; in one of the previous "manual" tests, when i left the autosuspend ON, and would mnually come press the phone button, and read / write the battery status on a piece of paper, in one of those sessions postmarketOS achieved 52hours on one battery charge and that is very good for any phone

@mbohun
Copy link
Author

mbohun commented Mar 5, 2023

for FILE in /sys/class/power_supply/*/capacity; do
    printf "%s: %d\n" "$FILE" "$(cat $FILE)"
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment