Bug 349478 - Qualcomm 4G modem not recognised - Works under Gnome
Summary: Qualcomm 4G modem not recognised - Works under Gnome
Status: RESOLVED WORKSFORME
Alias: None
Product: frameworks-modemmanager-qt
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.9.0
Platform: Arch Linux Linux
: NOR major
Target Milestone: ---
Assignee: Jan Grulich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-21 23:21 UTC by Paul Konecny
Modified: 2019-01-20 04:33 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Screencast showing the issue (3.84 MB, video/webm)
2015-06-21 23:21 UTC, Paul Konecny
Details
Screencast under Kubuntu - Generic GSM connection (2.71 MB, video/webm)
2015-06-28 16:31 UTC, Paul Konecny
Details
Journald of current boot - Kubuntu 15.04 (243.29 KB, text/x-log)
2015-06-28 16:32 UTC, Paul Konecny
Details
Arch Gnome without PIN (163.47 KB, text/x-log)
2015-06-29 15:21 UTC, Paul Konecny
Details
Arch Plasma after adding Connection with Gnome (491.28 KB, text/x-log)
2015-06-29 15:22 UTC, Paul Konecny
Details
Arch Plasma only connection (289.14 KB, text/x-log)
2015-06-29 15:22 UTC, Paul Konecny
Details
Arch connection file created with Gnome (249 bytes, text/plain)
2015-06-29 15:22 UTC, Paul Konecny
Details
Arch connection file created with Plasma (235 bytes, text/plain)
2015-06-29 15:23 UTC, Paul Konecny
Details
Kubuntu connection file (196 bytes, text/plain)
2015-06-29 15:26 UTC, Paul Konecny
Details
Journalctl of kubuntu without PIN query (263.43 KB, text/x-log)
2015-06-29 15:26 UTC, Paul Konecny
Details
Journalctl after reboot - No connectivity (317.02 KB, text/x-log)
2015-06-29 15:57 UTC, Paul Konecny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Konecny 2015-06-21 23:21:59 UTC
Created attachment 93285 [details]
Screencast showing the issue

Hi, 
I have an EliteBook 850 G1 form HP with an integrated Huawei M906ME 4G Modem.
HP call it LT4112 Gobi, and it uses a Qualcomm chipset. 
Under Gnome it works without issue. I can see the IMEI, configure the modem and I'm connected right away.
Unfortunately when I try to add a connection under Plasma 5 I only get to choose "Generic GSM" or "Generic CDMA". A connection configured with Gnome works under Plasma. You can see the issue in the attached screencast.
Below is the output of dmesg relevant to the modem, I hope you can help me.


[    5.264789] usbserial: USB Serial support registered for Qualcomm USB modem
[    5.266236] qcserial 2-6:1.0: Qualcomm USB modem converter detected
[    5.266302] usb 2-6: Qualcomm USB modem converter now attached to ttyUSB0
[    5.266827] usbcore: registered new interface driver cdc_wdm
[    5.272802] qcserial 2-6:1.1: Qualcomm USB modem converter detected
[    5.273384] qmi_wwan 2-6:1.4: cdc-wdm0: USB WDM device
[    5.450807] qmi_wwan 2-6:1.4 wwan0: register 'qmi_wwan' at usb-0000:00:14.0-6, WWAN/QMI device, XXXXXXXXXXXX
[    5.450845] usbcore: registered new interface driver qmi_wwan
[    5.451826] qcserial 2-6:1.2: Qualcomm USB modem converter detected
[    5.453733] usb 2-6: Qualcomm USB modem converter now attached to ttyUSB2
[    5.455073] qcserial 2-6:1.5: Qualcomm USB modem converter detected
[    5.455154] usb 2-6: Qualcomm USB modem converter now attached to ttyUSB3
[    5.470479] qmi_wwan 2-6:1.4 wwp0s20u6i4: renamed from wwan0


