LTE Modem activity and CPU freezing by few seconds waves
#1
Hi all,

I did a LTE max bandwidth test, on a good place for being alone on the carrier's antenna (LTE 2600, 20 MHz, 1 out of 3 panels directed right into a big forest.
Reached 140 Mbps few seconds and was moving from 125 Mbps to 135 Mbps at low CPU usage (around 20%)  half of the time : seems to work really fine, as the maximum possible value of LTE cat 4 is 150 Mbps  Smile


However, when using modem, the phone has lots of "seizures moments", during few seconds it lags a lot, freezes a lot, and then come back to normal during few seconds before becoming mad again. It's 50/50 of the time.
When doing the same tests on WiFi, the issue does not exists : it only exists when using modem.

It's not due to temperature as CPU and GPU temperature shows approximately 50°C or even below when the problem already occurs. When the problem occurs, the download bandwidth falls back to almost 0 to few Mbps, and goes up again after the CPU behavior goes back to normal.

Viewing CPU usage on "top" command, within and outside "seizure" moments, the order of which program was using the CPU (aria2, bwm-ng, lxterminal etc) and proportions were the same, but during seizure moments, every usage value is just strongly multiplied.


Is this a known issue? Is there some software workaround about it?
It looks a little bit like CPU power issues, as for Intel/AMD CPU and VRM, in case of insufficient power supply or too hot VRM, CPU is repeatedly doing short freezes waiting things to be normal again, giving similar symptoms.

Also, when enabling modem with low backlight intensity, the backlight intensity is lowering.

But in the others hand, when doing uplink bandwidth test, the problem does not occur (while according to lm-sensors, uplink is consuming more current, 1.2 Amps instead of 1.0 Amps).

I'm using Mobian kernel from here https://gitlab.com/mobian1/devices/pinephone-linux, downloaded and built on 2020/07/19, on Pinephone UBports community edition (1.2 if I'm right - at least I'm using 1.2 DTB).

How to go further in the understanding of this issue?
  Reply
#2
Hi @jrobin28260,

I have encountered another problem with LTE (4G) that may be related to the problem you reported.

I have connected an HDMI screen using the official USB-C dock of the convergence package or a third party Anker USB-C dock.
When I use the LTE connection actively, for example downloading a web page on LTE data or doing a speed test, the HDMI screen becomes black for a few seconds.
The screen comes back shortly after but becomes black again on the next LTE data activity.

I verified that this issue does not happen if I select 3G only data connection, so this only happens with 4G LTE connection.

I reproduced the issue with both my Braveheart and postmarketOS edition PinePhones, and a braveheart of a friend of mine.
The Braveheart had the CC hardware fix to make HDMI output work.

Note: I was using postmarketOS with Phosh as O.S. but the problem happens also with Mobian
  Reply
#3
(07-22-2020, 01:34 PM)jrobin28260 Wrote: Hi all,

I did a LTE max bandwidth test, on a good place for being alone on the carrier's antenna (LTE 2600, 20 MHz, 1 out of 3 panels directed right into a big forest.
Reached 140 Mbps few seconds and was moving from 125 Mbps to 135 Mbps at low CPU usage (around 20%)  half of the time : seems to work really fine, as the maximum possible value of LTE cat 4 is 150 Mbps  Smile


However, when using modem, the phone has lots of "seizures moments", during few seconds it lags a lot, freezes a lot, and then come back to normal during few seconds before becoming mad again. It's 50/50 of the time.
When doing the same tests on WiFi, the issue does not exists : it only exists when using modem.

It's not due to temperature as CPU and GPU temperature shows approximately 50°C or even below when the problem already occurs. When the problem occurs, the download bandwidth falls back to almost 0 to few Mbps, and goes up again after the CPU behavior goes back to normal.

Viewing CPU usage on "top" command, within and outside "seizure" moments, the order of which program was using the CPU (aria2, bwm-ng, lxterminal etc) and proportions were the same, but during seizure moments, every usage value is just strongly multiplied.


Is this a known issue? Is there some software workaround about it?
It looks a little bit like CPU power issues, as for Intel/AMD CPU and VRM, in case of insufficient power supply or too hot VRM, CPU is repeatedly doing short freezes waiting things to be normal again, giving similar symptoms.

Also, when enabling modem with low backlight intensity, the backlight intensity is lowering.

But in the others hand, when doing uplink bandwidth test, the problem does not occur (while according to lm-sensors, uplink is consuming more current, 1.2 Amps instead of 1.0 Amps).

