ish-app / ish

Linux shell for iOS
https://ish.app
Other
16.94k stars 892 forks source link

Using too much battery on iPhone 14 when running in the background #2046

Open wchengk09 opened 1 year ago

wchengk09 commented 1 year ago

Yesterday night, I executed the command below to run iSH in the background:

cat /dev/location > /dev/null 2> /dev/null &

Then I slept.

I'm using iPhone 14. I remembered, the battery of my iPhone is $64$% yesterday night. But when I woke up, there is only $20$% battery.

I also have an iPad (7th generation), and I also ran iSH on it in the background. But it only used $8$% battery through the whole night.

Why does iSH use so much battery on iPhone 14? How to set a memory limit?

saagarjha commented 1 year ago

These numbers don’t seem unusual to me. We can probably look into your battery usage in more detail if you want but I don’t see anything wrong here at first glance.

Rukario commented 1 year ago

Just the nature of emulation I guess.

aibangjuxin commented 1 year ago

The daily power consumption in the background will scare you, 50% before going to bed and 10% when you get up. Check the background are ish.

aibangjuxin commented 1 year ago

iPhone 13 Pro . Even when I manually turn off the background, it's still draining in the background. I don't understand why.

Rukario commented 1 year ago

iPhone 13 Pro . Even when I manually turn off the background, it's still draining in the background. I don't understand why.

Are you doing it through the Settings app? That's not going to do it.

Since that you've specifically executed a command that enabled running iSH in background, there's also this command that can suspend iSH app again when leaving into background, especially if you want to conserve iphone battery after using a command that started using background.

killall -9 cat

It's on you if you've left iSH running in background and forget about it.