Thanks!
Comment 1 Lamarque V. Souza 2015-06-28 15:48:33 UTC
Have you tried creating a connection using "Generic GSM"? 4G is still a GSM protocol, so it should work with "Generic GSM".
Comment 2 Paul Konecny 2015-06-28 16:31:00 UTC
Created attachment 93386 [details]
Screencast under Kubuntu - Generic GSM connection

Hello Lamarque, 
as requested I tried adding a connection with "generic GSM device". The PIN query and sudo prompt came so I guess the card unlocked sucessfully, but a connection could not be established. The two error messages at the end read "Timeout while registering in the GSM network" and "The connection has been deactivated" I'll add the journalctl output right away (Then I have to switch the simcard back to the other modem for the kded5 restarting).
Comment 3 Paul Konecny 2015-06-28 16:32:17 UTC
Created attachment 93387 [details]
Journald of current boot - Kubuntu 15.04
Comment 4 Lamarque V. Souza 2015-06-28 23:54:17 UTC
Well, registering to a GSM network is indeed time consuming, it can take up to four minutes. Probably ModemManager is timing out before registration completes. If that is the case then a second attempt should work. Registration starts only after the sim card in pin unlocked. If there is no pin locking then it starts right after modem is powered up, so not using a pin usually gives more time for registration to complete.

Maybe not related to this bug but the messages below mean your old connections' secrets (including pin) have not been imported:

Jun 28 18:13:15 HP-EliteBook-850-G1 org.kde.kwalletd5[1198]: Migration agent starting...
Jun 28 18:13:16 HP-EliteBook-850-G1 org.kde.kwalletd5[1198]: Migration wizard returned an error or has been canceled. The migration agent will resume upon next daemon start
Jun 28 18:13:16 HP-EliteBook-850-G1 org.kde.kwalletd5[1198]: Migration agent stop.
Comment 5 Paul Konecny 2015-06-29 10:32:01 UTC
I don't think it's a registration problem. As you can see, in GNOME it gets a lease almost instantly after I finish configuring the connection. Even before that, when I hit configure it already shows the IMEI and the operator. So it is already registered. On plasma it also works if the connection was created by the Gnome network manager. I believe the problem is that the Plasma connection editor does not recognise the modem and only gives me the option to use a generic GSM device. So maybe it tries to register a dummy device. 
Can there be a problem interfacing with the qcserial driver my modem uses?
Comment 6 Paul Konecny 2015-06-29 10:33:52 UTC
And regarding the migration. I don't use kwallet. I want my connections to come up without having to enter another password. This is why I always click "Allow all users to use this connection" to get kwallet out of the picture. I also have no credentials to migrate on this machine.
Comment 7 Lamarque V. Souza 2015-06-29 14:23:24 UTC
"Generic Gsm" is just a fallback string when Plasma NM is not able to detect modem's manufacturer and model. From driver point of view all Gsm modems are treated like "Generic Gsm". It seems Gnome's applet tries to pin unlock modems earlier than Plasma NM does.

Both Plasma NM and Gnome's applet are just GUI for ModemManager, which is the one that handles all driver related things, so this does not look like a driver issue at all. Well, can you do a test for me? Create a Gsm connection using Gnome's applet and Plasma NM using the same modem but with different connection names. Then send me the files they created so  can take a look at them. The files are usually saved in /etc/NetworkManager/system-connections/<connection name>. Depending on your distribution they might be saved in other another place, but I think Arch and Kubuntu save them in that directory.
Comment 8 Paul Konecny 2015-06-29 15:21:11 UTC
Created attachment 93397 [details]
Arch Gnome without PIN

