UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Is there any way to change the rendering resolution of lomiri?

    Scheduled Pinned Locked Moved Xiaomi Redmi Note 9 Pro/Pro Max/9S & Poco M2 Pro
    8 Posts 3 Posters 1.4k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • RASR Offline
      RAS
      last edited by RAS

      Hi, I'm trying to figure out a basic of UT device to port 20.04 to my Redmi 9 (lancelot/galahad). I posted in this thread because other xiaomi units of this generation may have had similar issues.

      At the moment the interface is really slowing down, although there is hardware acceleration support. While testing, I was able to run glxgears and do a lot of other non-complex tests to conclude that the performance drop is caused by software redrawing inside Lomiri. What's interesting is that windowed mode runs many times smoother (I was even able to watch videos in the media player without stuttering). It also looks like Lomiri has broken focusing (see screenshot):
      screenshot20240318_203527535(1).png

      And user input causes a small performance hit, but not as bad as redraw.

      Is it possible to change the rendering resolution of Lomiri to reduce CPU load and eliminate/confirm my redraw guess?

      If this is not possible, can you point me to the real problem of performance degradation?

      I've tried changing udev rules:
      https://gitlab.com/ubports/porting/community-ports/android10/xiaomi-redmi-9/xiaomi-lancelot/-/blob/master/overlay/system/lib/udev/rules.d/70-lancelot.rules?ref_type=heads

      It looks like the "graphics" group is deprecated and replaced by "android_graphics" in UT 20.04:

      ACTION=="add", KERNEL=="mali", OWNER="system", GROUP="graphics", MODE="0666"
      ACTION=="add", KERNEL=="ion", OWNER="system", GROUP="graphics", MODE="0666"
      
      

      I also copied some lines from the volla repository (yggdrasilx) as it has a similar Mediatek SoC:
      https://gitlab.com/ubports/porting/reference-device-ports/android10/volla-phone-x/volla-yggdrasilx/-/blob/focal/overlay/system/usr/lib/udev/rules.d/70-yggdrasilx.rules?ref_type=heads

      I also made some other minor changes to the system and it gave a more smooth interface + in glxgears FPS went up by 4 . But I can't claim that my changes led to this, since I didn't do proper testing, maybe the stability of Lomiri on my device depends on the moon phase πŸ˜„

      RASR 1 Reply Last reply Reply Quote 0
      • RASR Offline
        RAS @RAS
        last edited by

        Now I checked the operation with -input flag and saw that rendering is going through llvmpipe( No hardware acceleration. Need help, I don't understand what I'm doing wrong and there is no documentation or I haven't looked hard enough.

        LuksusL arubislanderA 2 Replies Last reply Reply Quote 0
        • LuksusL Offline
          Luksus @RAS
          last edited by

          @RAS there are some options regarding Mir Display Server and how the graphic pipeline is accessed.
          May be you can experiment with different options, see:
          https://docs.ubports.com/en/latest/porting/configure_test_fix/device_info/Mir.html

          For the FP3 I could fix some graphic glitches with following options:
          https://gitlab.com/ubports/porting/community-ports/android10/fairphone/fairphone_fp3/-/blob/halium-10.0/overlay/system/etc/deviceinfo/devices/FP3.yaml?ref_type=heads

          Devices: BQ e4.5, Fairphone 2, Fairphone 3, Lenovo X605F, Pinephone, Moto Z2 Force, OnePlus5T

          RASR 2 Replies Last reply Reply Quote 1
          • arubislanderA Offline
            arubislander @RAS
            last edited by arubislander

            @RAS also glxgears seems to be running via XMir / XWayland, which does not provide hardware acceleration, if I am not mistaken.

            πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
            Happily running Ubuntu Touch
            JingPad (24.04-1.x daily)
            OnePlus Nord N10 5G (24.04-2.x daily)
            PinePhone OG (20.04)
            Meizu Pro 5 (16.04 DEV)

            RASR 1 Reply Last reply Reply Quote 1
            • RASR Offline
              RAS @arubislander
              last edited by

              @arubislander Thanks for the tip! I had forgotten about that. Eglinfo shows Android under vendor. es2_info shows Mesa Project. Could it be a conflict between Mesa and the Android driver? Mali G-52 support is in the Mesa driver via the Panfrost module:
              https://docs.mesa3d.org/drivers/panfrost.html

              1 Reply Last reply Reply Quote 0
              • RASR Offline
                RAS @Luksus
                last edited by RAS

                @Luksus Yes, I tried changing the values in those configs, but it didn't affect anything, not even the interface scaling. When I change the values in UT Tweak Tool, it also has no effect on galahad.yaml and lancelot.yaml, but it does change the interface scaling. Device-info shows the galahad.yaml config, although my device is "lancelot" and this config exists in the system. It seems that lomiri does not use either lancelot.yaml or galahad.yaml for configuration. How can I explicitly tell the system that my device is "lancelot"?

                1 Reply Last reply Reply Quote 0
                • RASR Offline
                  RAS @Luksus
                  last edited by

                  @Luksus It turns out that it is not enough to reboot lomiri to apply the configuration, the whole system needs to be rebooted. Now the configuration is applied, but nothing changes except the interface size. Anyway thanks for the help, now I know a bit more about how lomiri works.

                  arubislanderA 1 Reply Last reply Reply Quote 0
                  • arubislanderA Offline
                    arubislander @RAS
                    last edited by

                    @RAS Yes, those yaml files you mentioned are only read on boot, as you have found out already.

                    πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
                    Happily running Ubuntu Touch
                    JingPad (24.04-1.x daily)
                    OnePlus Nord N10 5G (24.04-2.x daily)
                    PinePhone OG (20.04)
                    Meizu Pro 5 (16.04 DEV)

                    1 Reply Last reply Reply Quote 1

                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                    With your input, this post could be even better πŸ’—

                    Register Login
                    • First post
                      Last post