Mobile Data Usage

So for January my mobile data was shut off (I blew through my 5 gigs well before the end of the month) my carrier will do this automatically to prevent unintentionally huge data charges). It seems the librem 5 is using mobile data even if a wifi source is available and connected.

I’ve played around in the advanced networking app changing the metered network setting to yes for my mobile data and selecting no for my various wifi connections I use. It still seems to be rifling through my mobile data for some reason. My thinking was that if had to do with the priority setting so I changed the mobile broadband connection to 1 and my wifi connections left at the default of 0. Can someone explain how the librem decides how to use data? I can’t keep blowing through my data well before the end of the month.

This month already I’ve blown through more than half my plan already, so I’m thinking something isn’t right.

2 Likes

I’ve been curious about this too. I have a higher data cap so I haven’t been throttled, but I do notice that the icons indicate I am connected to WiFi but the connection seems to slow down similar to 4G speeds.

Even the Signal desktop app will say I am disconnected even though I have both WiFi and Mobile modem on and I am still able to browse the internet (albeit slower like 4G speed). This makes me think it stopped detecting the most recent connection, the WiFi. Once I toggle the WiFi off (either software or HKS) and leave the mobile modem on it immediately reconnects.

I’ve also noticed that the advanced networking app doesn’t seem to be reporting the connections accurately. I just came home and it retorted “now” for both my home wifi and the mobile internet. Then I shut down the app and restarted it and now it only says “now” for the home wifi and “39 minutes” for mobile internet. Strange.

There are a couple of interesting tools I just found here: https://www.slashroot.in/find-network-traffic-and-bandwidth-usage-process-linux
I’m not sure if they’ll help.

Both are run as sudo.

I see a few other suggestions in other fora, which I found by searching “linux see which apps are using data.”

2 Likes

The last time I looked in this area, data was being routed based on metrics, ip route will show the metric value for each route (lowest value takes precedence). It’s quite simple in it’s approach, unfortunately, it’s doesn’t really work too well particularly if routes/interfaces just drop out, disappear, drop in or reappear rather than being intentionally brought up or down.

Thanks for finding this, I’m running nethogs on my Librem 5 right now, so far so good with wifi and mobile data enabled it’s showing only traffic on the wifi.

1 Like

Found the culprit. Brave continued to leave up an existing connection on the wwan0 interface even though wifi was available to it. In fact the same brave process it seems was active on both simultaneously. Thanks Brave, can I send you a bill? Oh and closing the app did nothing to affect this connection…it just continued to do it’s thing.

I know it’s probably on the wish list but we definitely need granularity in restricting background data per app. I nuked Brave for now and I’m back to Firefox ESR.

3 Likes

I was also unfortunate enough to waste my entire data limit without realizing it, although I was under the assumption that the “unlimited talk/text/data” plan was unlimited, which turned out to not be the case.
Upon re-reading the description of the AweSIM plan, there was the asterisk that read “30gb data cap” but I’m throttled to a mere 32kb/s with frequent interrupts instead of the expected 128kb/s.
Now I’ll know better than to download any livecd images from my phone…
One thing you might want to consider is installing vnstat that monitors the data usage of all network devices, you have to manually enable vnstatd via systemctl so that it starts up automatically.
It shows a simple table of upload/download totals daily/monthly and a rough estimate of how much you’ll use throughout the month, but you can refine it’s output via options pretty well.

3 Likes

I’m kind of shocked that the app was able to get away with that on the Librem 5. Maybe I’m just naive… :man_shrugging:?

The real shocking thing was that it kept that connection up even after I closed the app.

1 Like

By the way, when I first saw your OP, I initially thought maybe a lot of phone calls via VoLTE are the source of the data usage; I think I read that you had enabled VoLTE, and since the L5 doesn’t do voice over wifi, that would mean the mobile data connection would be active. But the high amount of background data you report would seem to rule that out; it would take a helluva lot of phone calls, I think.

Although I have VoLTE enabled, my particular Librem 5 isn’t using it…Calls default to HSPA. My account has VoLTE enabled so it’s not from the carrier side. Also I think the data used for VoLTE calls is metered differently because the data for a call will be routed to the voice core not the internet, so really a VoLTE call should not use up your data plan.

1 Like

I don’t know for a fact, but I’ll bet you two bits that the rogue traffic crypto/BAT token related.

There’s a setting (I assume also in the arm version) to allow something to run in the background even after the app is closed. Can’t remember what exactly its called though. Its defaulted to on.

Thanks you sir, that was it. I’m also seeing Nextcloud very busy as well although I have 2 Nextcloud servers one at home for syncing files and also one on a VPS for contacts and calendar events but that shouldn’t account for a lot of data I would think. The local Nextcloud server is only available when I’m at home on wifi for file syncing so that’s not it. I’ll have to get vnstat running to keep a tally on things and report my findings. It would be nice to have per app background data settings tho.

Did some further playing around with vnstat and it’s companion vnstati that will generate an png which displays your usage in a graphical pie chart like so…here is a summary graph:

summary

Just need to automate generating this in a cron job then I should have a pretty good idea of my mobile usage at all times.

2 Likes

I wasn’t even aware of the vnstati package, that’s a nice addition.
I should also note that I’ve experienced the same issue of the browser on the phone trying to use mobile data instead of utilizing connected wifi networks, as I’ve had to rely on open wifi exclusively for networking for just under a month now the phone continues to use the available 4g network instead until I disable mobile data in the settings. Kind of tedious.

Yeah that’s what I’m doing. Leaving mobile data off unless I absolutely need it. I’m lucky that I can tether off my work phone which has 25 gig of data so I don’t worry about using it, but I would like to be able to go somewhere with my librem 5 on it’s own without gobbling up my 5gig personal plan I have. It’s happened twice now since I got it.

I tried to innstall it, but it says:

sudo apt install vnstati
...
Unpacking vnstati (2.6-3) ...
Setting up vnstat (2.6-3) ...
Your account has expired; please contact your system administrator.
chfn: PAM: Authentication failure
adduser: `/bin/chfn -f vnstat daemon vnstat' returned error code 1. Exiting.
dpkg: error processing package vnstat (--configure):
 installed vnstat package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of vnstati:
 vnstati depends on vnstat (= 2.6-3); however:
  Package vnstat is not configured yet.

dpkg: error processing package vnstati (--configure):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.9.4-2) ...
Errors were encountered while processing:
 vnstat
 vnstati
E: Sub-process /usr/bin/dpkg returned an error code (1)

Looks like that order of installation counts:

  1. sudo apt install vnstat
  2. sudo apt install vnstati