2
2
Fork
You've already forked guix-surface
0
Implemenation of linux-surface for GNU Guix
  • Scheme 100%
Find a file
Dariqq a100ac97b3
surface: linux-surface-6.18: Fix build.
* surface/packages/linux.scm (linux-surface-patches-6.18): Fix 0005-ipts.patch.
2026年05月12日 12:48:40 +00:00
surface surface: linux-surface-6.18: Fix build. 2026年05月12日 12:48:40 +00:00
.dir-locals.el Add .dir-locals.el. 2024年11月06日 16:50:48 +00:00
.gitignore Add .gitignore 2023年07月15日 17:45:30 +01:00
.guix-authorizations Add .guix-authorizations 2023年07月16日 09:14:52 +01:00
.guix-channel add keyring to .guix_channel 2023年07月16日 14:45:51 +01:00
COPYING Add COPYING 2023年07月15日 17:45:30 +01:00
news.txt news: add entry for the linux-surface 6.18 update. 2026年02月15日 14:55:29 +00:00
README.org surface: iptsd: Don't use global sysconfdir. 2025年02月15日 09:51:13 +00:00

Guix - Surface

This repopository packages software from the linux-surface project for GNU Guix, most notably the packages

  • linux-surface: The full linux kernel with some added patches to get compatibiltiy with Microsoft Surface devices
  • iptsd: Userspace touch processing daemon for Microsoft Surface devices using Intel Precise Touch technology
  • surface-dtx-daemon: Surface Detachment System Daemons
  • surface-control: Control Microsoft Surface Devices from the command line
  • libwacom-surface: Patches to support Microst Surface devices with libwacom

    It also contains additional packages:

    • surface-pen-button-remap: Remapper for the Bluetooth Button of the Surface Pen.

    and also some shepherd services to use these.

Currently only x86_64-linux is supported.

How to install

Add this repository as a Guix Channel, i.e. add to ~/.config/guix/channels.scm or /etc/guix/channels.scm, creating the file if neccesary.

 (cons*
 (channel
 (name 'surface)
 (url "https://codeberg.org/Dariqq/guix-surface")
 (branch "master")
 (introduction
 (make-channel-introduction
 "9d0cdec8faa1450afc6f437c088bc8929ccdc0a3"
 (openpgp-fingerprint
 "12F3 9DE4 3608 FC37 F146 407A 8386 A528 1605 3118"))))
 %default-channels)

Afterwards run guix pull. This should also pull in the Nonguix channel as a dependancy.

If you want to use guix git authenticate to authenticate this repository manually use

 guix git authenticate 9d0cdec8faa1450afc6f437c088bc8929ccdc0a3 "12F3 9DE4 3608 FC37 F146 407A 8386 A528 1605 3118"

Install the linux-surface-kernel

To pull in the patched linux kernel and all the nonfree firmare edit kernel and firmware fields in your config.scm. The config.scm generated by the install is at /etc/config.scm.

 (use-modules (surface packages linux)
 (nongnu packages linux)
 (nongnu system linux-initrd))
 (operating-system
 ;; ...
 (kernel linux-surface)
 (firmware (list linux-firmware))
 (initrd microcode-initrd) ;; CPU microcode
 ;; ...
 )

The latest LTS release of the surface kernel is avaialable at linux-surface-lts-. If you want a specific version of the kernel use e.g. linux-surface-6.6.

NOTE: This will build the latest linux kernel from source and may take a while depending on your hardware. NOTE: A substitute server is not (yet) available.

Also the version of the linux-surface guix package will be the same as the linux guix package which is the same as the original linux-libre version. This means that linux-libre might be at a higher version than currently offficially supported by the linux-surface project which might lead to issues.

Should you need kernel headers please use the linux-surface-headers package.

Additonal software

surface-control

guix install surface-control

libwacom-surface

If you require the libwacom udev rules and hdwdb files add the following services to your system services.

 (udev-rules-service 'libwacom-surface libwacom-surface)
 (udev-hardware-service 'libwacom-surface libwacom-surface)

The surface/packages/touchscreen includes a replace-libwacom function which will graft libwacom-surface as a replacement of libwacom onto a package depending on libwacom.

Note: The replacement libwacom-surface is called wcomsrfc such that it matches the length of libwacom and make grafting possible.

IPTSD

IPTSD might not work properly on systems without systemd.

Add the iptsd service to config.scm.

 (use-modules (surface services touchscreen))
 (operating-system
 ;;....
 (services (append
 (list
 (service iptsd-service-type)
 ;; ...
 )
 %desktop-services))
 ;; ---- 
 )

You can modify the iptsd condiguration by adding e.g.

 (iptsd-configuration
 (touchscreen-disable-on-palm? #t)
 (touchscreen-disable-on-stylus? #t)
 ;; ...
 )

to the service declaration. The name of the keys mimic the original key names but have the section as a prefix and the are 'guixified'. The list is available in surface/services/touchscreen.scm.

Starting with iptsd@3 iptsd can also handle the touchpad, if your device requires it. To enable this add

(iptsd-types '("touchscreen" "touchpad"))

to the iptsd-configuration.

The shepherd should automatically restart the service if it exits, which could happen after suspending.

If you encounter any touchscreen related problems try restarting the shepherd-service manually:

sudo herd restart iptsd

This will refind the hidraw device for iptsd.

Surface-DTX Daemons

Add the surface-dtx-daemon service to config.scm.

 (use-modules (surface services misc))
 (operating-system
 ;;....
 (services (append
 (list
 (service surface-dtx-daemon-service-type)
 ;; ...
 )
 %desktop-services))
 ;; ----
 )

The daemon is configured with the surface-dtx-daemon configuration. Changing the various scripts can be done by setting the fields

  • detach-handler-exec
  • detach-abort-handler-exec
  • attach-handler-exec to file like objects (i.e. local-files, plain-files, computed-files) for the scripts you'd like to be executed. These will get symlinked to /etc/surface-dtx/attach.sh, etc. It defaults to the upstream defaults.

The optional surface-dtx-userd service for notifications is availabable as a Guix Home service home-surface-dtx-userd-service-type:

 (use-modules (surface home services misc))
 (home-environment
 ;; ...
 (services (list
 (service home-surface-dtx-userd-service-type)
 ;; ...
 )))

Surface-pen-button-remap

Also the surface-pen-button-remap Utility is available. Just add the

(service surface-pen-button-service-type)

to your list of system services and adjust the surface-pen-button-configuration the usual way.

TODOs

  • Additional kernel config required (i.e. relating to intel_mei)?
  • Do services work as expected?
  • Include into Nonguix?

Thanks

Software depends on the Nonguix Project for the full Linux kernel which gets patched to linux-surface.

Inspiration and some configuration comes from Merge Request 51 and Merge Request 130 in the Nonguix repository.

Huge thanks to minikN as his merge request from above was essential for getting started.

License

This repository is licensed under GPL3. See the COPYING file for details.

This does not apply to additional patches for packages included here which may be derivative works of the packages to which they apply and are covered by the licenses of the respective packages.