High CPU when idle with no diagram loaded on Linux/Wayland

Environment

  • QCAD Professional 3.32.9 / Qt 6.11.0 / Linux x86_64 / xcb (Flatpak, ‘‘org.qcad.QCAD’’)
  • Ubuntu, GNOME on Wayland, single 6144x3456 display, devicePixelRatio 1
  • Reproduces on a completely stock configuration

Problem

With QCAD open, no drawing loaded and no user interaction, ‘‘qcad-bin’’ sits at
50-70% CPU indefinitely. Xwayland simultaneously consumes a further ~60%.

The cause is a self-perpetuating repaint loop on the ruler viewport margins.
QCAD reserves a 53px margin above and to the left of the graphics view for
‘‘RRulerQt’’ (‘‘HorizontalRuler’’ / ‘‘VerticalRuler’’). Those two strips are
repainted approximately 2175 times per second.

The repaints produce no visible change. I captured both damage regions
directly from the X server with GetImage: each is a single uniform colour,
RGB(239,239,239), 100% of pixels, and byte-identical between captures taken one
second apart. The rulers render no ticks, no labels, nothing.

Evidence

Per-iteration X11 request sequence, repeated ~2175x/sec on the main window:

opcode 59 SetClipRectangles (2 rects) opcode 130 MIT-SHM PutImage x2 (the two ruler strips) opcode 56 ChangeGC (clip-mask -> None) opcode 43 GetInputFocus (blocking XSync round-trip)

Damage rectangles, in main-window coordinates (window 3864x2545):

  • horizontal: x=266 y=302 w=3475 h=53 (above the canvas)
  • vertical: x=213 y=355 w=53 h=1876 (left of the canvas)

‘‘strace -c’’ over 5s: 57163 write, 45730 poll, 22866 writev, 22864 read.
2.2M voluntary context switches. Qt’s event dispatcher polls with a 0 ms
timeout
continuously, i.e. the event queue is never empty and the application
never goes idle.

Ruled out (each tested independently)

  • Platform plugin: ~62% under both ‘’-platform xcb’’ and ‘’-platform wayland’’
  • Widget style: default / ‘’-style fusion’’ / ‘’-style windows’’ → 50 / 50 / 60%
  • Document state: loading a drawing makes it worse (flange.dxf 60%, example01.dxf 70%)
  • Configuration: pristine ‘‘QCAD3.conf’’ still reproduces at 60%

Additional note on the Wayland plugin

Under ‘’-platform wayland’’ the cost shifts to the compositor and gets worse:
QCAD calls ‘‘memfd_create’’ + ‘‘ftruncate(11272664)’’ to allocate a new 11 MB
wl_shm buffer 36 times per second
rather than reusing a pool, alongside ~1835
surface commits/sec. This pins gnome-shell at 100% CPU and makes the entire
desktop unresponsive. Under xcb the damage is absorbed by Xwayland instead.

Not attached: no DXF/DWG is needed - this reproduces on the empty
“Untitled 1” document at startup.

Thanks for your detailed report.

Unfortunately, I cannot reproduce any of this here (Ubuntu, 64bit Linux, Gnome Desktop, Wayland, QCAD 3.32.9). The rulers only paint when the mouse moves and, as expected, there’s virtually no CPU usage if there is no user interaction.

Please indicate what exact Linux distribution and version thereof you are using.

Also, do you have any “exotic” pointer devices such as a tablet, 3D mouse, touchpad, etc?

One thing you could try it to set Gnome GUI scaling to 100% and disable high DPI scaling in QCAD:

QT_ENABLE_HIGHDPI_SCALING=0 flatpak run org.qcad.QCAD

It’s a long shot, but given your high res specs, if this fixes the CPU problem, this might indicate that there’s some devicePixelRatio rounding mismatch.

Thanks for the response. Resetting the Gnome UI scaling (Settings → Accessibility → Text Size) to 100% (was 125%) fixes the problem; the CPU usage goes away and the rulers are drawn correctly. Is this fixable or do I need to stick with no scaling? At my resolution, UI elements are small and hard to read at 100% scaling.

Thanks

===== Packaging =====

  • Flatpak, ‘‘org.qcad.QCAD’’, ref ‘‘app/org.qcad.QCAD/x86_64/master’’
  • Branch ‘‘master’’, origin ‘‘qcad-origin’’, user installation
  • Commit ‘‘e05eec7f2f20948ef4a97f24519343a8463142333c388a3a775beb3088477104’’
  • Build/export date 2026-05-06
  • Runtime ‘‘org.freedesktop.Platform/x86_64/25.08’’ (‘‘freedesktop-sdk-25.08.14’’)
  • Flatpak 1.16.6
  • Sandbox permissions (default, no user overrides applied):
    ‘‘shared=ipc; sockets=x11;wayland; devices=dri; filesystems=home;’’

