I've created a gameboy emulator to unlock my Wayland session and wanted to share this project to everyone here!
I've been a Linux enthusiast since I was a kid. What always captivated me was the freedom to customize my system exactly the way I wanted. With Wayland, we've reached an incredible level of performance. It's like turning your operating system into a video game! I've always been fascinated by the blend of fun and the serious, technical nature of an OS. That’s what inspired me to create this project.
I started by studying Wayland, its protocol and how to build a compositor. Then I became particularly intrigued by the concept of a locker, which reminded me a bit of an escape game. That’s when I thought: how cool would it be to solve a puzzle to unlock your session, instead of just typing a password? Since I’ve worked with emulators in the past and I’m a huge Pokémon fan, the idea of building the puzzle around that game came to me instantly!
Technically, the locker code and the wayland protocol have been implemented from scratch ( using EGL and wl_keyboard_listeners ). My locker runs a version of the gbcc emulator modded by myself. This emulator waits for one precise value to be set in a given memory address.
I have modded the Pokémon game to my needs: when the password is good, I put the good value in the good memory address so the emulator knows it needs to unlock the session.
Hope you will appreciate this project!
¹ It always seems to be just around the next corner. Sixteen years on, it would be nice if we could have feature parity.
But jwz (XScreenSaver's creator and maintainer) doesn't give me much hope: https://www.jwz.org/blog/2025/07/xscreensaver-wayland-and-lo...
I adore this project on its own merits too because using the memory values in an emulated game is something that has fascinated me since Twitch Plays Pokémon integrated their Twitch display!
If you think it's embarrassing, you're welcome to contribute a working implementation or pay someone else to do it. Otherwise, I don't see how it's embarrassing.
A general "wayland" protocol for it didn't exist back then, but in this thread we see ext-session-lock exists now, and jwz was recently trying to use it where available: https://www.jwz.org/blog/2025/07/xscreensaver-wayland-and-lo... so you might see an xscreensaver port soon.
It's a sort of attitude that isn't really that problematic when one person does it; but becomes problematic if it becomes a popular thing to do.
Anyone here who lived through the 1990s might remember that the ENERGY STAR certification initiative — that today measures all sorts of things — began specifically to grade computer monitors on their ability to be put into a low-power sleep state by software control.
Everyone back then loved the computer personalization aspect of screensavers — I had After Dark installed myself! — and what resulted was an energy-waste tragedy-of-the-commons of a large-enough scale that the EPA had to get involved.
I use steam deck with TV as a media PC and it's OLED, I don't want to lock a media PC nor want to display a static picture on it.
Of course, screensavers are still plain fun. That's justification enough to set one if you want.
It's fun.
You should also post here: https://news.ycombinator.com/item?id=44837981
https://blogs.kde.org/2025/03/15/this-week-in-plasma-file-tr...
For me the real conundrum was SwayWM vs KDE Wayland rather than any X.org session; I really felt like SwayWM was a good upgrade from i3wm and gave me a better desktop session with much less hacks. Hope to see wlroots push forward and support some of the newer Wayland protocols, it has started to fall behind a little bit, but I think it's good for alternative desktops.
Anyway though, the "standard" way to do automatic clicking and typing on Wayland is via the RemoteDesktop portal, named such because it is used with ScreenCast to support use cases like VNC and RDP servers. Despite the poor choice of name, it gives a general API for sending inputs programmatically.
https://docs.flatpak.org/en/latest/portal-api-reference.html...
This does require at least a one-time permission grant for an application to use, but at least on KDE it is possible for the permission to persist across runs.
I'm sure everyone is unenthused about having to deal with another way to do things, but it's at least decently straightforward... You could certainly invoke this from a quick Python script I reckon.
(There's also libei but it's kind of a mess imo and I don't know if it is well-supported yet.)
It's entirely the point of moving to Wayland for many.
That is a significant caveat.
1. I'm on an NVIDIA graphics card - this struggles a lot, I won't lie, and it's really odd issues which are difficult to track down. 2. I'm running Deskflow for virtual KVM - this is using literally someone's hand-rolled attempt to hack Wayland to make it work - it manages the most important element: my keyboard and mouse are shared between my Linux desktop and my MacBook - but much of the incidental functionality, most notably copy-pasting and repeating held keys, doesn't work at all. Mod keys seem a bit fucky as well.
That said, I'm committed - am excited to see the tech honed in the coming years.
I'm admittedly biased against Wayland because in my view it's been a disaster both in organization and technically, and I've had some very frustrating interactions, but even so there's no way it's accurate to describe Wayland as very new.
Wayland started development in 2008. Version 0.85 of the protocol and of Weston, which the devs called "the first real release", was in early 2012. KDE (KWin) started adding Wayland support in 2011.
Wayland development began almost exactly 17 years after Linus released the first 0.01 kernel. Next month Wayland turns 17. So Wayland has been in development now for half of Linux's entire existence, and it's still not mature. It started when iPhone 3G was a new top notch phone, the MacBook Air was just launched, 4G mobile networks were not yet commercially available, netbooks were highly popular, solid-state drives were just breaking into the market, and the term blockchain hadn't yet been invented.
You may like Wayland, but what you're saying is you're using the most common GPU vendor (yes everyone loves AMD's open approach to drivers, but there's a reason Nvidia dominates completely, and that's because AMD GPUs are not competitive) and basic functionality like copy-pasting and key repeats doesn't work for you. Yes Deskflow isn't the most standard setup but this is completely like my experience with Wayland. A 17 year old project and it only works for a certain set of typical setups with typical use cases the committee blessed.
Works great except for the copy-and-paste issues and the mod key resets - just as you describe. I've been fiddling with it the last couple of days.
Funny to see someone with such a similar setup and issue.
Esoteric issues aside, the general use of CachyOS has been very smooth.
There seems to be a lot of momentum for desktop Linux, with Microsoft and Apple dropping the ball lately. LLMs also make deep configuration of Linux more manageable. The stars seem to be aligning for it.
Wayland in Raspberry Pi OS (labwc)
Wayland in Debian: Bookworm (Sway), Trixie (labwc)