Larger engine "lite" pack for Debian x86_64 implemented in V4 now

339 views
Skip to first unread message

Johan Sjöblom

unread,
Dec 19, 2025, 6:09:18 AM12/19/25
to PicoChess
I took Randy's Debian image and made a "lite" resource file. Now on Debian you can upgrade to this larger set by following the instruction in the README.md in section "How to add more engines": https://github.com/JohanSjoblom/picochess?tab=readme-ov-file#how-to-add-more-engines

On clean install on new images (Debian or Raspberry) you can now add the larger engine set from the start by giving a parameter to install-picochess.
The default install is always to install just a small set of engines. Here is the readme part explaining the clean install flags for install-picochess if you want to get the larger engine set from the start: https://github.com/JohanSjoblom/picochess?tab=readme-ov-file#quick-installation

I have not tested all the Debian engines in the "lite" pack yet. You can post problems here if you find engines that do not work.

-- Johan



Johan Sjöblom

unread,
Dec 19, 2025, 6:19:28 AM12/19/25
to PicoChess
I can already see that the mame support is built only for GLIBC_2.38. This requires Trixie on Debian. Debian bookworm has only 2.36.

Oswaldo Monteiro

unread,
Dec 19, 2025, 6:20:56 AM12/19/25
to pico...@googlegroups.com
Hello

You developers are amazing! I’m testing version 4 and it’s excellent. It's running on a Pi 5 and it's very fast. Of course, I haven't explored all the features yet, but for someone who already enjoys the experience of version 3, all I can say is that these versions are truly enchanting.

Oswald


--
You received this message because you are subscribed to the Google Groups "PicoChess" group.
To unsubscribe from this group and stop receiving emails from it, send an email to picochess+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/picochess/29a8364f-eec2-44b7-a61c-f106fde9775cn%40googlegroups.com.

Randy Reade

unread,
Dec 19, 2025, 6:36:41 AM12/19/25
to pico...@googlegroups.com
Yes. A few engines that I recently updated were compiled on Linux Mint 22.2.

Randy

Johan Sjöblom

unread,
Dec 19, 2025, 7:56:32 AM12/19/25
to PicoChess
Thank you Oswald !

Randy, while I remember, I did make some changes when making this first Debian lite resource file. Here it is while I remember it:
- I replaced the LC0 and StockfishNN binaries with my earlier compiles for the "small" package. LC0 is therefore OpenBlas I think you had an NVidia compile. So these two will work on Bookworm as well as Trixie.
- I made all the maia as symbolic links to LC0 (elitev2, classic, maia3, maiav0320)
- I let the Maia weights in the uci files point to the lc0_weights folder as they were already there and arch independent
- I dropped the Windows64 engines for now
- I had to drop one huge binary engine shashchess (for now, maybe not next time)
- I placed analysis = false also in h-sayuri.uci (it was already in g-galjoe.uci) as with aarch64
- I did not update script-engines as they already existed in arch independent, but I checked the shell script pointers

So Leela chess zero and StockfishNN should work in older Debians as well, at least I could play them on a Bookwork Debian.

I am sure I made some mistakes in this first assembly... lets collect all the fixes you want so that I can then update the tar.gz resource file.

Johan Sjöblom

unread,
Dec 19, 2025, 12:20:07 PM12/19/25
to PicoChess
Ok, had to fix a few bugs in the code. One bug was introduced 9th of December when I added support for remote engines I also broke the pgn_engine functionality. It was broken in commit 8108f60.
I have fixed it now, so anyone who updated between 9th of December and now should pull the latest fixes if you need a working PGN Replay engine. The error is not in the engine, it was in the master code.

Randy Reade

unread,
Dec 19, 2025, 9:01:58 PM12/19/25
to pico...@googlegroups.com
That's great, Johan. Yes, I compiled lc0 for my Dell laptop which has an RTX card. I thought I also enabled blas but perhaps not. It may be a while before I can look at it but I will. I'm sure it's all good.

One suggestion which may assist people installing on amd64, instead of referencing the pi user on the install script, maybe use $USER, as most people probably aren't using pi as their username. 🙂 But, I'm sure you've thought of that already and haven't adapted it to x86. 

Randy

Johan Sjöblom

