Folding on Android with UserLAnd and the new Linux ARM build

Moderators: Site Moderators, FAHC Science Team

Folding on Android with UserLAnd and the new Linux ARM build

Postby demorgan » Thu Dec 17, 2020 1:33 am

I was curious to see if I could get folding going on as I have a lot of Android phones and tablets sitting around my house. The answer is yes, if you install UserLAnd on your phone and install the FAHClient package for ARM, it works (UserLAnd runs a choice of stripped down Linux distros inside an Android app, and allows you to connect via VNC or SSH)

The way I did it was to install xfce and installed Chromium from a terminal to browse to the download site here and get the ARM client, but this is not the best way. You could probably just start with SSH instead of VNC and copy and type "wget url_of_arm_linux_fahclient.deb" to download it, type: sudo dpkg -i "name_of_arm_linux_fahclient.deb" to install it, and then it's started, I believe. However, you can't see the progress on the terminal unless you end the UserLAnd program, restart debian in SSH, and type "FAHClient", then you should get the terminal output. There are also ways to re-direct the output of a running process to your ssh terminal, which would probably work too and be a cleaner way of doing it instead of killing UserLAnd from Android and restarting, but that is beyond this post (not because it wouldn't be useful information, but because I haven't ever done it.)

Note: I only discovered that I had this working when I saw that the username of the client "demorganphone" had completed a WU. It did not look like it was running, and no service was found, and starting FAHClient didn't seem to work. But when I restarted UserLAnd and typed "FAHClient" I could see it.

If you start via VNC, you can use the web client in a browser. I didn't have much luck with Firefox, so try Chromium.

I was actually reluctant to post this because I don't think it was intended for the ARM Linux program to be used this way, although I'd be happy to be wrong about this. This is not something you can just carry around with you running in the background on your phone, your phone will lose charge quickly, so have your phone charging with a good charger that provides a lot of current. I tried doing this with my Galaxy S9 plugged into my laptop, the phone started at 4% and actually went out of power and died even though it was charging! Plugging it into the wall worked though. Keep in mind this is basically a stress test on your phone, so don't blame me if your processor melts down or your RAM goes bad or something. With a lot of people working from home and being quarantined, their phones can stay plugged in for a while, so this might give a boost to to activity. I do not think it would be a good idea to do this unless you have many hours on hand to complete a WU, it could clog things up I imagine, so I would just wait until you have time if you don't.

Phones do have non-ARM processors occasionally. ARM is used in about 95% of phones last I read. This will definitely not work on an Android phone or tablet based on another architecture like x86. ARM only!

I should note that I have only tested this on a Samsung Galaxy S9. If anyone has another story, please tell!

I realize this may have not been the best overview, but it's a start. I'd be interested to read others' input on this...
demorgan
 
Posts: 18
Joined: Wed Dec 16, 2020 11:29 pm

Re: Folding on Android with UserLAnd and the new Linux ARM b

Postby bruce » Sat Dec 19, 2020 10:44 pm

My guess is that this is a stress-test on the battery. Any processor running FAH is a good source of heat and batteries don't like heat.

Thanks for the report. I'm sure others will evaluate it on their hardware.
bruce
 
Posts: 20888
Joined: Thu Nov 29, 2007 11:13 pm
Location: So. Cal.

Re: Folding on Android with UserLAnd and the new Linux ARM b

Postby demorgan » Sun Dec 20, 2020 4:36 am

The issue with the battery I definitely acknowledge...I especially don't recommend letting it run without charging; it would generate a lot of heat around the battery unless there's like zero resistance between the battery and the rest of the phone.

After folding for a few days, I can say that it works, but it is highly recommended by me to run it in "Medium" and not "Full". It folds less, but I had my phone get so hot that Android terminated UserLAnd when it sensed how hot the phone had become. However, when doing it on "medium" I have had 0 issues.
demorgan
 
Posts: 18
Joined: Wed Dec 16, 2020 11:29 pm

Re: Folding on Android with UserLAnd and the new Linux ARM b

Postby Darth_Peter_dualxeon » Sun Dec 20, 2020 6:24 am

Just curious, how much PPD did you get? And how hot was the phone?
If I'm understanding correctly it does not use the GPU of the phones yet?

demorgan wrote: This is not something you can just carry around with you running in the background on your phone, your phone will lose charge quickly, so have your phone charging with a good charger that provides a lot of current. I tried doing this with my Galaxy S9 plugged into my laptop, the phone started at 4% and actually went out of power and died even though it was charging! Plugging it into the wall worked though.


I guess USB2.0 connectors only supply 500 mA, and 3.0 connectors can supply something like 2A. Wall chargers maybe more.
The charging circuit or software in phone can also misunderstand the situation sometimes and don't charge as fast, and then a different cable or a restart may help.
Darth_Peter_dualxeon
 
Posts: 51
Joined: Fri Mar 20, 2020 4:13 am

Re: Folding on Android with UserLAnd and the new Linux ARM b

Postby demorgan » Sun Dec 20, 2020 7:46 am

My PPD on my S9 right now is 1153, on medium setting using 7 cores of the Snapdragon out of 8. I have, I think, 8 devices going total, all but two using various Debian-based Linux distros, mostly computers and laptops between 2010 and 2018 except for a Raspberry Pi 4 (just got that working) and the Galaxy S9. The S9 is the third fastest. There are, however, no GPUs that are supported on any of the devices yet (just bought a few GPUs off ebay though), so...

