24

I've started seeing a livepatch warning in my system tray.

System tray icons.

Clicking it takes me the the livepatch client where I see this error message:

Canonical Livepatch has experienced an internal error. Please refer to https://wiki.ubuntu.com/Kernel/Livepatch#CommonIssues for further information.

Despite the URL, there isn't a #CommonIssues section on the page: https://wiki.ubuntu.com/Kernel/Livepatch#CommonIssues

Any ideas how I can fix this?

Ubuntu 18.04.2 LTS
4.15.0-34-generic

freddybob
  • 1,438
  • 3
    Run sudo apt install gtk3-nocsd and then export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0. Also, canonical-livepatch refresh require sudo privileges – Kulfy May 12 '19 at 12:04

4 Answers4

23

First of all what is connonical-livepatch, its a service provided by ubuntu for critical infrastructure ( which your desktop is not ) to remove the code that might be harmful, without requiring an restart. I dont think a desktop needs it, so disable it.

Secondly if you are not using Ubuntu Pro ( Its part of Pro, you need to create an account, and make sure token is there ) , I dont think it will work anyway, thats why you get error because you dont have token for getting those.

If you are actually running some critical infrastructure, then getting on not getting is up to you

For most users using ubuntu in desktop simply disable it.

but if you are still using it, and you know that you have the token maybe give it a refresh, maybe there is some error in network etc.

sudo canonical-livepatch refresh
  • 1
    I started to receive error after manual update and restart of computer (restart was required even before livepatch was activated on the machine). This one helped. Thx, – Honza P. Feb 11 '20 at 20:28
  • 1
    Thanks, sudo canonical-livepatch refresh works fine for me on Ubuntu 20.04. Very simple and useful. – almaceleste Mar 19 '21 at 16:08
  • My kernel was updated to a newer version as proposed by Canonical. That was the reason of the exclamation mark for me. "nothing to apply kernel: (unsupported) patch state: ✓ no livepatches needed for this kernel yet" –  Jun 06 '22 at 23:02
  • This is the kind of things that make Linux fail on the desktop. Canonical, put the refresh on the menu! Or refresh after a while! – chila Jun 04 '24 at 12:40
  • @chila do you even know what that is ? why are you using it if you dont like canonical? it needs ubuntu pro, which most people coming here dont have. you just enable it in the settings, and expect it to work for free. – Yanjan. Kaf. Jun 04 '24 at 17:31
  • @Yanjan.Kaf. yes, I have Ubuntu Pro, and had to Google it and run the command, instead or just clicking on a menu, the Ubuntu Pro notification menu. – chila Jun 05 '24 at 18:30
  • @Yanjan.Kaf. That's why I'm here. – chila Jun 05 '24 at 18:36
18

Note: Some people have found simply running sudo canonical-livepatch refresh solves the problem. Try that first and then, if the problem persists, follow the steps below.


This forum thread describes the same issue and says the solution is to use a new livepatch token:

  1. disable the livepatch service sudo canonical-livepatch disable

  2. get a new token from https://auth.livepatch.canonical.com/

  3. enable the service with your new token sudo canonical-livepatch enable <your token>

  4. restart livepatch service

    sudo systemctl restart snap.canonical-livepatch.canonical-livepatchd.service
    
zx485
  • 2,894
freddybob
  • 1,438
0

I tried the other methods, but had to remove the lock file for some reason and restart the service.

s=snap.canonical-livepatch.canonical-livepatchd.service; sudo rm /var/snap/canonical-livepatch/common/locks/livepatch_Ubuntu_5_15_0_71_78_generic_95_95.4 && sudo systemctl restart && sudo systemctl status

alchemy
  • 850
-1
  1. head to the Livepatch page and create an account. You can license up to 3 servers for free, so there is no cost unless you plan to mass deploy Livepatch. https://www.ubuntu.com/server/livepatch

  2. Once you've created an account it's as simple as running the following commands:

    sudo snap install canonical-livepatch  
    sudo canonical-livepatch enable $your_token  
    
karel
  • 122,695
  • 134
  • 305
  • 337
  • 1
    Welcome to [ubuntu.se]! According to the question, OP had livepatch set up already but got a problem with it. Your answer is not even trying to solve this problem. – Melebius Jun 18 '19 at 11:34
  • When you register the 4th machine using token from the free account version, the first machine will stop updating which is a plausible explanation of the error encountered. It definitely solved my problem. – Pankaj Nov 22 '21 at 20:22