I'm using Mobian kernel from here https://gitlab.com/mobian1/devices/pinephone-linux, downloaded and built on 2020/07/19, on Pinephone UBports community edition (1.2 if I'm right - at least I'm using 1.2 DTB).

How to go further in the understanding of this issue?

Setting the CPU governor to `powersave` fixed it for me. I dont know why.
  Reply
#4
Hi guys, and thanks for your answers

Sorry for not coming back before!
I'm playing again with Linux porting on pinephone (I've made myself a complete tutorial that includes everything I know about pinephone)

This problem became way more serious using Debian 11 and latest 5.10.41 kernel from git clone --depth=1 --branch mobian-5.10 https://gitlab.com/mobian1/devices/sunxi64-linux

After few seconds or minutes of downloading using LTE modem, even at ~1500 to 2000 KB/s bandwidth, the windows are freezing, terminal content doesn't update anymore, pointer moves slowly and everything is stuck

The workaround about "powersave" governor is working! Many thanks

Is there anything new about what is causing this trouble? Is this an hardware issue?
  Reply
#5
Some more detail about the freeze

I turned the Pinephone into a WiFi Access Point (using hostapd and isc-dhcp-server, uncommenting the ipv4 forwarding line into /etc/sysctl.conf and playing iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o wwan0 -j MASQUERADE at startup)

So that now when the LTE is connected, the connection is shared through WiFi

Doing so, when downloading though LTE (without using the governor workaround), the pinephone windows are still having hard time to refresh their content , and when finally every windows are frozen, the Internet connection is still working.

Through SSH, playing dmesg (while download is still occurring) is extremely slow but show 3 new messages:

Code:
[  402.053595] [drm:lima_sched_timedout_job] *ERROR* lima job timeout
[  402.732532] lima 1c40000.gpu: fail to save task state from Xorg pid 609: error task list is full
[  402.741436] lima 1c40000.gpu: gp task error int_state=0 status=0

After the display is kinda stuck (mouse pointer still moves but windows contents aren't refreshed anymore), stopping download and playing "service lightdm restart" can restart a working desktop environment (without restarting the whole phone).

I still don't know why the CPU is freezing so much when modem is downloading! I'll try with different governors just to see.
Temperature is pretty low (45°C) when the problem occurs so again it doesn't look like temperature are involved.
  Reply
#6
By doing some more tests, I found out what the issue is: the CPU is struggling to change its frequency when the LTE connection is used!

Using governor "performance" is also fixing the CPU frequency (unless the temperature is too high, above 60°C the frequency start changing all the time). By using a fan (maintaining the CPU temperature under 50°C), "performance" governor (CPU frequency fixed to 1152 MHz) and "bwm-ng" actualizing every 0.1 seconds on the screen, I had no freeze while using LTE modem.

But I unplugged the fan, and as soon as the CPU frequency starts moving (when temperature reaches 60°C), freezes appears in performance mode too.

Using "ondemand" CPU governor, the CPU frequency is switching all the time, so that using the LTE modem is almost always causing troubles.

EDIT : it implies a new question
What can cause the CPU to struggle changing its frequency while LTE connection is used? Radio frequencies interferences? USB data exchange with the SoC? Power fluctuations?
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Regarding USB Power and Modem Initialization vidual 2 344 08-26-2021, 11:48 PM
Last Post: vidual
  Modem SMS issue(s) Helium75 3 1,614 08-03-2021, 06:30 PM
Last Post: bcnaz
  Modem always disconnects after phone being dropped kqlnut 4 540 07-17-2021, 05:36 AM
Last Post: kqlnut
  Quectel EG25-G Modem Configuration - ofono - Manjaro Plasma mouffa 5 811 06-02-2021, 11:38 AM
Last Post: mouffa
  modem no carrier message Rainer 15 2,581 05-27-2021, 06:02 AM
Last Post: mouffa
  Plans for alternative MODEM coming out? KNERD 0 620 04-05-2021, 05:38 PM
Last Post: KNERD
  Modem network registration fails docteur_saoul 4 2,538 03-19-2021, 05:42 AM
Last Post: asz
  modem not detected al_x 1 928 02-13-2021, 04:14 PM
Last Post: dsimic
  Modem Overheating ReleaseTheGeese 8 1,865 02-04-2021, 03:12 PM
Last Post: someGermanGuy
  LTE modem datasheet links on the wiki are outdated numa 5 2,695 02-03-2021, 02:39 PM
Last Post: rod45

Forum Jump:


Users browsing this thread: 1 Guest(s)