Running Guix on Framework 16

Hi everyone,

I am interested in trying running Guix on my Framework 16 once it arrives. I have seen posts like Will Guix work straight out of the box with Framework laptop?

Since the firmware on the Framework 16 is probably different from the firmware on the older laptop models, I am wondering if anyone with a Framework 16 has tried running Guix on it. In particular, I would like to know two things:

  1. does the OS play nice with the firmware?
  2. did you need to compile a custom linux kernel for your laptop?

Thanks!

1 Like

It might be a while until anyone can try. I’m pretty sure even batch 1 hasn’t started shipping yet!

They’re still in DVT. Late Q4 before anyone gets one at least.

Correct

1 Like

The FW13 thread for Guix is here:

I haven’t tried Guix with the 7040 series yet (was running 11th gen Intel before), as that would probably be closest to any confirmation whether it will work with the FW16 before it starts shipping. I’ll save this thread and update if I try it on my FW13 AMD.

Using the nonguix channel and non-libre kernel will definitely be required since the amdgpu driver has firmware blobs. I assume likewise for the RZ616/mt7922 wireless card.

Unfortunately, running Guix on the AMD-based Framework 13 does not work, and neither does Nonguix. Both don’t support the wifi chip.

As someone who’s just managed to get guix sd with full disk encryption, hibernation, and wifi (and now bluetooth) working on the AMD Framework 13, I can tell you guix sd does actually work on a framework (and could likely work on the framework 16).

…but it won’t work out of the box.
…and it most likely won’t work out of the box even with nonguix.

You’ll need to use the nonguix packages to get the full linux kernel and linux firmware. But the nonguix linux packages don’t set the kernel configuration necessary to enable the wifi driver for the RZ616/MT7922. (At least, not yet, there’s a merge request to add the setting: nongnu: linux: Enable mt7921e driver. (!347) · Merge requests · Nonguix / nonguix · GitLab)

In the mean time, assuming you’ve setup nonguix channels, you’d essentially need to do something like this in a config.scm:

(use-modules
  (gnu)
  (gnu packages linux)
  (nongnu packages linux))

