Skip to content
Snippets Groups Projects

Watch for modem manager changes

Merged Mohammed Sadiq requested to merge (removed):wip/sadiq/watch-manager into master
1 unresolved thread

We can't assume that modem manager is always available, especially during startup. Let's watch for the service and act accordingly.

/cc @guido.gunther

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • I have tested it and I confirm it fixes the issue of seeing no SMS conversation when launching chatty. That is a big fix in term of UX! Thank you @mohammed.sadiq !

  • @francois.techene Out of curiosity - could you show the output of systemctl status ModemManager?

  • purism@pureos:~$ systemctl status ModemManager
    ● ModemManager.service - Modem Manager
       Loaded: loaded (/lib/systemd/system/ModemManager.service; enabled; vendor preset: enabled)
       Active: active (running) since Fri 2020-07-10 11:02:16 CEST; 19min ago
     Main PID: 518 (ModemManager)
        Tasks: 5 (limit: 3112)
       Memory: 10.1M
       CGroup: /system.slice/ModemManager.service
               ├─518 /usr/sbin/ModemManager --filter-policy=strict
               └─654 /usr/lib/libqmi/qmi-proxy
    
    Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
  • mentioned in merge request chatty!419 (closed)

    • I can confirm that this works.

      To test it:

      • stop ModemManager
      • start chatty
      • start ModemManager
      • ???
      • Profit ! (sms chat history appears and new chat button is sensitive again)

      Out of curiosity I tested the "reverse" by stopping ModemManager while chatty is running. This currently leads to a segmentation fault

      (sm.puri.Chatty:3131): GLib-GObject-CRITICAL **: 21:46:25.539: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
      
      Thread 1 "chatty" received signal SIGSEGV, Segmentation fault.
      __strptime_internal (rp=<optimized out>, fmt=0xffffe2331e1a "%m%d%H%M%S%z", tmp=0xffffffffe4b0, statep=0x0, locale=0xfffff6ce2378 <_nl_global_locale>) at strptime_l.c:754
      754	strptime_l.c: No such file or directory.
      (gdb) bt
      #0  __strptime_internal (rp=<optimized out>, fmt=0xffffe2331e1a "%m%d%H%M%S%z", tmp=0xffffffffe4b0, statep=0x0, locale=0xfffff6ce2378 <_nl_global_locale>) at strptime_l.c:754
      #1  0x0000ffffe232f74c in pur_mm_get_sms_properties (sms_props=0xaaaaaadcd460) at mm-sms.c:498
      #2  0x0000ffffe232ef10 in cb_sms_state_change (sms=0xffffdc00c570, pspec=0xaaaaaabd4150, sms_props=0xaaaaaadcd460) at mm-sms.c:274
      #3  0x0000fffff7d61bc4 in g_closure_invoke () from /lib/aarch64-linux-gnu/libgobject-2.0.so.0
      #4  0x0000fffff7d766fc in ?? () from /lib/aarch64-linux-gnu/libgobject-2.0.so.0
      #5  0x0000fffff7d80950 in g_signal_emit_valist () from /lib/aarch64-linux-gnu/libgobject-2.0.so.0
      #6  0x0000fffff7d81250 in g_signal_emit () from /lib/aarch64-linux-gnu/libgobject-2.0.so.0
      #7  0x0000fffff7d669b0 in ?? () from /lib/aarch64-linux-gnu/libgobject-2.0.so.0
      #8  0x0000fffff7d6908c in g_object_notify () from /lib/aarch64-linux-gnu/libgobject-2.0.so.0
      #9  0x0000ffffe22a2574 in ?? () from /lib/aarch64-linux-gnu/libmm-glib.so.0
      #10 0x0000fffff7d61bc4 in g_closure_invoke () from /lib/aarch64-linux-gnu/libgobject-2.0.so.0
      #11 0x0000fffff7d75ee4 in ?? () from /lib/aarch64-linux-gnu/libgobject-2.0.so.0
      #12 0x0000fffff7d80950 in g_signal_emit_valist () from /lib/aarch64-linux-gnu/libgobject-2.0.so.0
      #13 0x0000fffff7d81250 in g_signal_emit () from /lib/aarch64-linux-gnu/libgobject-2.0.so.0
      #14 0x0000fffff7ee9aac in ?? () from /lib/aarch64-linux-gnu/libgio-2.0.so.0
      #15 0x0000fffff7ed6814 in ?? () from /lib/aarch64-linux-gnu/libgio-2.0.so.0
      #16 0x0000fffff7c6435c in g_main_context_dispatch () from /lib/aarch64-linux-gnu/libglib-2.0.so.0
      #17 0x0000fffff7c64708 in ?? () from /lib/aarch64-linux-gnu/libglib-2.0.so.0
      #18 0x0000fffff7c647ac in g_main_context_iteration () from /lib/aarch64-linux-gnu/libglib-2.0.so.0
      #19 0x0000fffff7eaddc4 in g_application_run () from /lib/aarch64-linux-gnu/libgio-2.0.so.0
      #20 0x0000aaaaaaac0308 in main ()
      
      Edited by Evangelos Ribeiro Tzaras
    • This crash is likely fixed in !14 (merged)

    • It's #14 (closed), and I'm still getting that crash with !14 (merged).

    • Please register or sign in to reply
  • added 2 commits

    • f441ca83 - 1 commit from branch Librem5:master
    • 969c6e17 - Watch for modem manager changes

    Compare with previous version

  • Mohammed Sadiq added 1 commit

    added 1 commit

    • 4c73c7bc - Watch for modem manager changes

    Compare with previous version

  • LGTM besides the above small nits (the state logic in pur_mm_state () looks a bit frightening but that's s.th. for a different MR.

  • Mohammed Sadiq added 2 commits

    added 2 commits

    • 9c4b789c - 1 commit from branch Librem5:master
    • 22382b5c - Watch for modem manager changes

    Compare with previous version

  • merged

  • mentioned in issue chatty#370 (closed)

  • Please register or sign in to reply
    Loading