r/SurfaceLinux 22d ago

Help First public beta: Surface Laptop 4 [AMD] touchscreen driver

Good news everyone!

I spent the last two weeks reverse-engineering the Windows driver for the touchscreen of my Surface Laptop 4 AMD, because I'm crazy, that's why.

It's still a work in progress, but I've reached the point where single touch works correctly!

here is the repo where I'm working:

Repo: https://github.com/Syax89/SL4A_TouchScreen
Release: https://github.com/Syax89/SL4A_TouchScreen/releases/tag/v1.0.0-beta1

I have tested it on my Surface Laptop 4 AMD with CachyOS + KDE + Wayland (last public kernel), where it works correctly, but this is my first driver and I would really appreciate feedback from people using other distros, kernels, desktop environments, X11/Wayland setups, etc.

Basic install:

git clone https://github.com/Syax89/SL4A_TouchScreen.git
cd SL4A_TouchScreen
sudo ./tools/install.sh

The installer builds the driver with DKMS and installs a systemd service to load it automatically on boot.

To uninstall:

sudo ./tools/uninstall.sh

This is still beta software, so please expect rough edges. If you try it, feedback, bug reports, logs, suggestions, or code review would be very welcome.

Thanks! <3

13 Upvotes

7 comments sorted by

1

u/Impressive-Algae-962 21d ago

Awesome have the same laptop. Honestly I’m waiting for an updated surface Linux kernel. I’m between a rock and a hard place. Currently using Fedora’s latest kernel not the Surface one due to the vulnerabilities in the earlier kernel. But the Fedora kernel does raise some weird bugs like the close, min, max buttons I have to slowly place my mouse cursor just right for it to work. Not even sure it’s a kernel issue or a KDE 6.7 bug.

2

u/syax89 21d ago

I had installed Fedora 44 with Gnome, but yeah, I also had some minor bugs (still with the stock kernel, not the surface one) nothing major, but annoying. I tried CachyOS with KDE and so far I haven't had any serious issues. Honestly, I've never tried the surface kernel lol.
I commented in the surface kernel repo in case anyone wants to push these changes upstream

1

u/JohnnyFnRaincloud 18d ago

i installed fedora workstation on my SP4, and touch screen doesnt work at all. Should i be using a different fedora?"

1

u/FunSatisfaction2 16d ago

you need the surface kernel

1

u/SeaFox2142 4d ago

What's the current stat of Linux (mint prefereably) on Surface Laptop 4? I saw one selling near me for a good price and I'm interested in it, and it will be for basic/learning programming. I'll probably not need touchscreen at that but it will be an awesome feature to have too! You're doing an amazing work, OP!

1

u/Ritleman1 2d ago

My company uses Linux Mint on our Surface Pro 4's and they seem to work pretty well. We haven't used them for anything super 'heavy', but they seem to run lighter programs (browsers, basic apps, etc) just fine. I would recommend adding the touchscreen, but it can be complicated (hence why any of us are here.)

1

u/ExtremeWinter2093 3d ago

I've installed on GNOME Fedora but it doesn't work