Bug 474161 - Printers widget broken
Summary: Printers widget broken
Status: RESOLVED FIXED
Alias: None
Product: neon
Classification: KDE Neon
Component: Packages Unstable Edition (other bugs)
Version First Reported In: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Neon Bugs
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-09-04 22:29 UTC by Piotr Mierzwinski
Modified: 2023-09-29 13:25 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
printer in system tray (21.28 KB, image/png)
2023-09-05 23:35 UTC, Piotr Mierzwinski
Details
systray settings (76.17 KB, image/png)
2023-09-06 23:22 UTC, Piotr Mierzwinski
Details
printer in system tray - click result (27.74 KB, image/png)
2023-09-06 23:36 UTC, Piotr Mierzwinski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Mierzwinski 2023-09-04 22:29:01 UTC
SUMMARY
As in subject. Additionally in setting there is "Show when relevant", but this is not relevant - I don't have a printer.

STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT
Printers icon is visible even no printer (installed/connected) in the system

EXPECTED RESULT
Printers icon should be visible only even the printer is installed/connected to the system

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.240.0
Qt Version: 6.6.0 beta2

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2023-09-05 04:47:35 UTC
Can you share a screenshot showing exactly where it is appearing?
Comment 2 Piotr Mierzwinski 2023-09-05 23:35:17 UTC
Created attachment 161436 [details]
printer in system tray
Comment 3 Piotr Mierzwinski 2023-09-05 23:37:20 UTC
Icon appeared after the last system update.
Comment 4 Piotr Mierzwinski 2023-09-05 23:43:33 UTC
$ sudo lpstat -s
[sudo] password for piotr: 
no system default destination
lpstat: No destinations added.
lpstat: No destinations added.
Comment 5 Piotr Mierzwinski 2023-09-05 23:47:13 UTC
$ lpstat -p
lpstat: No destinations added.
$ cat /etc/cups/printers.conf
cat: /etc/cups/printers.conf: No such file or directory
Comment 6 Nate Graham 2023-09-06 17:10:47 UTC
So our code says this:

    Plasmoid.status: {
        if (activeJobsFilterModel.activeCount > 0) {
            return PlasmaCore.Types.ActiveStatus;
        } else if (printersModel.count > 0 || serverUnavailable) {
            return PlasmaCore.Types.PassiveStatus;
        } else {
            return PlasmaCore.Types.HiddenStatus;
        }
    }

Which means it thinks there's at least one active job, and clearly that's wrong for you.

...Either that, or you've got your System Tray set up to make the Printers applet always visible. Can you go check that first?
Comment 7 Piotr Mierzwinski 2023-09-06 23:22:48 UTC
Created attachment 161454 [details]
systray settings
Comment 8 Piotr Mierzwinski 2023-09-06 23:28:56 UTC
(In reply to Nate Graham from comment #6)
> So our code says this:
> 
>     Plasmoid.status: {
>         if (activeJobsFilterModel.activeCount > 0) {
>             return PlasmaCore.Types.ActiveStatus;
>         } else if (printersModel.count > 0 || serverUnavailable) {
>             return PlasmaCore.Types.PassiveStatus;
>         } else {
>             return PlasmaCore.Types.HiddenStatus;
>         }
>     }
> 
> Which means it thinks there's at least one active job, and clearly that's
> wrong for you.
Sorry, but I don't understand. What job do you mean? "activeJobsFilterModel" What does this job?
As I said. Issue started after last update. I don't have and never had any printer and didn't try add any.

> ...Either that, or you've got your System Tray set up to make the Printers
> applet always visible. Can you go check that first?
Sorry,  I said in original post "Additionally in setting there is "Show when relevant", so no I don't have such setting. I had no reason to set it up like this.  Please check another screenshot.
I don't know if this is Neon issue or bug in KDE/Plasma.

$ lpstat -p
lpstat: No destinations added.
$ cat /etc/cups/printers.conf
cat: /etc/cups/printers.conf: No such file or directory
Comment 9 Piotr Mierzwinski 2023-09-06 23:36:06 UTC
Created attachment 161457 [details]
printer in system tray - click result

When I click into printer icon I get error like in attached screenshot
Comment 10 Nate Graham 2023-09-07 02:01:14 UTC
Ahhh it's showing up because it's broken.

This would be a Neon packaging bug; moving there.
Comment 11 Enrico 2023-09-21 21:02:33 UTC
+1 I would like to configure my printer but I get the same error.
The icon is visible (and broken) on the "LiveCD", too.

It returns the error:
file:///usr/share/plasma/plasmoids/org.kde.plasma.printmanager/contents/ui/main.qml:13:1: module "org.kde.plasma.printmanager" is not installed
Comment 12 Scarlett Moore 2023-09-21 22:00:35 UTC
I have checked the packaging. All the qml files are installed.
drwxr-xr-x root/root         0 2023-09-20 01:03 ./usr/lib/x86_64-linux-gnu/qt5/qml/
drwxr-xr-x root/root         0 2023-09-20 01:03 ./usr/lib/x86_64-linux-gnu/qt5/qml/org/
drwxr-xr-x root/root         0 2023-09-20 01:03 ./usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/
drwxr-xr-x root/root         0 2023-09-20 01:03 ./usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/plasma/
drwxr-xr-x root/root         0 2023-09-20 01:03 ./usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/plasma/printmanager/
-rw-r--r-- root/root     47328 2023-09-20 01:03 ./usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/plasma/printmanager/libprintmanager.so
-rw-r--r-- root/root        55 2023-09-20 01:03 ./usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/plasma/printmanager/qmldir

Any other ideas?
Comment 13 Scarlett Moore 2023-09-28 18:19:40 UTC
Alright, so it turns out we got bit by the qt6 transition and plasma was qt6 and print-manager was still qt5. I have now updated this to qt6, but it seems it is broken differently.

file:///usr/share/plasma/plasmoids/org.kde.plasma.printmanager/contents/ui/main.qml:56:34: Type FullRepresentation unavailable

file:///usr/share/plasma/plasmoids/org.kde.plasma.printmanager/contents/ui/FullRepresentation.qml:10:1: module "QtQuick.Controls" version 1.3 is not installed

I have no idea what the first one means at all and I have qml6-module-qtquick-controls installed. Any qml experts around that can help a gal out so I can get this fixed.
Comment 14 Nicolas Fella 2023-09-29 11:49:37 UTC
it looks like you are packaging master instead of the kf6 branch
Comment 15 Scarlett Moore 2023-09-29 13:25:24 UTC
Yes I am, neon unstable -> master. 
I have enabled an experimental build of the kf6 branch
which can be enabled with
sudo apt install neon-settings-experimental
sudo apt update
sudo apt dist-upgrade

I have added the new dependencies and it appears to be functioning.