Welcome to our peer-to-peer forums, where owners help owners. Need help now? Visit eSupport here.

English Community

Linux Operating SystemsOther Linux Discussions
All Forum Topics
Options

192 Posts

11-07-2009

United States of America

179 Signins

1359 Page Views

  • Posts: 192
  • Registered: ‎11-07-2009
  • Location: United States of America
  • Views: 1359
  • Message 1 of 19

Finally X55 5G modem works under linux

2021-06-02, 7:50 AM

Here is an example based on rpm, the following steps need log in as root:

 

1) Download latest kernel 5.13, although 5.12 has mhi driver but it has not been enabled:

    dnf update kernel --release=35

2)  create rpm tree:

    rpmdev-setuptree

3) download latest libmbim, libqmi and ModemMananger, only master branch will work:

      https://github.com/freedesktop/libmbim/archive/refs/heads/master.zip

      https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/archive/master/libqmi-master.zip

      https://github.com/freedesktop/ModemManager/archive/refs/heads/master.zip

4) prepare source packages:

    --unzip those zip files

    --go to each folder, run autogen.sh --prefix=/usr

   --rename the folder to the following name:

      libmbim -->libmbim-1.25.5

      libqmi-->libqmi-1.29.7

      ModemManager--> ModemManager-1.17 

    --create xz file : 

       tar cfJ libmbim-1.25.5.tar.xz libmbim-1.25.5

       tar cfJ libqmi-1.29.7.tar.xz libqmi-1.29.7

       tar cfJ ModemManager-1.17.tar.xz ModemManager-1.17  

    --Move three xz files to  rpmbuild/SOURCES folder

 5) Prepare spec files:

      ModemManager: https://src.fedoraproject.org/rpms/ModemManager/blob/rawhide/f/ModemManager.spec

      libmbim: https://src.fedoraproject.org/rpms/libmbim/blob/rawhide/f/libmbim.spec

      libqmi: https://src.fedoraproject.org/rpms/libqmi/blob/rawhide/f/libqmi.spec

    --Save all three SPEC file to rpmbuild/SPEC folder

    --Edit all versions inside SPEC files  to the current version, that is:

       ModemManager -->1.17

       libqmi -->1.29.7

       libmbim-->1.25.5

 

  --There is a bug in libmbim spec file, need add the following two lines to:

 

      under %file, add line: %{_libdir}/girespository-1.0/Mbim-1.0.typelib

 

      under %files devel, add line:  %{_datadir}/gir-1.0/*.gir

 

6) Make rpms, must in this order:

   rpmbuild -ba rpmbuild/SPECS/libmbim.spec

 

   then install libmbim rpm (libqmi need these!)

   dnf install rpmbuild/RPMS/x86_64/libmbim*,  rpmbuild/RPMS/x86_64/libmbim-devel*,  rpmbuild/RPMS/x86_64/libmbim-utils*

   

   rpmbuild -ba rpmbuild/SPECS/libqmi.spec

 

   then install libqmi rpm:

   dnf install rpmbuild/RPMS/x86_64/libqmi*, l rpmbuild/RPMS/x86_64/ibqmi-devel*,  rpmbuild/RPMS/x86_64/libqmi-utils*

 

   rpmbuild -ba rpmbuild/SPECS/ModemManager.spec

  

   then install ModemManager and ModemManager-glib

 

 7) Reboot. After reboot normally you should see "Foxconn Qualcomm Snapdragon X55 5G" modem. Depends on your system, your SElinux may block ModemManager to access /dev/wwan0p2MBIM port,  you might need allow ModemManager:  ausearch -c ‘ModemManager' --raw|audit2allow -M my-ModemManager and then run semodule -i my-ModemManager.pp

 

 

Kernel 5.13 is not as stable as 5.12 but this is the only option if you want 5G modem running.

 

 

 

  

 

 

 

     

   

Reply
Options

4 Posts

05-22-2021

United States of America

3 Signins

10 Page Views

  • Posts: 4
  • Registered: ‎05-22-2021
  • Location: United States of America
  • Views: 10
  • Message 2 of 19

Re:Finally X55 5G modem works under linux

2021-06-16, 0:10 AM

Thank you so much for this post!

 

You don't assume this will be any different in AARCH64 architecture on a snapdragon CPU, right?

Reply
Options

192 Posts

11-07-2009

United States of America

179 Signins

1359 Page Views

  • Posts: 192
  • Registered: ‎11-07-2009
  • Location: United States of America
  • Views: 1359
  • Message 3 of 19

Re:Finally X55 5G modem works under linux

2021-06-16, 0:20 AM

Will only take you about 15min to compile, why not give a try?

 

 

 

@ Edgy1_MT wrote:

Thank you so much for this post!

 

You don' assume this will be any different in AARCH64 architecture on a snapdragon CPU, right?

 

Reply
Options

4 Posts

05-22-2021

United States of America

3 Signins

10 Page Views

  • Posts: 4
  • Registered: ‎05-22-2021
  • Location: United States of America
  • Views: 10
  • Message 4 of 19

Re:Finally X55 5G modem works under linux

2021-06-16, 0:22 AM
Didn't want to get rid of windows if it wasn't going to work, but i'll give it a shot anyway. Thanks again!
Reply
Options

6 Posts

06-28-2021

United Kingdom of Great Britain and Northern Ireland

3 Signins

15 Page Views

  • Posts: 6
  • Registered: ‎06-28-2021
  • Location: United Kingdom of Great Britain and Northern Ireland
  • Views: 15
  • Message 5 of 19

Re:Finally X55 5G modem works under linux

2021-06-28, 18:03 PM

On my Thinkpad X1 Carbon Gen 9 with the Snapdragon X55 5G system option I find that it 'just works' if I complete the following:

 

Install 21.10 Daily; upgrade to the 5.13 mainline kernel.

 

Hope this helps someone.

Reply
Options

192 Posts

11-07-2009

United States of America

179 Signins

1359 Page Views

  • Posts: 192
  • Registered: ‎11-07-2009
  • Location: United States of America
  • Views: 1359
  • Message 6 of 19

Re:Finally X55 5G modem works under linux

2021-06-28, 18:23 PM

5.13 mhi driver is still in unstable state, crashes every few hours:

 

  mhi-pci-generic 0000:08:00.0: firmware crashed (7)

 

 

@ agoodm wrote:

On my Thinkpad X1 Carbon Gen 9 with the Snapdragon X55 5G system option I find that it ' works' if I complete the following:

 

Install 21.10 Daily; upgrade to the 5.13 mainline kernel.

 

Hope this helps someone.

 

Reply
Options

6 Posts

06-28-2021

United Kingdom of Great Britain and Northern Ireland

3 Signins

15 Page Views

  • Posts: 6
  • Registered: ‎06-28-2021
  • Location: United Kingdom of Great Britain and Northern Ireland
  • Views: 15
  • Message 7 of 19

Re:Finally X55 5G modem works under linux

2021-06-28, 21:11 PM

Yes; I agree.

 

I may have been a bit premature in calling success - traffic flow is sporadic and only IPv6 is working it seems.  Sometimes mbim-proxy process gets stuck using 100% of 1 core.

 

I guess things can only improve.

Reply
Options

6 Posts

06-28-2021

United Kingdom of Great Britain and Northern Ireland

3 Signins

15 Page Views

  • Posts: 6
  • Registered: ‎06-28-2021
  • Location: United Kingdom of Great Britain and Northern Ireland
  • Views: 15
  • Message 8 of 19

Re:Finally X55 5G modem works under linux

2021-06-28, 22:31 PM
Last update this evening... After reading https://www.mail-archive.com/modemmanager-devel@lists.freedesktop.org/msg06598.html I went into the bios and noted that I had the drive by memory protection enabled (top option on the same page as vt-d option). I disabled this and IPv4 started working on the WWAN via my providers IPv4 APN. I've only got 1 bar signal in this location but performance seems OK (40Mbps with 1 bar 4g); stability is perhaps low but could be my signal. mhi-pci-generic 0000:08:00.0: firmware crashed (6) was in the messages log after most recent drop. So to summarise VT-d enabled; drive by protection (top option) disabled. Kernel 5.13. Ubuntu 21.10 daily is the best result I've managed today.
Reply
Options

6 Posts

06-28-2021

United Kingdom of Great Britain and Northern Ireland

3 Signins

15 Page Views

  • Posts: 6
  • Registered: ‎06-28-2021
  • Location: United Kingdom of Great Britain and Northern Ireland
  • Views: 15
  • Message 9 of 19

Re:Finally X55 5G modem works under linux

2021-07-06, 10:59 AM

https://imgur.com/a/DDOsVa0 - great performance and stability seems to be OK for my usage. Performance is extremely variable on the 5G network in general so far and this is not just my laptop seeing issues. I guess its quite new and will improve.

Reply
Options

4 Posts

07-22-2021

France

3 Signins

25 Page Views

  • Posts: 4
  • Registered: ‎07-22-2021
  • Location: France
  • Views: 25
  • Message 10 of 19

Re:Finally X55 5G modem works under linux

2021-07-24, 15:26 PM

Hi,

 

Following the reading of this thread I also jumped to K-ubuntu 21.10 in 'daily' mode to get all the latest patches (I don't want to bother to build & install libqmi, mbim, NetworkManager and such...). I upgraded to kernel 5.13 via 'mainline'/ukuu.

 

I know X55 support is still considered experimental, but i needed to get a new laptop quickly with a LTE modem inside, so I made the jump :)

 

So, this modem works pretty well, configuration with current Linux middleware (NetworkManager UIs) is pretty simple and straighforward.  Bandwidth seems really good and signal sensitvity seems very well too, meaning antennas & hardware design is really good. I am only using 4G, not 5G. I use this laptop while commuting, encountering physical regions where there's no LTE signal, or when signal is present but unable to allow any packet to be transmitted.

I previously used a Carbon X1 gen 5 with a Sierra EM 7455 modem, in the same context and, so, i can compare both from a pure "customer feeling" perspective.

 

On the negative points, I faced some situations where I had to reboot to be able to connect. To compare with my last setup ("X1C5+ sierra EM 7455"), I consider the current setup as less stable and less robust than my previous one:  when I can't connect, I am less confident on the fact that's it's not a modem/software problem than a lack of signal. I know it's still beta. To be honest, sometimes, my commuting goes smoothly without any connection problems, and sometimes I got disconnected, and never manage to reconnect; there's definitely a bug somewhere.

 

The most important problem #1:

1) Connection to LTE failed or partially fail. In this case, the system was able to build a mhi_mbim0 interface and get an IPv4, but not capable of getting the usual IPv6 nor the DNS server information.

  1. I have no kernel logs for this situation, but will provide one when it happens again. Not sure where the problem lies (modem firmware/ libmbim/qmi, NetworkManager or ModemManager).
  2. I read somewhere that restarting NetworkManager fixed this problem, but it did not work for me. I had to reboot, which is pretty annoying.

 

Problems I consider 'minor' :

 

2) I sometimes get 'mhi_net mhi0_IP_HW_MBIM mhi_mbim0: Fragmented packets received. fix MTU ?" messages. Sometimes, connection seems to freeze after such messages, but I observed cases when modem continue working after. It's maybe a variant of problem # and the 'MTU' message is benign.

Anyway, MTU problems only impacts transported data and should not freeze the modem, so, I keep this problem aside for now. The LTE provider seems to offer a 1500 bytes MTU, and, as I am not familiar with LTE, I am not sure if it's correct or not (MTU on LTE seems to vary from 1400 to 1500 depending on carriers).

 

3) I observed a 'firmware crashed', provoking 'mhi_mbim0: Failed to queue TX buf (-5)" messages, but the modem finally got back to life and all reworked properly. This happened once to my knowledge.

 

I will follow up with more accurate descriptions of my problems.

 

Kind regards,

 

 

 

 

 

 

 

Reply
Forum Home

Community Guidelines

Please review our Guidelines before posting.

Learn More

Check out current deals!

Go Shop
X

Save

X

Delete

X

No, I don’t want to share ideas Yes, I agree to these terms

Most Liked Authors

(Last 7 days)

View All