UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. lkroll
    3. Best
    L
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 12
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: [HowTo] Alternate way of saving battery when using 4G/LTE

      Battery drain on standby with 4G is still a problem on focal, so I updated the script and created a small systemd service to automatically run the script at startup. Maybe this will be useful for some.


      The greeter in focal is called "com.lomiri.LomiriGreeter" instead of "com.canonical.UnityGreeter". So i changed that in the script and tested that it indeed still works.

      I placed the updated script in:
      /home/phablet/.local/bin

      #!/bin/bash
      
      primary_preference="lte"
      saving_preference="gsm"
      sim_slot="/ril_0"
      
      interface=org.freedesktop.DBus.Properties
      member=PropertiesChanged
      
      dbus-monitor --session "type=signal,interface='${interface}',member='${member}'" |
      while read -r line; do
              if [[ ${line} == *"com.lomiri.LomiriGreeter"* ]]; then
                      read; read; read -r line
                      if [[ ${line} == *"IsActive"* ]]; then
                              read -r line
                              [[ ${line} == *"true"* ]] && /usr/share/ofono/scripts/set-tech-preference "${sim_slot}" "${saving_preference}" 1>/dev/null
                              [[ ${line} == *"false"* ]] && /usr/share/ofono/scripts/set-tech-preference "${sim_slot}" "${primary_preference}" 1>/dev/null
                      fi
              fi
      done
      

      Don't forget to make it executable:

      chmod u+x /home/phablet/.local/bin/lte-battery-saver.sh
      

      Ubuntu 20.04 uses systemd instead of upstart so I created a systemd user service in:
      /home/phablet/.config/systemd/user/lte-battery-saver.service

      [Unit]
      Description=LTE battery saver
      Requires=dbus.socket
      After=dbus.socket
      
      [Service]
      ExecStart=/home/phablet/.local/bin/lte-battery-saver.sh
      
      [Install]
      WantedBy=dbus.socket
      

      Now to enable the service:

      systemctl --user enable --now lte-battery-saver
      

      Verify that it is running and up:

      systemctl --user status lte-battery-saver
      

      It should return active and enabled:

      ● lte-battery-saver.service - LTE battery saver
           Loaded: loaded (/home/phablet/.config/systemd/user/lte-battery-saver.service; enabled; vendor preset: enabled)
           Active: active (running) since Sat 2023-04-29 18:44:27 CEST; 1h 11min ago
      

      That's it, now everytime the phone is locked the connection will drop to 2G and back to 4G/LTE once unlocked.
      I tested and verified it on my Oneplus 5T, but it should work on other devices running focal.

      posted in Support
      L
      lkroll
    • RE: Package app for different architectures

      @lduboeuf That does work, thanks for the tip.

      I totally overlooked the cmake builder in the clickable docs but now it makes sense. I just added an extra step to use the right binary before building, but now I can specify for what architecture I want to build the click 👍

      posted in App Development
      L
      lkroll
    • RE: How enable "tap to wake" on startup

      @AmauryDBZ I just put the command into a systemd service file under /home/phablet/.config/systemd/user/enable-doubletap.service

      [Unit]
      Description=Enable Double Tap to Wake on Unity Screen after D-Bus is ready
      Requires=dbus.socket
      After=dbus.socket
      
      [Service]
      ExecStart=dbus-send --system --print-reply --dest=com.canonical.Unity.Screen /com/canonical/Unity/Screen com.canonical.Unity.Screen.setDoubleTapToWakeEnabled boolean:true
      Type=oneshot
      RemainAfterExit=yes
      
      [Install]
      WantedBy=dbus.socket
      

      After that enable with systemctl --user enable enable-doubletap.service

      posted in Google Pixel 3a/3a XL
      L
      lkroll
    • RE: Signal Axolotl status in 2023?

      As long as it is still in the works, you could use Cinny or Element to access a matrix server that uses the signal bridge. That way you even get push notifications and combine multiple messengers into one app. I set up my own matrix server to use the whatsapp bridge, but it also work with Signal. If you do not want to self host I can recommend https://tchncs.de/matrix, which has the signal bridge already set up and instructions on their site on how to use it.

      posted in Support
      L
      lkroll
    • RE: Signal App for UT

      @TheBird Not really. There are a couple guides online about setting up the bridge if you host your own Matrix server, but if you just want to use it you can join a server that already has the bridge set up and ready to go.

      I wrote an example in this topic a while ago: https://forums.ubports.com/topic/8983/signal-axolotl-status-in-2023?_=1700762725683
      I then use Fluffychat built for Focal as my Matrix client, as it has been the most reliable for notifications.

      It is not that hard to do and a really good stop gap solution. Plus you can also bundle Whatsapp and more all in one platform.

      posted in Support
      L
      lkroll