0

Running Ubuntu 20.04 in wls 2 from Windows 11. X-window blacked out when I run Livepatch from desktop GUI and tried CLI "sudo canonical-livepatch enable " and received "error executing enable: failed to register client: unauthorized". Reinstall and new machine ID didn't work.

Ben
  • 1

1 Answers1

0

A few notes:

  • As @ArchismanPanigrahi mentioned in the comments, Livepatch just doesn't make sense in the context of WSL2. With WSL2, you are really running something more like an Ubuntu "container" inside the WSL2 Hyper-V virtual machine.

    Each distribution you install runs in its own namespace, but they all share the same kernel (and some other components, like network, etc.).

    So within the context of WSL2, Ubuntu never actually updates its kernel anyway.

    To update the WSL2 kernel, we typically use wsl --update (assuming a recent Windows release) to check for the latest WSL2 kernel release, install it, and save the second-most-recent as a rollback option. You can also build your own from source, if desired.

  • If you've gotten to the point in the Livepatch instructions that you are trying to enable it via sudo canonical-livepatch enable, then (from what I'm reading in the Livepatch doc) that means you would have needed to install it via Snap. That, by extension, would mean that you are running a Systemd enablement script such as Genie or WSL2Hacks.

    Please note that running Systemd scripts under WSL drastically changes the behavior of the system, so please, if this is the case, make sure you highlight this important detail when asking for assistance.

  • You mention in the comments not being able to run other GUI apps besides just Livepatch, such as the KDE Settings. I can reproduce this when attempting to run systemsettings5 in VcXsrv with the "Multiple windows" option. However, it does run successfully in the following environments:

    • VcXsrv running the full Plasma desktop in either "Fullscreen" or "One large window" modes.

    • WSLg under Windows 11 simply running systemsettings5 from the command-line under the built-in Weston server (windowed mode).

    • WSLg under Windows 11 running the full Plasma desktop on an XWayland instance.

  • You mentioned in the comments that you are just experimenting using VcXsrv, but honestly, there's probably no need since you mention you are running Windows 11 which includes WSLg.

    Similar to what I did in this answer, to run Plasma in Windows 11/WSLg:

    sudo apt install xwayland kde-plasma-desktop
    Xwayland :1 &
    WAYLAND_DISPLAY= DISPLAY=:1 kwin &
    WAYLAND_DISPLAY= DISPLAY=:1 startplasma-x11
    

    I still prefer and recommend xrdp for running a full-screen desktop in WSL, however. It's a cleaner experience since the RDP client captures almost all keys and sends them to the Linux desktop.

NotTheDr01ds
  • 22,082