Log of Archlinux Gnome with PIN query disabled
Comment 9 Paul Konecny 2015-06-29 15:22:00 UTC
Created attachment 93398 [details]
Arch Plasma after adding Connection with Gnome
Comment 10 Paul Konecny 2015-06-29 15:22:35 UTC
Created attachment 93399 [details]
Arch Plasma only connection
Comment 11 Paul Konecny 2015-06-29 15:22:59 UTC
Created attachment 93400 [details]
Arch connection file created with Gnome
Comment 12 Paul Konecny 2015-06-29 15:23:21 UTC
Created attachment 93401 [details]
Arch connection file created with Plasma
Comment 13 Paul Konecny 2015-06-29 15:23:51 UTC
Comment on attachment 93401 [details]
Arch connection file created with Plasma

>[connection]
>id=Yesss Plasma
>uuid=fdb37424-88ba-4620-a02f-e552e9c326fc
>type=gsm
>permissions=
>secondaries=
>
>[gsm]
>apn=web.yesss.at
>number=*99#
>password-flags=4
>pin-flags=4
>
>[ipv4]
>dns-search=
>method=auto
>
>[ipv6]
>dns-search=
>method=auto
Comment 14 Paul Konecny 2015-06-29 15:25:29 UTC
So far so strange. I then tried it with Kubuntu again and at first it failed as well but then it connected...
journal log and connection file coming right away
Comment 15 Paul Konecny 2015-06-29 15:26:06 UTC
Created attachment 93402 [details]
Kubuntu connection file
Comment 16 Paul Konecny 2015-06-29 15:26:52 UTC
Created attachment 93403 [details]
Journalctl of kubuntu without PIN query
Comment 17 Paul Konecny 2015-06-29 15:57:17 UTC
Created attachment 93406 [details]
Journalctl after reboot - No connectivity

