Score:0

WSL - Livepatch error executing enable: failed to register client: unauthorized

in flag

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.

us flag
I don't know if livepatch works with WSL, but do you really need it? Livepatch is primarily meant for upgrading kernel in servers, which cannot be restarted because it will cause a service interruption. In case you use WSL 24x7, and cannot afford to restart it because it is constantly in operation, then use regular Ubuntu instead. It would be a much better experience.
Ben  avatar
in flag
Thank you...my wsl x-window also goes black for anything I do in settings for ubuntu...perhaps I'm not an administrator?
Ben  avatar
in flag
I can't use the KDE settings either on the desktop. I'm experimenting really using Vcxsrv.
Score:0
vn flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.