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
  Supported Carrier and Modem Bands NachoMomma 4 1,352 03-23-2024, 02:00 PM
Last Post: Kevin Kofler
  power circuit can't charge battery and can't supply enough power for modem or wifi vortex 2 364 02-17-2024, 04:15 PM
Last Post: vortex
Bug PinePhone modem keeps "disappearing" Kevin Kofler 14 5,232 03-22-2023, 05:28 PM
Last Post: Kevin Kofler
  modem not working michelinux 0 868 02-16-2023, 04:56 AM
Last Post: michelinux
  modem not detected al_x 3 4,074 02-15-2023, 11:17 AM
Last Post: fxc
  firmware udate Quectel EG25-G modem alwi 7 5,103 07-06-2022, 01:43 PM
Last Post: user641
  Need command to tell what modem firmware I am on. purpletiger 4 2,650 07-06-2022, 12:35 PM
Last Post: Zebulon Walton
  The modem does not recognize Korean SIM cards (what?) bdicewk 9 3,869 06-13-2022, 04:12 AM
Last Post: zetabeta
  Modem Hardware bad? Not ready for 5g?? linux76 8 4,491 05-31-2022, 06:41 PM
Last Post: SwordfishII
  Modem in failed state, not sending/receiving SMS brb78 5 3,512 03-31-2022, 08:37 AM
Last Post: wibble

Forum Jump:


Users browsing this thread: 2 Guest(s)