Technical question about High DPI and scaling  [Solved]

Help for Current Versions of MX
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
User avatar
JayM
Posts: 6796
Joined: Tue Jan 08, 2019 3:47 am

Technical question about High DPI and scaling

#1 Post by JayM »

Hi, remember me?

I've been working with an app developer to test a HighDPI version of the app (which is WSJT-X Improved for using digital modes on ham radio: I got my license last August.) I have a 27" BenQ QHD or 2K monitor so I was testing the new version for him but it doesn't seem to improve anything such as font size within the app. To quote the developer, Dr. Uwe Risse:
My modification was that I give this additional command during initialization of the program GUI:
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);

So, the question is, does Linux (or your distro) supports the "AA_EnableHighDpiScaling" parameter?
I'm using MX-23.3 with Xfce. Thanks in advance.

Code: Select all

Snapshot created on: 20240508_0907
System:
  Kernel: 6.1.0-21-amd64 [6.1.90-1] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.1.0-21-amd64 root=UUID=<filter> ro quiet splash
    init=/lib/systemd/systemd
  Desktop: Xfce v: 4.18.1 tk: Gtk v: 3.24.36 info: xfce4-panel wm: xfwm v: 4.18.0 vt: 7
    dm: LightDM v: 1.26.0 Distro: MX-23.3_x64 Libretto March 15  2024 base: Debian GNU/Linux 12
    (bookworm)
Machine:
  Type: Desktop Mobo: AZW model: U59 serial: <superuser required> UEFI: American Megatrends LLC.
    v: JTKT001 date: 02/16/2022
CPU:
  Info: model: Intel Celeron N5095 bits: 64 type: MCP arch: Alder Lake level: v2 built: 2021+
    process: Intel 7 (10nm ESF) family: 6 model-id: 0x9C (156) stepping: 0 microcode: 0x24000024
  Topology: cpus: 1x cores: 4 smt: <unsupported> cache: L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB
    L2: 1.5 MiB desc: 1x1.5 MiB L3: 4 MiB desc: 1x4 MiB
  Speed (MHz): avg: 2794 high: 2800 min/max: 800/2900 scaling: driver: intel_pstate
    governor: powersave cores: 1: 2796 2: 2800 3: 2781 4: 2800 bogomips: 15974
  Flags: ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT disabled
  Type: reg_file_data_sampling status: Vulnerable: No microcode
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Enhanced / Automatic IBRS; IBPB: conditional; RSB filling;
    PBRSB-eIBRS: Not affected; BHI: SW loop, KVM: SW loop
  Type: srbds status: Vulnerable: No microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel JasperLake [UHD Graphics] driver: i915 v: kernel arch: Gen-11 process: Intel 10nm
    built: 2019-21 ports: active: HDMI-A-1 empty: DP-1,HDMI-A-2,HDMI-A-3 bus-ID: 00:02.0
    chip-ID: 8086:4e55 class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.18.0 driver: X:
    loaded: modesetting unloaded: fbdev,vesa dri: iris gpu: i915 display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 2560x1440 s-dpi: 96 s-size: 677x381mm (26.65x15.00") s-diag: 777mm (30.58")
  Monitor-1: HDMI-A-1 mapped: HDMI-1 model: BenQ EW2780Q serial: <filter> built: 2020
    res: 2560x1440 hz: 60 dpi: 109 gamma: 1.2 size: 597x336mm (23.5x13.23") diag: 685mm (27")
    ratio: 16:9 modes: max: 2560x1440 min: 720x400
  API: OpenGL v: 4.6 Mesa 22.3.6 renderer: Mesa Intel UHD Graphics (JSL) direct-render: Yes
Audio:
  Device-1: Intel Jasper Lake HD Audio driver: snd_hda_intel v: kernel
    alternate: snd_sof_pci_intel_icl bus-ID: 1-1.2:6 bus-ID: 00:1f.3 chip-ID: 08bb:29c3
    chip-ID: 8086:4dc8 class-ID: 0300 class-ID: 0403
  Device-2: Texas Instruments PCM2903C Audio CODEC type: USB
    driver: hid-generic,snd-usb-audio,usbhid
  Device-3: KTMicro KT USB Audio type: USB driver: hid-generic,snd-usb-audio,usbhid bus-ID: 1-6:7
    chip-ID: 31b2:0010 class-ID: 0300 serial: <filter>
  API: ALSA v: k6.1.0-21-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse status: active
    2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Wireless 3165 driver: iwlwifi v: kernel modules: wl pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 bus-ID: 01:00.0 chip-ID: 8086:3165 class-ID: 0280
  IF: wlan0 state: up mac: <filter>
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169 v: kernel pcie:
    gen: 1 speed: 2.5 GT/s lanes: 1 port: 3000 bus-ID: 02:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: eth0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8 bus-ID: 1-8:8
    chip-ID: 8087:0a2a class-ID: e001
  Report: hciconfig ID: hci0 rfk-id: 1 state: up address: <filter> bt-v: 2.1 lmp-v: 4.2
    sub-v: 1000 hci-v: 4.2 rev: 1000
  Info: acl-mtu: 1021:5 sco-mtu: 96:6 link-policy: rswitch hold sniff
    link-mode: peripheral accept service-classes: rendering, capturing, object transfer, audio,
    telephony
