Kubuntu: how to fix pixellated app icons in Discover

Do your app icons in Discover look ugly and pixellated? If so, you’re probably a Kubuntu user. Every user of a recent Kubuntu version unfortunately sees horrid low-resolution icons in Discover. It’s very unpleasant.

Today I helped drive an investigation and resolution for this issue. Here’s the good news: it’ll be fixed in the upcoming Kubuntu 18.04, and you can fix it for yourself, today! Here’s how.

  • Run the following terminal commands:
    sudo sed -i "s/hidpi/large/" /etc/apt/apt.conf.d/60plasma-discover
    sudo apt update
    sudo appstreamcli refresh-cache --force
  • Restart Discover, if it’s running

Ta-daa! Pretty, high-resolution icons:

This turned out to be a bug in how Discover was packaged in Debian. Ubuntu was re-using the Debian Appstream configuration packaging, and that packaging was erroneously downloading HiDPi versions of small icons instead of large icons. This illustrates an eternal principle in software: the price of 3rd-party and upstream dependencies is eternal communication. When every layer of software is built on top of another layer provided by someone else, communication is mandatory; when the people responsible for each layer don’t talk to one another regularly, bugs creep in. Once all parties were talking to one another in the same (virtual) room, a fix materialized literally within minutes.

Thankfully, this bug has been squashed, and Kubuntu users will once again see pretty app icons.

If my efforts seem useful and you’d like to see more of them, consider becoming a patron on Patreon, LiberaPay, or PayPal.

29 thoughts on “Kubuntu: how to fix pixellated app icons in Discover

    1. Please note, I also get a ‘cgcicon invalid backend themes’ pop up when I open Discover. This was happening before I ran your fix here though – I think. Perhaps after installing flatpaks.
      I re-installed Discover via Synaptic and ran the above fix again. Icons are still pixillated.

      Like

  1. In Kubuntu 16.04

    anarcho@kubuntu:~$ sudo sed s/hidpi/large/ /etc/apt/apt.conf.d/60plasma-discover
    [sudo] password for anarcho:
    sed: can’t read /etc/apt/apt.conf.d/60plasma-discover: No such file or directory

    Like

    1. Hmm, maybe the file wasn’t there in Kubuntu 16.04. What output does this command produce?

      grep -ri “:DEP-11-icons-” /etc/apt/apt.conf.d/

      Like

    2. anarcho@kubuntu:~$ grep -ri “:DEP-11-icons-” /etc/apt/apt.conf.d/
      anarcho@kubuntu:~$ sudo sed -i “s/hidpi/large/” /etc/apt/apt.conf.d/60plasma-discover
      [sudo] password for anarcho:
      sed: can’t read /etc/apt/apt.conf.d/60plasma-discover: No such file or directory
      anarcho@kubuntu:~$

      Like

    3. Sounds like you need to upgrade Kubuntu to 18.04. But once you do that, you won’t need to apply this workaround, since it’s fixed there. 🙂

      Liked by 1 person

    4. So Nate – the notifications for upgrading to 18.04 are supposed to be out -yes? I am on a Dell OEM Ubuntu 16.04 (with Kubuntu backports) – so would that stop me getting the notification or ability to upgrade, do you know???
      No biggy – like I said, I plan to put in a bigger drive and fresh install anyway!

      Liked by 1 person

    5. Ubuntu is not Kubuntu; you wouldn’t get a notification on Ubuntu 16.04 to upgrade to Kubuntu 18.04. And installing the Kubuntu backports PPA on top of regular Ubuntu seems to me like a sure recipe for breakage and undefined behavior. Since you’re using kind of a franken-setup right now, I would strongly recommend doing a clean install of Kubuntu 18.04.

      Liked by 1 person

  2. This didn’t work for me. The command `sudo sed s/hidpi/large/ /etc/apt/apt.conf.d/60plasma-discover` just puts the edited file contents on stdout instead of changing the file. So I edited the file manually followed by `sudo appstreamcli refresh-cache –force` but discover still shows pixelated icons. I am using kubuntu-backports ppa and the 60plasma-discover file looks like this:

    ## This file is provided by KDE Discover to enable the download of
    ## small-size icons as well as bigger high-res application icons by default.
    ##
    ## The small (64x64px) icons are required for Discover to work, while the
    ## HiDPI icons are required for it to look good.

    Acquire::IndexTargets {
    deb::DEP-11-icons {
    DefaultEnabled “true”;
    };
    };

    Acquire::IndexTargets {
    deb::DEP-11-icons-large {
    DefaultEnabled “true”;
    };
    };

    Like

  3. Doesn’t seem to have fixed it here as the icons still look low resolution and I’m getting this if run from Konsole:
    invalid kns backend! “/etc/xdg/servicemenu.knsrc” because: “Config group not found! Check your KNS3 installation.”
    invalid kns backend! “/etc/xdg/ksysguard.knsrc” because: “Config group not found! Check your KNS3 installation.”
    Discarding invalid backend “servicemenu.knsrc”
    Discarding invalid backend “ksysguard.knsrc”
    could not find “org.kde.kdenlive.desktop” “”
    could not find “org.kde.development” “”
    could not find “org.kde.kdenlive.desktop” “”
    could not find “org.kde.development” “”
    org.kde.knewstuff.core: “Error transferring https://kdenlive.org/data/mltprofilesources.xml – server replied: Not Found”
    kns error “/etc/xdg/kdenlive_projectprofiles.knsrc” “Loading of providers from file: https://kdenlive.org/data/mltprofilesources.xml failed”
    could not find “org.kde.kdenlive.desktop” “”
    could not find “org.kde.development” “”
    org.kde.knewstuff.core: Could not find category “KAddressbook Theme”
    invalid kns backend! “/etc/xdg/kaddressbook_themes.knsrc” because: “All categories are missing”
    Discarding invalid backend “kaddressbook_themes.knsrc”
    qrc:/qml/DiscoverDrawer.qml:145: TypeError: Cannot read property ‘name’ of null
    kns error “/etc/xdg/kaddressbook_themes.knsrc” “Invalid Kaddressbook_themes backend, contact your distributor.”
    org.kde.knewstuff.core: Could not find category “Calligra Flow Stencil”
    invalid kns backend! “/etc/xdg/calligra_stencils.knsrc” because: “All categories are missing”
    Discarding invalid backend “calligra_stencils.knsrc”
    qrc:/qml/DiscoverDrawer.qml:145: TypeError: Cannot read property ‘name’ of null
    qrc:/qml/DiscoverDrawer.qml:145: TypeError: Cannot read property ‘name’ of null
    kns error “/etc/xdg/calligra_stencils.knsrc” “Invalid Calligra_stencils backend, contact your distributor.”
    org.kde.knewstuff.core: Could not find category “Xfce Icon Theme”
    invalid kns backend! “/etc/xdg/cgcicon.knsrc” because: “All categories are missing”
    Discarding invalid backend “cgcicon.knsrc”
    qrc:/qml/DiscoverDrawer.qml:145: TypeError: Cannot read property ‘name’ of null
    qrc:/qml/DiscoverDrawer.qml:145: TypeError: Cannot read property ‘name’ of null
    qrc:/qml/DiscoverDrawer.qml:145: TypeError: Cannot read property ‘name’ of null
    kns error “/etc/xdg/cgcicon.knsrc” “Invalid Icon Themes backend, contact your distributor.”

    Like

    1. I was getting the kns error messages as pop-ups at the bottom of Discover’s window, but they were disappearing so quickly which is why I tried from the terminal.

      Like

Leave a comment