unread,
Dec 20, 2025, 6:46:08 AM12/20/25
to PicoChess
All installation scripts now allow any user to install. No hard coded "pi" user any more. To make this change safer, it it cannot determine any user name it will fall back to "pi" user. Installations should be done with the user name that will later be using the picochess... I wrote that in the README.md file.

The updater service is running during boot before any user login so it now uses the following command to determine the user:
stat -c %U "$REPO_DIR"
And it also falls back to "pi" if that command does not give any user. It just looks for /home/pi/run_picochess_update.flag.

Now we can start using Picochess any Linux laptop etc :-)

Randy Reade

unread,
Dec 20, 2025, 7:17:50 PM12/20/25
to pico...@googlegroups.com
That was quick. Thanks, Johan. 

Johan Sjöblom

unread,
Dec 21, 2025, 3:58:19 AM12/21/25
to PicoChess
I had to spend some time on fixing the PGN Replay engine handling in picochess. I did not touch the pgn_engine itself, its still the original. But I updated how Picochess V4 uses the pgn header file information.

The engine package for Linux now points to the repo pgn_engine.py which means that the transfer file from the PGN Replay engine did not work as the path was hardcoded in Picochess to always look for the PGN header transfer file in the "extra" folder (engines/$ARCH/extra). I fixed this dependency. It means that we can now place the pgn_engine.py Replay Engine anywhere in the future engine packages, including just soft linking to the repo version (which the Linux lite package now does).

To accomplish this I removed the need for the transfer file. Picochess reads the same pgn_game_file that is found in the uci option. It therefore reads the same file as the PGN Replay engine does. No more need for the transfer file! I removed all handling of the transfer file.

I also stopped the auto-play in PGN Replay from overwriting the original PGN file headers with something like "Player vs PGN Replay engine". I also fixed the multi-pgn situation so now when you open "All Games", or any other multi-pgn-game file, it will first load your first game. You can cycle to game nr 2 by selecting new game from the menu etc. You can now use PGN Replay engine to play through all your played games in games.pgn. This is not quite as good as in V3 which cycled the games backward so that it started with the latest game and worked its way backward, but I simply ran out of development time to fix that. I will open a new issue so that Picochess could support both "forward" and "backward" uci option in the pgn_engine.uci. Then it would start playing the games in the order of last-first!

This fix means that you can store a multi-pgn-game as picochess game 1, 2 or 3 and have PGN Replay engine play through them (only forward at the moment)

I will later also add multi-pgn-game support to the Mode PGNREPLAY so that we can upload a multi-pgn-file and you could use PGNREPLAY mode to step through all the games as with the PGN Replay engine. I don't think its the can of worms that was mentioned earlier.

Dirk

unread,
Dec 21, 2025, 5:27:49 AM12/21/25
to PicoChess
Great to hear that the transfer file is no longer needed - support for backward/forward/random can be implemented later - no worries. Well done!

Next step could be to integrate the pgn engine as an own replay mode in pícochess without the need to select an engine (although this would mean to implement a new selection I/o function for reading the pgn game file and setting some options... 

Maybe we should start to open an enhancement/features ideas list for V4!?

Dirk

Johan Sjöblom

unread,
Dec 21, 2025, 6:19:22 AM12/21/25
to PicoChess
I have already implemented that new built-in mode Mode.PGNREPLAY !!

To get into that mode read a pgn file from disc that has a final resul tlike 1-0  (not *). Like last_game. If you read a file with result * it will go into normal mode so that you can finish the game.
You can also upload a pgn filefrom your mobile, it will do the same as read pgn.

You can also switch to mode PGN Replay from the menu. That will make it read the last_game from disc.

Furthermore, after finishing a game on your DGT board you can set the pieces back into start position, triggering a new game, then place the extra Queen on d5. Voila, it will go into PGN Replay mode and load last_game for you.

In PGN Replay mode you can start or stop autoplay using the pause-play button. If you have picotutor coach or watcher activated it will wait for it to reach depth 17 before triggering the next move so that you get a proper tutor evaluation automatically. To speed up replay close tutor coach and watcher and each move will be launched 1/second

With your queen still on D5, start autoplay, make the first move and remove the extra queen in that order. If you remove your queen before the first move it will trigger a newgame.

Lets experiment and learn how we want the design of the built-in PGN Replay mode to work. Comments are welcome.

— Johan

Johan Sjöblom

unread,
Dec 23, 2025, 8:14:42 AM12/23/25
to PicoChess
A few more steps on our Trixie path and full support for any Linux distribution. With these two PRs we might be able to get rid of our dependency on pulseaudio and X11 respectively:


I can now run Mame artwork on my Linux laptop using Wayland (I am using Debian Trixie and the latest x86_64 lite engine set)
-- Johan

Randy Reade

unread,
Dec 23, 2025, 5:25:22 PM12/23/25
to pico...@googlegroups.com
Nice. One thing to keep in mind is that if you are using the current kiosk.sh script to start the web browser interface it won't work in Wayland as there are some X11 specific commands in there. It will need some adjustments.

Randy

Johan Sjöblom

unread,
Dec 24, 2025, 1:45:20 AM12/24/25
to PicoChess
Yes, good point. I think we should add the latest kiosk.sh to our repository, and then I can update it accordingly. Where should I pick up the latest version? From a V4 image or?
And these branches for Wayland and audio are more to future-proof the repository as Trixie already defaults to it and eventually X11 will be dropped. Audio I guess will always continue to be a challenge on Linux, but with Native python support we might not depend on pulseaudio specifically.

Randy Reade

unread,
Dec 24, 2025, 1:34:13 PM12/24/25
to pico...@googlegroups.com
The latest Trixie Desktop images have the kiosk.sh for X11. v3.4 and v4 should be the same.

Ro Bert

unread,
Dec 25, 2025, 7:42:30 AM12/25/25
to PicoChess
Hello and merry christmas,

just installed V 4.1.9 (lite engine pack) on a raspi 4.
Everything is working fine. Only all variants of lc0 and maia
bug out with "enigine error". Anything i have to configure here?

thnx
Robert

Johan Sjöblom

unread,
Dec 25, 2025, 8:42:31 AM12/25/25
to pico...@googlegroups.com
First thing that comes to mind is to check that you have a engines/lc0_weights folder with all the lc0 and Maia weight files.

2nd to check is that the uci file is referencing that library location for weights files, and NOT engines/aarch64/lc0_weights or ../maia_weights

I will test an install myself this weekend on a Pi 4, and 5... Using latest Raspbian 13 aka Trixie

--
You received this message because you are subscribed to the Google Groups "PicoChess" group.
To unsubscribe from this group and stop receiving emails from it, send an email to picochess+...@googlegroups.com.

Randy Reade

unread,
Dec 25, 2025, 10:29:54 AM12/25/25
to pico...@googlegroups.com
Also, make sure that all lc0 amd maia engines and symlinks in /opt/picochess/engines/aarch64 are marked as executable. Possibly rerunning the install-engines.sh script with the lite variable may sort it out.

Merry Christmas.

Randy

Ro Bert

unread,
Dec 25, 2025, 10:52:06 AM12/25/25
to PicoChess
Hi Randy,
symlinks are: 

lrwxrwxrwx 1 pi pi       12 Oct  7 02:51 maia3 -> lc0v0330-dev

-rwxr-xr-x 1 pi pi  1788304 Sep 18 23:04 lc0v0330-dev

--------------------------------------------------------------------------------------

Content of uci file:

cat lc0v0330-dev.uci 

[DEFAULT]

WeightsFile = /opt/picochess/engines/lc0_weights/792013-192x15.txt

SyzygyPath = /opt/picochess/tablebases/syzygy

Backend = blas

MinibatchSize = 16

CPuct = 1.745000

MaxPrefetch = 0

SmartPruningFactor = 5 

MaxCollisionVisits = 1

UCI_ShowWDL = false


[1-Mean Girl]

WeightsFile = /opt/picochess/engines/lc0_weights/meangirl-8.pb.gz

Threads = 1

PicoNode = 2


[2-Bad Gyal]

WeightsFile = /opt/picochess/engines/lc0_weights/badgyal-8.pb.gz

Threads = 1

PicoNode = 2


[3-Good Gyal]

WeightsFile = /opt/picochess/engines/lc0_weights/goodgyal-7.pb.gz

Threads = 1

PicoNode = 2


[4-Evil Gyal]

WeightsFile = /opt/picochess/engines/lc0_weights/evilgyal-6.pb.gz

Threads = 1

PicoNode = 2


[5-Tiny Gyal]

WeightsFile = /opt/picochess/engines/lc0_weights/tinygyal-8.pb.gz

Threads = 1

PicoNode = 2


[6-Std1Core]

Threads = 1


[7-Std2Cores]

Threads = 2


[8-Std3Cores]

Threads = 3


[9-Std4Cores]

Threads = 4

-------------------------------------------------------------------------------------------------------

Content of engines/lc0_weights:

-rw-r--r-- 1 pi pi  18644442 Sep  5 20:34 792013-192x15.txt

-rw-r--r-- 1 pi pi   6521107 Sep  5 19:15 badgyal-8.pb.gz

-rw-r--r-- 1 pi pi 112363913 Sep  5 19:11 classic1.pb.gz

-rw-r--r-- 1 pi pi 170524829 Sep  5 19:12 classic2.pb.gz

-rw-r--r-- 1 pi pi   8921755 Sep  5 19:04 elite_v2.pb.gz

-rw-r--r-- 1 pi pi   1056477 Sep  5 19:17 evilgyal-6.pb.gz

-rw-r--r-- 1 pi pi  20640654 Sep  5 19:16 goodgyal-7.pb.gz

-rw-r--r-- 1 pi pi   6366549 May 12  2025 LD2.pb.gz

-rw-r--r-- 1 pi pi   1313193 Oct 24 20:01 maia-1100.pb.gz

-rw-r--r-- 1 pi pi   1249692 Oct 24 20:01 maia-1200.pb.gz

-rw-r--r-- 1 pi pi   1244431 Oct 24 20:01 maia-1300.pb.gz

-rw-r--r-- 1 pi pi   1328977 Oct 24 20:01 maia-1400.pb.gz

-rw-r--r-- 1 pi pi   1258199 Oct 24 20:01 maia-1500.pb.gz

-rw-r--r-- 1 pi pi   1313870 Oct 24 20:01 maia-1600.pb.gz

-rw-r--r-- 1 pi pi   1313415 Oct 24 20:01 maia-1700.pb.gz

-rw-r--r-- 1 pi pi   1289431 Oct 24 20:01 maia-1800.pb.gz

-rw-r--r-- 1 pi pi   1262607 Oct 24 20:01 maia-1900.pb.gz

-rw-r--r-- 1 pi pi   1156609 Oct 24 20:01 maia-2200.pb.gz

-rw-r--r-- 1 pi pi 101659153 Oct 24 20:01 maia-2500.pb.gz

-rw-r--r-- 1 pi pi 170521553 Sep  5 19:28 maia3.pb.gz

-rw-r--r-- 1 pi pi    746615 Sep  5 19:00 meangirl-8.pb.gz

--------------------------------------------------------------------------------------------

Do you see anything missing?

Thanx
Robert

Randy Reade

unread,
Dec 25, 2025, 11:09:19 AM12/25/25
to pico...@googlegroups.com
No. That looks good. But if you are running maia3 you will need to look at the maia3.uci file.

Can you try running the engine from the command line?

./maia3


Ro Bert

unread,
Dec 25, 2025, 11:20:29 AM12/25/25
to PicoChess
HI,
yeah, bails out with:

pi@pico:/opt/picochess/engines/aarch64 $ ./maia3

./maia3: error while loading shared libraries: libopenblas.so.0: cannot open shared object file: No such file or directory

don't know why this lib wasn't installed. what to do?

Robert



Randy Reade

unread,
Dec 25, 2025, 11:29:25 AM12/25/25
to pico...@googlegroups.com
Yes. That's strange. Try this (going from memory):

sudo apt install libopenblas-dev

If apt doesn't find that let me know and I'll get you the right command.

Ro Bert

unread,
Dec 25, 2025, 12:09:01 PM12/25/25
to PicoChess
Hi Randy,
that did the job. Thank you for your help an the fantastic job on picochess.

Greetz
Robert

Randy Reade

unread,
Dec 25, 2025, 12:14:47 PM12/25/25
to pico...@googlegroups.com
Great.

It looks like libopenblas-dev was inadvertently removed from the PicoChess install script when the lc0 compile requirements were commented out on Oct 23. I'm sure Johan will add this library back in when he has some free time.

Randy

Johan Sjöblom

unread,
Dec 25, 2025, 1:39:29 PM12/25/25
to PicoChess
Installer install-picochess.sh script now updated in master branch. Thanks Randy.
PS. I am still trying to get my new 4.3 inch screen to go into 800x480 and rotate 90 degrees but no luck so far. I thought I would build a small screen Pi4 chess companion. I just assembled this: https://www.waveshare.com/4.3inch-dsi-lcd-with-case.htm

Randy Reade

unread,
Dec 25, 2025, 2:21:25 PM12/25/25
to pico...@googlegroups.com
I have one of those but not with me. I think you will need to add some commands in /boot/firmware/cmdline.txt.

See here:


I don't think the old config.txt way works in Bookworm or later.

RandyR

unread,
Dec 25, 2025, 3:08:16 PM12/25/25
to PicoChess
I just checked my x86_64 version of lc0v032 and it does include the blas backend. The default is cuda auto so you would have had to add/uncomment the 'Backend = blas' directive in the [DEFAULT] section of the various .uci files.

Johan Sjöblom

unread,
Dec 25, 2025, 3:12:25 PM12/25/25
to PicoChess
I realised that I am now using a DSI display, not any of the HDMI ports. The DSI will run in its native 800x480 by itself. The only thing I had to do (took a while to figure this out though) was to add one line to the kiosk.sh before launching chrome:
xrandr --output DSI-1 --rotate right

Now I have a small compact Pi 4 setup with the 4.3 screen. But this trick does not fix the touch screen. 

RandyR

unread,
Dec 25, 2025, 3:51:18 PM12/25/25
to PicoChess
You might need to add a dtoverlay file for that to work.

Johan Sjöblom

unread,
Dec 25, 2025, 4:22:20 PM12/25/25
to PicoChess
Fixed! I added a file /etc/X11/xorg.conf.d/90-ft5x06-rotate.conf
With this content:
Section "InputClass"
    Identifier "FT5x06 touchscreen rotate"
    MatchProduct "ft5x06"
    MatchIsTouchscreen "on"
    Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"
EndSection

This is of course very specific setting for the display I purchased, but it proves you can build a 4.3 inch touch screen with Pi4 and picochess and get a nice portrait mode like on a mobile phone... I need to test more. Its intended as a companion for my DGT board. If I could fix a nice power solution for both the DGT and the Pi4. The DGT already has battery, so maybe just a battery for Pi4. And some physical buttons (touch works, but maybe some physical buttons would be nice? The buttons would make the solution close to the DGT 3000 clock. I would like to have 2 physical buttons: Lever, and Play/Pause button... Maybe I should add Raspberry Pi buttons or a joystick to navigate the menu?... Anyway, experimenting continues! So far the assembly is a success.

RandyR

unread,
Dec 25, 2025, 4:31:12 PM12/25/25
to PicoChess
Nicely done.

Aldo Bleeker

unread,
Dec 26, 2025, 6:04:37 PM (14 days ago) 12/26/25
to PicoChess
I'm using picochess 4 on the Rpi 5 and a 7" Touch Display 2 with 1280x720 (16:9) resolution in landscape mode. You're supposed to be able to rotate the display with a command in /boot/firmware/cmdlines.txt, but that didn't work for me. What did work for me was to use the Control Centre to set the Orientation to Right. That did rotate the display, but not the touch screen. I've fixed it by adding a line to /boot/firmware/config.txt, like so.

dtoverlay=vc4-kms-dsi-ili9881-7inch,swapxy,invx

That worked for me in Bookworm, and in Trixie too, by the way.

Aldo

Aldo Bleeker

unread,
Dec 27, 2025, 8:27:07 AM (13 days ago) 12/27/25
to PicoChess
That command for /boot/firmware/cmdline.txt is

video=DSI-1:1280x720@60,rotate=90

However, that supposedly only affects the console.

Interestingly, if I switch to labwc (Wayland), rotating the display with Control Centre also rotates the touch screen, so the dtoverlay isn't needed.

Aldo
Reply all
Reply to author
Forward
0 new messages