Alright, so after a reboot I'm unable to connect again. See attached journal
Comment 18 Lamarque V. Souza 2015-06-30 16:56:25 UTC
(In reply to Paul Konecny from comment #6)
> And regarding the migration. I don't use kwallet. I want my connections to
> come up without having to enter another password. This is why I always click
> "Allow all users to use this connection" to get kwallet out of the picture.
> I also have no credentials to migrate on this machine.

The lines below indicate that KUbuntu is using kwallet's pam integration, so as long as you use your user password to lock kwallet then pam will automatically unlock it right after you login without any user intervention:

Jun 29 17:37:20 HP-EliteBook-850-G1 sddm[882]: Checking for pam module
Jun 29 17:37:20 HP-EliteBook-850-G1 sddm[882]: Got pam-login
Jun 29 17:37:20 HP-EliteBook-850-G1 sddm[882]: kwalletd: Waiting for hash on 17-
Jun 29 17:37:20 HP-EliteBook-850-G1 sddm[882]: kwalletd: waitingForEnvironment on: 20
Jun 29 17:37:20 HP-EliteBook-850-G1 sddm[882]: kwalletd: client connected
Jun 29 17:37:20 HP-EliteBook-850-G1 sddm[882]: kwalletd: client disconnected
Comment 19 Lamarque V. Souza 2015-06-30 17:03:04 UTC
(In reply to Paul Konecny from comment #17)
> Created attachment 93406 [details]
> Journalctl after reboot - No connectivity
> 
> Alright, so after a reboot I'm unable to connect again. See attached journal

By the snippet below it looks like dhcp requests are timing out. Also, registration to operator's network sometimes times out as well. Can 

Jun 29 17:38:11 HP-EliteBook-850-G1 NetworkManager[757]: <info> Auto-activating connection 'Yesss 2'.
...
Jun 29 17:38:11 HP-EliteBook-850-G1 ModemManager[737]: <info>  Simple connect state (4/8): Wait to get fully enabled
...
Jun 29 17:38:11 HP-EliteBook-850-G1 ModemManager[737]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: state changed (enabling -> enabled)
Jun 29 17:38:11 HP-EliteBook-850-G1 ModemManager[737]: <info>  Simple connect state (5/8): Register
...
Jun 29 17:39:12 HP-EliteBook-850-G1 ModemManager[737]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed (searching -> idle)
Jun 29 17:39:12 HP-EliteBook-850-G1 NetworkManager[757]: <warn> (cdc-wdm0) failed to connect modem: Network timeout
...
Jun 29 17:38:16 HP-EliteBook-850-G1 ModemManager[737]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: state changed (enabled -> searching)
...
...
Jun 29 17:38:37 HP-EliteBook-850-G1 login[1916]: pam_unix(login:session): session opened for user paul by LOGIN(uid=0)
...
Jun 29 17:39:23 HP-EliteBook-850-G1 ModemManager[737]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed (idle -> registering)
...
Jun 29 17:39:23 HP-EliteBook-850-G1 ModemManager[737]: <info>  Modem /org/freedesktop/ModemManager1/Modem/0: state changed (searching -> registered)
...
Jun 29 17:39:23 HP-EliteBook-850-G1 NetworkManager[757]: <info> (cdc-wdm0): modem re-registered; re-checking autoconnect
Jun 29 17:39:23 HP-EliteBook-850-G1 NetworkManager[757]: <info> Auto-activating connection 'Yesss 2'.


Jun 29 17:44:32 HP-EliteBook-850-G1 NetworkManager[757]: <info> Activation (wwan0) Beginning DHCPv4 transaction (timeout in 45 seconds)
...
Jun 29 17:45:17 HP-EliteBook-850-G1 NetworkManager[757]: <info> (cdc-wdm0): device state change: ip-config -> failed (reason 'ip-config-unavailable') [70 120 5]
...
Jun 29 17:47:53 HP-EliteBook-850-G1 NetworkManager[757]: <info> (cdc-wdm0): modem state changed, 'connecting' --> 'connected' (reason: user-requested)
...
Jun 29 17:48:29 HP-EliteBook-850-G1 kernel: usb 1-1: USB disconnect, device number 2
Comment 20 Lamarque V. Souza 2015-06-30 17:06:25 UTC
All this looks like driver issue to me or your operator's network has weak signal or is busy where you live. For the dhclient timeouts can you check if there is more than one instance of it running (for the same interface) when that happen? If so then one dhclient may be conflicting to the other.
Comment 21 Paul Konecny 2015-07-02 10:24:35 UTC
It should not be signal quality. I've got almost full 4G bars on my phone with the same operator and considering the larger antennas in the notebook this should not be the source of this problem. 
https://krivokuca.net/2012/08/hp-8560p-gobi-3000-qcserial-and-gobiserial-blues/
Here one guy also has problems with qcserial and switched to "GobiSerial" and they had to maintain it out-of-tree and even fork it. Any idea where I should report this if it really is a driver issue?
Comment 22 Lamarque V. Souza 2015-07-02 15:49:21 UTC
qcserial and GobiSerial are ModemManager's drivers. You should report MM bugs in https://bugs.freedesktop.org/enter_bug.cgi?product=ModemManager
Comment 23 Lamarque V. Souza 2015-07-02 15:54:37 UTC
Hmmm actually they are kernel modules. So you should report bugs in https://bugzilla.kernel.org/. Probably there is a bug entry about this issue there already.
Comment 24 Paul Konecny 2016-01-18 06:04:52 UTC
Hi Lamarque, 
it seems that this issue indeed was originating from the driver
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=59536da34513c594af2a6fd35ba65ea45b6960a1

According to this link it should be fixed in Kernel 4.4
As soon as I get my hands on this Kernel I'll retest. 
Thanks!
Comment 25 Alexander Potashev 2016-03-11 22:54:45 UTC
modemmanager-qt-5.3.1 has never been released, but I guess 5.9.0 was meant here
because Plasma-5.3.1 depends on modemmanager-qt-5.9.0.
Comment 26 Christoph Feck 2018-12-21 02:02:04 UTC
Paul, were you able to test with newer kernel?
Comment 27 Bug Janitor Service 2019-01-05 03:44:15 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 28 Bug Janitor Service 2019-01-20 04:33:10 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!