Drives:
  Local Storage: total: 1.38 TiB used: 369.77 GiB (26.3%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000LM035-1RK172 size: 931.51 GiB
    block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400 serial: <filter>
    rev: LCM2 scheme: MBR
  ID-2: /dev/sdb maj-min: 8:16 vendor: KingDian model: NGFF 2280 512GB SSD size: 476.94 GiB
    block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 0A0
    scheme: GPT
Partition:
  ID-1: / raw-size: 307.59 GiB size: 301.7 GiB (98.08%) used: 160.56 GiB (53.2%) fs: ext4
    dev: /dev/sdb6 maj-min: 8:22
  ID-2: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%) used: 25.7 MiB (26.7%) fs: vfat
    dev: /dev/sdb1 maj-min: 8:17
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 16 GiB used: 108 MiB (0.7%) priority: -2 dev: /dev/sdb7
    maj-min: 8:23
Sensors:
  System Temperatures: cpu: 76.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Repos:
  Packages: pm: dpkg pkgs: 2871 libs: 1612 tools: apt,apt-get,aptitude,nala,synaptic pm: rpm
    pkgs: 0
  Active apt repos in: /etc/apt/sources.list
    1: deb [signed-by=/usr/share/keyrings/gridtracker.asc] https://debian.gridtracker.org/debian/ ./
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
    2: deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
  No active apt repos in: /etc/apt/sources.list.d/microsoft-edge.list
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb https://mxrepo.com/mx/repo/ bookworm main non-free
Info:
  Processes: 300 Uptime: 12h 36m wakeups: 0 Memory: 15.4 GiB used: 7.62 GiB (49.5%) Init: systemd
  v: 252 target: graphical (5) default: graphical tool: systemctl Compilers: gcc: 12.2.0 alt: 12
  Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: UEFI
Please read the Forum Rules, How To Ask For Help, How to Break Your System and Don't Break Debian. Always include your full Quick System Info (QSI) with each and every new help request.

Charlie Brown

Re: Technical question about High DPI and scaling

#2 Post by Charlie Brown »

JayM wrote: Sat Jun 08, 2024 7:14 amremember me?
Of course :D

"Huck" told me you were still alive after that typhoon :D

User avatar
Eadwine Rose
Administrator
Posts: 14621
Joined: Wed Jul 12, 2006 2:10 am

Re: Technical question about High DPI and scaling

#3 Post by Eadwine Rose »

Hehe you and Huck are the same person :laugh:
MX-23.6_x64 July 31 2023 * 6.1.0-37amd64 ext4 Xfce 4.20.0 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 535.247.01 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 870EVO * Samsung S24D330 & P2250 * HP Envy 5030

User avatar
Eadwine Rose
Administrator
Posts: 14621
Joined: Wed Jul 12, 2006 2:10 am

Re: Technical question about High DPI and scaling

#4 Post by Eadwine Rose »

Hey @JayM :)
MX-23.6_x64 July 31 2023 * 6.1.0-37amd64 ext4 Xfce 4.20.0 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 535.247.01 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 870EVO * Samsung S24D330 & P2250 * HP Envy 5030

User avatar
dolphin_oracle
Developer
Posts: 22245
Joined: Sun Dec 16, 2007 12:17 pm

Re: Technical question about High DPI and scaling

#5 Post by dolphin_oracle »

if you have gtk scaling enabled, login, and logout, then the equivalent qt scaling parameter will be applied.

anything else would be on an app by app basis.

otherwise you can export a qt scale factor.

Code: Select all

export QT_SCALE_FACTOR=2
for instance.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
JayM
Posts: 6796
Joined: Tue Jan 08, 2019 3:47 am

Re: Technical question about High DPI and scaling  [Solved]

#6 Post by JayM »

dolphin_oracle wrote: Sat Jun 08, 2024 5:32 pm if you have gtk scaling enabled, login, and logout, then the equivalent qt scaling parameter will be applied.

anything else would be on an app by app basis.

otherwise you can export a qt scale factor.

Code: Select all

export QT_SCALE_FACTOR=2
for instance.
I don't want to scale the entire OS. Just using a bigger system font plus a scaling tweak in Firefox's about:config were all that was needed. Uwe was trying to make a version of the app for use with > 1920x1080 monitors such that everything in the app would look proportionately bigger without having to change the app's font sizes or anything

I may have answered my own question though. I have another ham radio QT app, QLOG, that I've installed from a tarball and its main.cpp file contains the following:

Code: Select all

#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
    QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
    QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
This app's font size and everything looks fine and is perfectly readable on my 2K monitor, so apparently the answer to Uwe's question of whether QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); is supported in MX Linux is yes. It's only his implementation of this in WSJT-X Improved that isn't working. I've let him know.
Please read the Forum Rules, How To Ask For Help, How to Break Your System and Don't Break Debian. Always include your full Quick System Info (QSI) with each and every new help request.

User avatar
JayM
Posts: 6796
Joined: Tue Jan 08, 2019 3:47 am

Re: Technical question about High DPI and scaling

#7 Post by JayM »

Eadwine Rose wrote: Sat Jun 08, 2024 4:33 pm Hey @JayM :)
Hiya!
Please read the Forum Rules, How To Ask For Help, How to Break Your System and Don't Break Debian. Always include your full Quick System Info (QSI) with each and every new help request.

Post Reply

Return to “MX Help”