The phone, when going on full, is quite hot. It's so hot you wouldn't want to hold it, even. However, when on medium it's just a little hot. The GPU is not supported, and I'm not sure it would be possible to interface with the hardware directly like would be needed if UserLAnd is being used.

What you said about USB is true, here's an article about USB power differences; it's a quite complex issue when it comes to determining how much power you get to your phone (the ads may annoy, but the information is useful):

https://www.extremetech.com/computing/1 ... blowing-up
demorgan
 
Posts: 18
Joined: Wed Dec 16, 2020 11:29 pm

Re: Folding on Android with UserLAnd and the new Linux ARM b

Postby bruce » Sun Dec 20, 2020 5:33 pm

My S9 is still my primary phone, so I'm not interested in it getting too hot. I do have some older equipment around. Before I start experimenting, what is the oldest hardware and/or Android that would be supported by UserLAnd+Linux?
bruce
 
Posts: 20888
Joined: Thu Nov 29, 2007 11:13 pm
Location: So. Cal.

Re: Folding on Android with UserLAnd and the new Linux ARM b

Postby demorgan » Mon Dec 21, 2020 7:47 am

I contacted the email given for UserLAnd support asking for what would be the minimum hardware requirements, but they have not gotten back to me yet. The minimum version of Android stated on the Google Play store is 5.0.
demorgan
 
Posts: 18
Joined: Wed Dec 16, 2020 11:29 pm

Re: Folding on Android with UserLAnd and the new Linux ARM b

Postby PantherX » Mon Dec 21, 2020 9:17 am

FYI, you may find that on ARM architectures that use BIG.little CPUs, setting the value of threads that is equal to BIG CPUs might provide a boost in PPD. That would work well since you can get higher PPD without generating too much heat.

Reason for that is if you're using all CPUs in BIG.little, then the BIG CPUs would wait for the little CPUs to finish before things are synced up. Hence, the boost in PPD even though you're using fewer CPUs.
ETA:
Now ↞ Very Soon ↔ Soon ↔ Soon-ish ↔ Not Soon ↠ End Of Time

Welcome To The F@H Support Forum Ӂ Troubleshooting Bad WUs Ӂ Troubleshooting Server Connectivity Issues
User avatar
PantherX
Site Moderator
 
Posts: 7020
Joined: Wed Dec 23, 2009 10:33 am
Location: Land Of The Long White Cloud

Re: Folding on Android with UserLAnd and the new Linux ARM b

Postby bruce » Mon Dec 21, 2020 7:31 pm

In a perfect world, it would be nice to be able to run one WU on the BIG CPUs and a separate one on the LITTLE cores. That's a complex challenge for somebody who understands how to set affinity (Falsely assuming that heat would not be a problem.)
bruce
 
Posts: 20888
Joined: Thu Nov 29, 2007 11:13 pm
Location: So. Cal.

Re: Folding on Android with UserLAnd and the new Linux ARM b

Postby demorgan » Mon Dec 21, 2020 9:10 pm

For Linux, I think a script could almost be made using a program called "taskset" if one knew how the cores were numbered (which is the next thing I'm looking at):

https://www.looklinux.com/how-to-run-pr ... -in-linux/

However, it would require running more than one instance of fahclient.

Edit: No, wait, that wouldn't work since fahclient itself sets cores?
demorgan
 
Posts: 18
Joined: Wed Dec 16, 2020 11:29 pm

Re: Folding on Android with UserLAnd and the new Linux ARM b

Postby bruce » Mon Dec 21, 2020 9:43 pm

demorgan wrote:No, wait, that wouldn't work since fahclient itself sets cores?

Possibly ... or maybe it's the Wrapper.

In WIndows you have a choice of "idle" and "low"
bruce
 
Posts: 20888
Joined: Thu Nov 29, 2007 11:13 pm
Location: So. Cal.

Re: Folding on Android with UserLAnd and the new Linux ARM b

Postby gunnarre » Tue Dec 22, 2020 11:12 am

You just need to run two CPU slots in one client. If you can find a mask for big and little cores, put it into this script:
Code: Select all
#!/bin/bash
CPUPROCESSES=$(pgrep FahCore_a)
BIGMASK="f"
LITTLEMASK="f"

i=1
for pid in $CPUPROCESSES; do
    if (($i % 2)); then
        taskset -p $BIGMASK $pid >/dev/null
    else
        taskset -p $LITTLEMASK $pid >/dev/null
    fi
    ((i=i+1))
done


And run it via the cron command
Code: Select all
bash /usr/local/sbin/FahCore-taskset.sh >/dev/null


Edit: Note that this script only sets every other CPU slot to a different mask; it gives you no control over which one of the slots is given each mask - it just assigns the BIGMASK mask to folding CPU core with the lowest process ID. If you need to set a particular slot to a particular mask, then I wonder if "extra-core-options" in FAH can be used somehow?
Image
GTX 1660 Super, GTX 1050 Ti, GTX 950, Radeon HD 7770 + occasional CPU folding in the cold
gunnarre
 
Posts: 413
Joined: Sun May 24, 2020 8:23 pm
Location: Norway


Return to Software for ARM hardware

Who is online

Users browsing this forum: No registered users and 1 guest

cron