(define-public linux-with-wifi
  (corrupt-linux linux-libre-6.6
                 #:configs '("CONFIG_MT7921E=m"))) ; re-compile the kernel with wifi module enabled (see: https://github.com/torvalds/linux/blob/master/drivers/net/wireless/mediatek/mt76/mt7921/Kconfig)

(operating-system
  (kernel linux-with-wifi)
  (firmware (list linux-firmware))                 ; ensure the linux-firmware is loaded (see: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/mediatek)

  (users (cons* (user-account
                  (name "<insert-name>")
                  (comment "<insert-comment>")
                  (group  "users")
                  (home-directory "/home/<insert-name>")
                  ;; "lp" group is required for bluetooth
                  (supplementary-groups '("wheel" "netdev" "audio" "video" "lp")))
                  %base-user-accounts))

  (services (append (list (service bluetooth-service-type
                             (bluetooth-configuration 
                                 (name host-name)))) ; use the host-name defined elsewhere when broadcasting
                     %desktop-services))

  ;; ...the rest of the operating-system definition...

)

Then sudo guix system reconfigure config.scm and sudo reboot

EDIT: Add bluetooth configuration settings

4 Likes

Well, I got it to work, even with kde-plasma 5, which is a very pleasant surprise.
Using the non-guix channel and upstream linux, though.
WiFi works, I’ve not tested bluetooth and fingerprint-reader yet.

Alright, turns out a whole lot of stuff I was expecting to just work? Doesn’t. Probably the “easiest” of which being a userspace shepherd. Which, I guess, is something I just expected to work, because systemd has systemctl --user, but doesn’t seem natively supported by shepherd?

I currently don’t really have the time to make it work properly, so I’m installing Arch on the second hard drive as a daily driver, and will pick guix up again once I’ve got some more time.

Late reply, but it appears to be supported: Managing User Services (The GNU Shepherd Manual)

I tried that, but the user shepherd never came up, for some reason I didn’t manage to debug. I’m not well-versed in Guile / Guix, so I’m assuming it’s a skill issue, but I don’t currently have the time to try to figure it out.
Thanks for the pointer, though! :grin:

I am running Guix on the Framework 16. Some of the configuration posted above was helpful, so thanks for that. It has been very exciting to discover this thing, as I love Scheme, lisps are what are fun about computers.

Nonetheless, what I have not managed to get working successfully is my Caldigit TS3 Plus dock. Actually, it works OK, except that if the laptop is made to suspend when logging in, USB controllers disappear when the thing resumes, with the exception of anything already plugged in like a keyboard (luckily, albeit if it is unplugged it cannot be used if plugged back in).

Typical error log as follows:

[112182.949837] xhci_hcd 0000:06:00.0: xHCI host controller not responding, assume dead
[112182.949861] xhci_hcd 0000:06:00.0: HC died; cleaning up
[112182.949905] xhci_hcd 0000:07:00.0: xHCI host controller not responding, assume dead
[112182.949916] xhci_hcd 0000:07:00.0: HC died; cleaning up
[112182.949919] xhci_hcd 0000:06:00.0: Timeout while waiting for configure endpoint command
[112182.949969] xhci_hcd 0000:07:00.0: Timeout while waiting for configure endpoint command
[112183.205994] xhci_hcd 0000:c2:00.3: Timeout while waiting for setup device command
[112188.328383] input: Expert Wireless TB Mouse as /devices/virtual/misc/uhid/0005:047D:8019.002E/input/input81
[112188.328669] input: Expert Wireless TB Consumer Control as /devices/virtual/misc/uhid/0005:047D:8019.002E/input/input82
[112188.328978] hid-generic 0005:047D:8019.002E: input,hidraw9: BLUETOOTH HID v0.01 Mouse [Expert Wireless TB] on f4:26:79:6b:8a:0e
[112188.581817] xhci_hcd 0000:c2:00.3: Timeout while waiting for setup device command
[112188.789970] usb 2-2: device not accepting address 35, error -62
[112194.214055] xhci_hcd 0000:c2:00.3: Timeout while waiting for setup device command
[112199.589708] xhci_hcd 0000:c2:00.3: Timeout while waiting for setup device command
[112199.801533] usb 2-2: device not accepting address 36, error -62
[112199.809637] usb usb2-port2: attempt power cycle
[112205.477847] xhci_hcd 0000:c2:00.3: Timeout while waiting for setup device command
[112210.857534] xhci_hcd 0000:c2:00.3: Timeout while waiting for setup device command
[112211.069591] usb 2-2: device not accepting address 37, error -62
[112216.485611] xhci_hcd 0000:c2:00.3: Timeout while waiting for setup device command
[112221.861762] xhci_hcd 0000:c2:00.3: Timeout while waiting for setup device command
[112222.069483] usb 2-2: device not accepting address 38, error -62
[112222.078047] usb usb2-port2: unable to enumerate USB device

Summary of behaviour:

  1. With primary power from the dock, the above message is typically seen. There looks like there are a few USB controllers dying. For my USB keyboard, it works fine if it is kept plugged in, but it never reappears if it is plugged into any other USB port again.
  2. With primary power from a 100W or 140W power adaptor (I have an EPR adaptor), fewer controllers seem to die, perhaps only one. The USB keyboard can be plugged into other ports and become functional again, but plugging it back into the one it was originally in is never successful.
  3. Notably, display and ethernet are both active regardless of the above.

I guess it’s fairly difficult to say whether it’s a power supply issue, given how tightly integrated Thunderbolt is with USB power delivery, display and a number of data lanes (latter two I guess are most relevant here). The behaviour is different when a separate supply is used, but I have no idea how meaningful that actually is. I also doubt that the laptop is using more than 87W when it’s resuming from sleep, it seems like it could be some sort of race condition.

I think this is the most appropriate place to put this (FW16 running Guix), albeit it strikes me as unlikely that this is an issue originating from the Guix system. (They also can’t support it as I’m using proprietary firmware to get graphics output.) It isn’t clear to me if my issue is similar to the ones reported elsewhere on the forum with this dock.