===== Operating System =====

  • Ubuntu 26.04 LTS (Resolute Raccoon), x86_64
  • Kernel ‘‘7.0.0-27-generic’’ (‘’#27-Ubuntu SMP PREEMPT_DYNAMIC’')
  • Locale ‘‘en_US.UTF-8’’

===== Desktop Session =====

  • GNOME Shell 50.1 (‘‘gnome-shell 50.1-0ubuntu1.1’’)
  • Session type: Wayland (‘‘XDG_SESSION_TYPE=wayland’’, ‘‘XDG_CURRENT_DESKTOP=ubuntu:GNOME’’)
  • Xwayland 24.1.10 — QCAD runs under ‘’-platform xcb’', therefore through Xwayland
  • ‘‘QT_QPA_PLATFORM’’ unset, ‘‘QT_SCALE_FACTOR’’ unset
  • GTK/GNOME ‘‘text-scaling-factor’’ = 1.0, ‘‘scaling-factor’’ = 0

===== Display =====

  • Single monitor: ASUS PG32UCDP on ‘‘DP-3’’
  • Native mode 3840x2160 @ 59.997 Hz
  • Mutter logical scale: 1.5 (fractional) → logical desktop 2560x1440
  • Xwayland presents this monitor to X11 clients as 5120x2880
  • Layout mode: ‘‘logical’’

Mutter experimental features enabled:

['scale-monitor-framebuffer', 'xwayland-native-scaling']

Both of these affect how an Xwayland client’s surface is sized, scaled and
damaged, so they are likely relevant to a repaint/damage issue.

===== Hardware =====

  • CPU: AMD Ryzen 9 3900X 12-Core / 24 threads, x86_64
  • RAM: 30 GiB total
  • GPU: NVIDIA GeForce RTX 3080 Ti, 12288 MiB
  • NVIDIA driver 595.71.05
  • Flatpak GL extensions in use: ‘‘org.freedesktop.Platform.GL.nvidia-595-71-05’’,
    Mesa 26.1.4 (‘‘org.freedesktop.Platform.GL.default’’ 25.08 and 25.08-extra)

To be clear, increasing Settings → Accessibility > Text Size beyond 100% causes the problem, but increasing Settings → Display → Scale does not. Scaling the UI vs just the fonts looks better anyway.

OK, I noticed that when I close the open document “Untitled 1”./qcad-bin doesn’t show up in the list of processes anymore. When starting a new document it’s on top again.

Because the rulers are at suspicion, I disabled them in “Application Preferences” → “Graphics View” → “Appearance” → “Show rulers”. After a restart ./qcad-bin is out of the list of processes which basically means it is using 0% CPU.

So there is really something going on with the rulers. For me not a big deal because I don’t use them.

I just want to chime in here because I just purchased QCad Professional for GNU/Linux and noticed the same. I’m not running the Flatpak but the qcad-3.32.9-pro-linux-qt6-x86_64.tar.gz version. When just running ./qcad the cpu usage of qcad-bin goes to 80% and Xwayland to 50%.

The messages on the console if it is of any use:

QCAD version  3.32.9
22:17:28: Debug:    loading plugins...
22:17:28: Debug:    RCavalierPlugin::init
22:17:28: Debug:    RHelpPlugin::init
22:17:28: Debug:    RJSApiPlugin::init
22:17:28: Debug:    RPolygonPlugin::init
22:17:28: Debug:    RProScriptsPlugin::init
22:17:28: Debug:    RProxiesPlugin::init
22:17:28: Debug:    plugin not initialized
22:17:28: Debug:    RTracePlugin::init
22:17:28: Debug:    RDwgPlugin::init
22:17:28: Debug:    loading static plugins...
Warning:  Unimplemented code.
Warning:  Unimplemented code.
Warning:  Unimplemented code.
Warning:  Unimplemented code.
22:17:29: Debug:    trying to load theme stylesheet:  themes/Dark Grey/stylesheet.css
22:17:29: Debug:    trying to load theme stylesheet:  themes/Dark Grey/stylesheet_linux.css
Warning:  Unimplemented code.
Warning:  Unimplemented code.
Warning:  Unimplemented code.
Warning:  Unimplemented code.
Warning:  Unimplemented code.
Warning:  Unimplemented code.
Warning:  Unimplemented code.
Warning:  Unimplemented code.
22:17:31: Debug:    loading plugins...
22:17:31: Debug:    loading static plugins...
22:17:32: Debug:    loading plugins...
22:17:32: Debug:    loading static plugins...
22:17:32: Debug:    openFiles: 
Warning:  Unimplemented code.
Warning:  Unimplemented code.
Warning:  Unimplemented code.

The system I’m running is Fedora 44 with KDE Plasma 6.7.3 on Wayland.

@EdbO It’s not clear to me if this is related to this topic. Are you also using a text scale factor that is not 100%?

Bug report at:

FS#2739 : High CPU usage under Gnome with Text Size other than 100%

@andrew I haven’t made any changes to QCad. I just downloaded the .tar.gz, unpacked it and started ./qcad. IMO no text scaling done. I did look into "Application Preferences” → “General” → “User Interface” and saw “Auto screen scale factor” enabled and the “Scale factor:” 1. I disabled the “Auto screen scale factor”, restarted QCad but nothing changed.

Enabling / disabling the “Show rulers” shows that there is a problem there.

I also want to mention that I’m using KDE and not Gnome.

Okay, hard to tell if this is related to the original report or not. The original issue was fixed for the upcoming 3.33.0 release. Please let us know if the problem persists on your setup.

Thanks, is it already possible to download the new release or any estimate of release?

An update (QCAD 3.33) is scheduled before end of August.