Recent

Author Topic: Lazarus increase process Xorg to about 60% cpu  (Read 734 times)

jark3

  • Newbie
  • Posts: 2
Lazarus increase process Xorg to about 60% cpu
« on: December 16, 2025, 07:32:46 pm »
Lazarus IDE version 4.4 installed via fpcupdeluxe causes increased CPU load – the Xorg process increases CPU usage to approximately 60% when Lazarus is launched. Using Lazarus is very slow, especially copying/pasting another program, such as a web browser, opening the file open/save dialog, and compiling. Furthermore, the program constantly "jitters." I should also add that I had the same problem in version 3.6.

My operating system: Fedora 42 Linux
Kernel: Linux 6.17.11-200.fc42.x86_64 x86_64
RAM: 15.5GB
Processor: Intel® Pentium® CPU G3258 @ 3.20GHz x 2
Graphics: NV106
« Last Edit: December 16, 2025, 07:53:31 pm by jark3 »

jamie

  • Hero Member
  • *****
  • Posts: 7490
Re: Lazarus increase process Xorg to about 60% cpu
« Reply #1 on: December 16, 2025, 08:15:13 pm »
Did you install the Native version of Windows version on a VM ?

Jamie
The only true wisdom is knowing you know nothing

jark3

  • Newbie
  • Posts: 2
Re: Lazarus increase process Xorg to about 60% cpu
« Reply #2 on: December 16, 2025, 08:19:45 pm »
No, Lazarus is installed directly on the Fedora 42 linux system

jamie

  • Hero Member
  • *****
  • Posts: 7490
Re: Lazarus increase process Xorg to about 60% cpu
« Reply #3 on: December 16, 2025, 08:27:04 pm »
Don't know, could the way it's always been?

I do know at first startup the IDE needs to allocate memory and does not do so until some functions are performed, like dropping a button on a form but after that it should be ok.

  I don't see any reason why Linux would be much different in that respect unless you have other apps running and your real memory pool is running low and the swap file working hard!

Jamie
The only true wisdom is knowing you know nothing

cdbc

  • Hero Member
  • *****
  • Posts: 2561
    • http://www.cdbc.dk
Re: Lazarus increase process Xorg to about 60% cpu
« Reply #4 on: December 16, 2025, 08:30:36 pm »
Hi
edit: Whoa, wait a minute, how do you get Xorg on Fedora 42?!?
I was under the impression that Fedora dropped support for X-org/11 long ago  %)
Otherwise:
> > > Wayland + Gtk2 < < <
...I'd rather stand on my own balls -- Gtk2 doesn't do wayland!
Try the Lazarus Qt6 version it works with wayland & X11  :-X
Regards Benny
« Last Edit: December 16, 2025, 08:33:16 pm by cdbc »
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

zeljko

  • Hero Member
  • *****
  • Posts: 1821
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Lazarus increase process Xorg to about 60% cpu
« Reply #5 on: December 16, 2025, 08:57:16 pm »
gtk2 uses xwayland in that case, and that can be real PITA.

dbannon

  • Hero Member
  • *****
  • Posts: 3647
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus increase process Xorg to about 60% cpu
« Reply #6 on: December 17, 2025, 10:06:49 am »
XWayland is just a compatibility layer that provides a basic XServer that then talks to Wayland. While it works OK with GTK2 apps (and, eg, some Java app) its just a temporary fix, no further development is likely and I'd be surprised if it even gets bug fixes. As wayland 'develops' (ie gets it many bugs and missing parts fixed) its unlikely XWayland will track it.

So, lets not mess around, GTK2 is more or less dead.

So, use Qt5 or Qt6. Newer OS will have the appropriate libs in their repositary, sadly, older OSs will not *

As a general rule however, I set the Qt5 version of my app to use XWayland too. **

GTK3 is getting better, the Lazarus trunk version does work, my app builds and runs but, again, sadly, falls over frequently. (I'm trying to find out why.)

Davo

(*) prebuilt Qt5 and Qt6 libraries, only for use if your distro ones do not work, https://github.com/davidbannon/libqt5pas and https://github.com/davidbannon/libqt6pas 

(**) to tell Qt5 app to use xwayland, set an env var to xcb. eg QT_QPA_PLATFORM=xcb tomboy-ng

Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

 

TinyPortal © 2005-2018