Skip to content

Vehicle template selection does not render correctly on linux HiDPI displays when not using a uv created venv #544

Description

@gwvr

Is there an existing issue for this?

  • I have searched the existing issues

Description of the bug

My monitor is 4K, with 3840x2160 resolution. I use 200% scaling in Cinnamon (so Linux Mint users with HiDPI monitors will likely also be affected). GUI doesn't render fonts in some selector windows correctly.

Steps To Reproduce

  1. Buy 4K monitor
  2. Set HiDPI/scaling to suit the tiny pixels and make everything readable and pretty
  3. Run ardupilot_methodic_configurator
  4. Click "Skip FC connection.."
  5. Click selector under "Source Template directory:"
  6. Observe incorrectly spaced text and obscured text

If I set display scaling back to 100% (which makes everything look tiny), then that selector renders correctly.

Expected behavior

Ideally ardupilot_methodic_configurator would play nice with HiDPI/Scaled displays. I realise this may not be easy with the chosen GUI software.

Screenshots / Logs

Fonts in the template selection screen look like this:

Image

Software information

  • Operating system: Debian GNU/Linux 12 (bookworm) x86_64 with Cinnamon desktop environment
  • arduPilot Methodic Configuration version: 1.4.8

Additional context

No response

Activity

  1. added
    bug
    on Jun 9, 2025
  2. Merga189 commented on Jun 10, 2025

    @Merga189

    Not a problem here, but it could be a DPI thing on your side.

    EIZO 27" with

    ~$ inxi -Fz
    System:
      Kernel: 6.1.0-37-amd64 arch: x86_64 bits: 64 Desktop: Xfce v: 4.18.1
        Distro: Debian GNU/Linux 12 (bookworm)
    Machine:
      Type: Desktop Mobo: ASUSTeK model: PRIME X370-A v: Rev X.0x
        serial: <superuser required> UEFI: American Megatrends v: 6232
        date: 09/29/2024
    CPU:
      Info: 8-core model: AMD Ryzen 7 5700G with Radeon Graphics bits: 64
        type: MT MCP cache: L2: 4 MiB
      Speed (MHz): avg: 2446 min/max: 1400/3800 cores: 1: 1400 2: 2399 3: 3223
        4: 1400 5: 3250 6: 1400 7: 3284 8: 3568 9: 1400 10: 1400 11: 3027 12: 1400
        13: 3800 14: 1400 15: 3800 16: 2999
    Graphics:
      Device-1: NVIDIA GP108 [GeForce GT 1030] driver: nvidia v: 535.247.01
      Display: x11 server: X.Org v: 1.21.1.7 driver: X: loaded: nvidia
        unloaded: fbdev,modesetting,nouveau,vesa gpu: nvidia
        resolution: 1920x1080~60Hz
      API: OpenGL v: 4.6.0 NVIDIA 535.247.01 renderer: NVIDIA GeForce GT
        1030/PCIe/SSE2
    

    Image

    Tried to run DEBIAN 12 in general with a NUC on our 55" 4K TV. WIN 11 is OK, but DEBIAN is a hassle and I finally gave up.
    Don't think, it is a MethodicConfigurator problem.

  3. gwvr commented on Jun 10, 2025

    @gwvr
    Author

    @Merga189 1920x1080 on a 27" display is not HiDPI and doesn't require display scaling to be readable. Also Xfce desktop environment is a long way removed from Cinnamon (which uses a compositor with hardware acceleration).

    I've been using Linux on the desktop for over 20 years, and would concede that Debian isn't the ideal place to start. Suggest Linux Mint if you're looking for something a bit friendlier.

    ETA: I suspect this is an issue with TKinter not detecting HiDPI and setting suitable scaling.

  4. Merga189 commented on Jun 10, 2025

    @Merga189

    Therefore I am with my applications on such a small screen. And with Xfce, because it keeps things simple. Started with Kubuntu, then PCLos, changed to Debian starting with Wheezy, Jessie and Stretch and so on. Had LM one year on a TP some years ago, but LM is too much beating around the bush (for me).

    Might find help at https://www.python.org/community/forums/

    Found great help there when struggling building AP under Debian from the sources last year .....

    Hope you get that issue solved - br

  5. amilcarlucas commented on Jun 12, 2025

    @amilcarlucas
    Collaborator

    See file ardupilot_methodic_configurator/frontend_tkinter_template_overview.py line 89 to 134

  6. removed
    bug
    on Jun 15, 2025
  7. added a commit that references this issue on Jun 22, 2025
    77479b8
  8. gwvr commented on Jul 4, 2025

    @gwvr
    Author

    @amilcarlucas thanks for giving this your attention.
    Unfortunately #571 does not seem to have resolved this issue on my HiDPI setup. My laptop runs the same desktop environment, without HiDPI, and the template selection box renders correctly there.

    I installed using

    pip install git+https://github.com/ArduPilot/MethodicConfigurator.git@master
    

    so I presume that should include #571 ?

  9. amilcarlucas commented on Jul 4, 2025

    @amilcarlucas
    Collaborator

    Can you post a new screenshot? I tested it at different DPI on windows and it worked fine.

  10. gwvr commented on Jul 6, 2025

    @gwvr
    Author

    I suspect Windows and Cinnamon on Linux handle scaling in different ways.

    Image

    Linux thinks the monitor is 96dpi. "Monitor Scale" display setting in Cinnamon is set to 200%. Default fonts are 9-11 pt, and "Text Scaling Factor" is 1.0.

    > xdpyinfo | grep -B 2 resolution
    screen #0:
      dimensions:    3840x2160 pixels (1016x571 millimeters)
      resolution:    96x96 dots per inch
    

    Actual monitor screen size is approximately 62x34cm. Obviously 62cm != 42 inches | 1016 mm. Actual DPI is roughly 160.

  11. amilcarlucas commented on Jul 6, 2025

    @amilcarlucas
    Collaborator

    Thanks, I will try to reproduce it on Ubuntu 20.04 LTS

  12. 10 remaining items

  13. OmkarSarkar204 commented on Mar 21, 2026

    @OmkarSarkar204
    Contributor

    @OmkarSarkar204 can you test this on macOS? select HiDPI and see if the software still displays correctly.

    Its working but my display is 2560x1600 Retina and not 4K so i tried scaling and its working perectly in that too.

    I think it also fixes the "Open selected vehicle configuration directory button" , previously it was not showing sometimes and i have to increasse the size of the modal to click the button, but will test more and report if it happens again...

  14. amilcarlucas commented on Mar 23, 2026

    @amilcarlucas
    Collaborator

    I finally found a way to activate HiDPI on my Ubuntu Mate 20.04 computer:

    Image

    It works fine with v2.10.2

  15. gwvr commented on Mar 23, 2026

    @gwvr
    Author

    Still no change on my machine. v2.10.2, still on Debian 12. I'll revisit this when I've got a fresh Debian 13 or LMDE7 install.

  16. changed the title [-]Template selection box does not render correctly on HiDPI displays with scaling (Linux - Debian)[/-] [+]Template selection box does not render correctly on HiDPI displays with scaling (Linux - Debian 12)[/+] on Mar 24, 2026
  17. amilcarlucas commented on Mar 24, 2026

    @amilcarlucas
    Collaborator

    This works on Ubuntu 20.04 and other users tested it on other ubuntu versions.

    So currently looks as it is a Debian 12 specific issue. I'll keep it open, I want to fix this.

  18. gwvr commented on Jun 4, 2026

    @gwvr
    Author

    I've very recently updated from Debian 12 to LMDE7 (which is based on Debian 13). I am still using the Cinnamon environment (with X), but now using an Nvidia GPU, replacing my venerable AMD Radeon HD7790 (circa 2014, but GCN architecture). Monitor configuration is as before, with 200% scaling.

    Using UV for the python environment (3.13.13), these are the results. Whilst not perfect, this is a big improvement!
    Image

  19. gwvr commented on Jun 4, 2026

    @gwvr
    Author

    Previously I had tested in a virtualenv using python built against the system tk libraries, so I thought I'd try that again.
    Image

    As you can see, the results are practically the same as I was getting back in July last year.
    System Python on Debian uses libtk8.6 (libtk9.0 is available, but Python depends on 8.6), whilst the UV Python uses libtk9.0.

  20. amilcarlucas commented on Jun 5, 2026

    @amilcarlucas
    Collaborator

    So looks like the solution is to use a UV created virtual environment and run that, instead of installing to system and running without uv?

  21. changed the title [-]Template selection box does not render correctly on HiDPI displays with scaling (Linux - Debian 12)[/-] [+]Vehicle template selection does not render correctly on HiDPI displays when not using a uv created venv[/+] on Jun 5, 2026
  22. amilcarlucas commented on Jun 5, 2026

    @amilcarlucas
    Collaborator

    And many thanks for testing and reporting this again.

  23. changed the title [-]Vehicle template selection does not render correctly on HiDPI displays when not using a uv created venv[/-] [+]Vehicle template selection does not render correctly on linux HiDPI displays when not using a uv created venv[/+] on Jun 5, 2026
  24. gwvr commented on Jun 5, 2026

    @gwvr
    Author

    It'd be nice if the "Double-click the template.." text was scaled properly, but in terms of being usable, yes, installing with UV seems to be a solution.
    I'd investigate further, but the lack of proprietary Nvidia drivers on the Mint & Ubuntu live disks means that I can't just spin those up and test. If only I'd known before taking the AMD card out..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions