Getting the Raspbery PI Official Touchscreen to work with RaspiOS Bookworm

Yesterday the latest RaspiOS was released based on Debian Bookworm. This is the version of the OS which will support the forthcoming PI5 but as before it supports every previous version of the PI.

There’s quite a few changes to this, mainly the use of Wayland as the main window manager & back-end rather than the venerable X11 which we have used for decades in the *nix world.

So today I upgraded one of my PI4’s to the new OS by flashing the SD card with the fresh image to see what’s changed and it does look pretty good.

Except, the PI I used was one of the few I have with the official Touchscreen’s attached.

When the PI booted bookworm for the first time all looked well. The display worked fine and it entered the initial configuration fine – except there was no touch. I had to attach a mouse to it so I could complete the process.

Now I had a similar issue before with Bullseye which I remembered was down to some changes within /boot/config.txt so I compared that with another of the touchscreens which I happen to run HomeAssistant on.

So Bookworm has this:

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2

But the working PI has those commented out, so I changed it to:

# Enable DRM VC4 V3D driver
#dtoverlay=vc4-kms-v3d
#max_framebuffers=2

Then rebooted and the PI just had a blank screen.

Fortunately I always enable SSH so logged in and ran sudo raspi-config

In there under 6 Advanced Options there’s A6 Wayland which now controls which backend to use for the desktop. In Bookworm it now defaults to Wayland on the PI4 & soon PI5, so I switched it to W1 X11.

The option to set to use X11 instead of Wayland

Rebooted and we now have a desktop, but also the touch screen now worked.

So, for now at least you cannot use Wayland with the Official touch screen.

As the same drivers are used for other touchscreen’s out there for the PI this could also affect other makes of screens as well – many of them use the same chipset as the official one.

Centralizing Certificate Management of LetsEncrypt with a Raspberry PI

Lets Encrypt is a new Certificate Authority (CA), run for the public’s benefit by the Internet Security Research Group (ISRG). At the time of writing it’s currently in Beta and is due to go public in December 2015.

Update: Lets Encrypt went into public -beta on December 3 2015. I have updated this article with the minor change needed to work with the live servers.

Now in the default mode, the standard Lets Encrypt client (it’s not the only one) can manage this automatically – however it’s not ideal if you have more than one server.

What I describe here is how to centralize managing certificate registration (& later renewal) on a central machine. When a certificate is then registered or renewed we can then copy the certs to the remote servers.

Continue reading “Centralizing Certificate Management of LetsEncrypt with a Raspberry PI”

Installing Java 7 on Debian Squeeze

For all of my servers I use Debian, however that distribution has a few problems, mainly the packages can be a bit behind the cutting edge.

Now this is usually a good thing if you are looking for stability – cutting edge software can have issues, especially from new features etc, so for a live environment you want something thats stable.

However, there does come a time when this can bite back. You either need a feature thats not in the standard repositories or in this case the version is now unsupported.

In Debian Squeeze it has Java 6 – but that was EOL’d a couple of months ago so is no longer supported by Oracle. The current version is Java 7 update 17.

So how do we get Java 7 installed?

Well it’s pretty easy to do, we just need to add another repository into apt and install it.

First the repository:

sudo su -
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
apt-get update
exit

What that does is to install the ubuntu ppa repository into apt, setup the public keys and then load the package lists.

Next we need to install it:

sudo apt-get install oracle-java7-installer

This will now download Oracle Java 7 and present you with a couple of screens about licensing. Just ok and accept it and it will now install.

That’s it. You now have Java 7 installed – but it’s not the default JDK (if you already had Java 6 installed). If you want it to be the default then there’s just one more thing to do:

sudo apt-get install oracle-java7-set-default

That’s a dummy package but it will make Java 7 the default on that machine. If you want to check then you can check:

peter@titan ~ $ java -version
java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)