Lazarus Install PI5 Bookworm lazarus / 1-Linux ---------------------------------------------------------------------- andrew Bubble · 2023-11-28 18:47 Hi All I have installed fpc and Lazarus on a Raspberry PI 5 (bookworm) using the "sudo apt install fpc lazarus-ide" from a terminal. Everything seems to be working except for two strange things, when the Lazarus first boots up there is a very small window which comes on just after the splash screen then after about say a minute Lazarus starts as normal, if I expand this small window all it says at the top is Lazarus and nothing else I cannot see any issues when trying to build an application, however when I try to run an application another small window appears, if expand this all it says at the top is project 1. For your information the version details at the bottom of the splash screen are 2.2.6+dfsg2-2. I have tried the install on both 32 bit and 64 bit and the two small windows appears exaclty on both. ---------------------------------------------------------------------- paweld · 2023-11-28 20:03 Hi,      Unfortunately, this is a Wayland problem, which RaspberryPi OS Bookworm uses by default. After switching to X11, the problem you described does not appear. To switch rpiOS to use X11 run a terminal and type: Code: [Select]sudo raspi-config nonint do_wayland W1and then restart the system ---------------------------------------------------------------------- andrew Bubble · 2023-11-28 20:16 Hi Paweld Yes that works fine, I assume if I need to deploy any applications on another Raspberry PI using the latest OS Bookworm I will need to do the same on that pi as well. Regards Andrew ---------------------------------------------------------------------- paweld · 2023-11-28 20:26 Yes. Or patiently wait those dozen / tens of seconds for it to show the application :-) ---------------------------------------------------------------------- TRon · 2023-11-28 20:49 Wasn't this addressed recently with/in 3.0 RC2 fixes (40413) ? ---------------------------------------------------------------------- paweld · 2023-11-28 21:42 @TRon - I will check again tomorrow, but rather not, a month and a half ago I checked has rpi4 with rpios 12 64bit and laz trunk and had to wait ( https://forum.lazarus.freepascal.org/index.php/topic,64874.0.html ). And the closing of the application is from 3 months ago. ---------------------------------------------------------------------- TRon · 2023-11-29 00:21 @paweld: If not mistaken then both threads seem to be referring to Lazarus 2.2.6 while the mentioned fixes are present in 3.0rc2 so in case you already checked the latter and still experience (the same) issues then it might be worth considering re-opening or creating a new bugreport. The pi OS has switched recently to wayland so it might be there are still issues in/with the OS itself. Unfortunately I can't test myself as all my pi's are occupied atm (and am still waiting for new ones to arrive). Dunno if the same behaviour shows itself on the desktop version of Pi OS. Also I dunno when Lazarus 3.0 is to be released, in case is soon(-ish) then it would be more or less cumbersome to test with a release candidate (assuming you wish to update when Lazarus 3.0 release is being published). ---------------------------------------------------------------------- paweld · 2023-11-29 12:36 @TRon: I checked again and unfortunately there is still a problem with the wait time to show the correct window on RaspberryPi OS Bookworm on Wayland and Wayfire window manager. rpi 5, rpi os 12 64bit, Lazarus trunk/fpc trunk. I won't open a issue for now - I'll check if on another Linux with Wayfire there is also this problem ---------------------------------------------------------------------- hansotten · 2025-01-03 13:19 Problem is still present in V4.0 RC1 ./myapp -disableaccurateframe can be used as workaround. ---------------------------------------------------------------------- TRon · 2025-01-03 13:34 The issue has been addressed in trunk (fingers crossed that it will make its way into the final 4.0 release). In their infinite wisdom to keep on being trendy (and after having been disappointed after the realization that wayland/wayfire is not ever going to address the current issues because 'that is the future')  Raspi OS has switched to another window manager (something with lab in the name, sorry can't remember). fwiw that has also a lot of issues. Please don't be surprised to crash the Lazarus IDE by simply adding some components to a empty form. Be informative when mentioning issues with raspi OS because right now things are really messy (bullseye vs bookworm, xwindows vs wayland, window manager x vs y, z  and shoot me in the foot again please because it feels so good). ---------------------------------------------------------------------- Fred vS · 2025-01-03 15:17 Quote from: TRon on January 03, 2025, 02:34:13 pmBe informative when mentioning issues with raspi OS because right now things are really messy (bullseye vs bookworm, xwindows vs wayland, window manager x vs y, z  and shoot me in the foot again please because it feels so good). Wayland is the party pooper. It solves nothing, only brings restrictions, is obsolete and poorly designed. But IBM and RedHat love it and so we're all going to have to love it too. https://gist.github.com/probonopd/9feb7c20257af5dd915e3a9f2d1f2277 ---------------------------------------------------------------------- MarkMLl · 2025-01-03 16:35 Quote from: TRon on January 03, 2025, 02:34:13 pmIn their infinite wisdom to keep on being trendy (and after having been disappointed after the realization that wayland/wayfire is not ever going to address the current issues because 'that is the future')  Raspi OS has switched to another window manager (something with lab in the name, sorry can't remember). I've had significant problems with the RPi's homegrown window manager (the less experienced might not recognise this as a very specific "term of art", in practice these days it's rolled in with the desktop environment). Basically, it was skimping on some of the font metrics it should have been passing to X11, and an application using- IIRC- Qt was getting very badly confused about permissible window sizes etc. Needless to say, nobody admitted that it was their problem. In the end I moved over to using a PC. MarkMLl ---------------------------------------------------------------------- Thaddy · 2025-01-03 17:28 This is not an fpc problem but a wayland problem. You can turn wayland off and use X-windows instead. The alternative is making sure you have all updates, since wayland is a moving target and at least at MY side most problems with wayland on rpi5 have disappeared. ---------------------------------------------------------------------- TRon · 2025-01-03 18:35 The problem is if someone mentions an issue with a raspi OS we as a community cannot be certain of whatever configuration is responsible for any issue (so most probably might not even be related to FPC/Lazarus/LCL) . So be explicit when mentioning issues with raspi os. Otherwise be prepared to use bullseye 32-bit with X and the default window manager (which doesn't has any serious issues at least not with gtk2). Raspi devs have already expressed that they will abandon x and wayfire in favour of labwc compositor. The current labwc target does not seem to move fast enough to address issues forthwith. At least that is my experience. Very unstable icw Lazarus and constantly able to crash Lazarus. It never has been a problem before  the 'switch' to Wayland. imho it is a mess.... and it completely baffles me that anyone might think this half baked implementation is a good idea to push onto end- users. You are far better of installing a well tested and at least known to work graphic server/DE combo. ---------------------------------------------------------------------- VisualLab · 2025-01-03 19:37 Quote from: TRon on January 03, 2025, 07:35:26 pmRaspi devs have already expressed that they will abandon x and wayfire in favour of labwc compositor. The current labwc target does not seem to move fast enough to address issues forthwith. At least that is my experience. Very unstable icw Lazarus and constantly able to crash Lazarus. It never has been a problem before  the 'switch' to Wayland. imho it is a mess.... and it completely baffles me that anyone might think this half baked implementation is a good idea to push onto end- users. You are far better of installing a well tested and at least known to work graphic server/DE combo. Well, apparently the people from the foundation assume that the RPi is hardware for conducting experiments, and the software is also for experimenting. And they probably think that anyone who uses it is an experimenter. Ergo, it is perfectly acceptable to experiment with experimenters and their experimental hardware and experimental software As for the RPi - the hardware is quite OK. It doesn't act like it's experimental at all, rather it's quite stable. The software is a different matter - it is indeed poor. But that is completely understandable, because the Linux desktop is "too heavy" for such a small computer (well, maybe the PRi 5 with 8 GB RAM is a bit better). Unless it is "trimmed" from broadly understood multimedia (sound, graphics, camera, etc.) and used to control electronics (for example, using several buttons) and the feedback is displayed using several colored LEDs or simple displays connected via I2C or SPI. Unfortunately, there is currently no other (widely available) OS for the RPi to experiment with. So every RPi experiment is doubly experimental: on an experimental OS, with its own experimental software. A bit too many of these experimental layers ---------------------------------------------------------------------- dbannon · 2025-01-04 04:00 Quote from: hansotten on January 03, 2025, 02:19:02 pm./myapp -disableaccurateframe can be used as workaround. Thanks hansotten, useful info. Fortunately, the more correct --disableaccurateframe also works. The gnu standard says single char options have one dash, multichar options should have two. In our case Application.CheckOptions() knows about only ShortOptions and LongOptions, no hybrids ! So, it will report the one dash version as an error, app should exit. And interestingly, I can reproduce this problem (of the little window) only with gtk2, Qt5 works fine. Davo ---------------------------------------------------------------------- SpaceDawg · 2025-01-29 06:27 Hi All, This is a shame, I was looking to start developing again in Pascal only to find out the one piece of kit I need to use has issues. The Pi5, I also get the small window.  Lazarus is working fine on my desktop great.  But I need to develop a controller using the GPIO pins on the Pi.  Is there a simple work around (I'm trying to get back into development after 20 years out).  I also don't like the alternative of Python, this has a ton of issues. ---------------------------------------------------------------------- TRon · 2025-01-29 06:36 Quote from: SpaceDawg on January 29, 2025, 07:27:44 amIs there a simple work around (I'm trying to get back into development after 20 years out). Simplest workaround: Don't use Wayland. Issue seems fixed in trunk but still Wayland is unstable. Please go bug/nag PiOS developers that they should either fix their shizz or stop distributing their OS with Wayland (as default). Wayland is not production ready. Alternative: use qt widgetset which seems more stable on Wayland. ---------------------------------------------------------------------- SpaceDawg · 2025-01-29 06:40 Yup, I've flipped the Pi to X11 I'll give this a go. ---------------------------------------------------------------------- TRon · 2025-01-29 06:52 Feel free to inform whether or not you have better luck. Personally I got tired of checking  Oh, and good luck (and welcome to the forums) ! ---------------------------------------------------------------------- MarkMLl · 2025-01-29 07:52 Quote from: SpaceDawg on January 29, 2025, 07:27:44 amHi All, This is a shame, I was looking to start developing again in Pascal only to find out the one piece of kit I need to use has issues. The Pi5, I also get the small window.  Lazarus is working fine on my desktop great.  But I need to develop a controller using the GPIO pins on the Pi.  Is there a simple work around (I'm trying to get back into development after 20 years out).  I also don't like the alternative of Python, this has a ton of issues. Just a note: GPIOs are usable on a PC provided that you have an appropriate (usually USB-connected) addon board. I summarised the situation at https://forum.lazarus.freepascal.org/ind ex.php/topic,56063.msg416733.html but basically there are two rather (when I looked at it) poorly-defined APIs, and various things also depend on the facilities provided by the kernel module. It's by no means perfect, but is a fair alternative to having an extra RPi (with all its issues) around if /all/ you need is GPIO (or for that matter I2C or SPI). MarkMLl