The status of cups still shows idle when the printer has been unplugged

Bug #1893300 reported by hugh chao
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OEM Priority Project
Status tracked in Focal
Focal
Fix Released
Undecided
Unassigned
system-config-printer (Ubuntu)
Fix Released
High
Till Kamppeter
Focal
Fix Released
High
Unassigned
Groovy
Fix Released
High
Unassigned

Bug Description

[ Impact ]
After printers (non-ippusb protocal) have been disconnected, the status of cups still shows "idle" instead of "disabled", so seems the disconnected procedure hasn't worked well.

[ Test Case ]
1. Connect the printer (non-ippusb protocal)(which isn't 070104) with any 20.04 machine
2. Wait for the status of cups became "Idle" (lpstat -p)
3. Unplug the cable of the printer
4. Check the status of cups again. (lpstat -p)

[ Regression potential ]
Very Low, if something went wrong in the change, then this issue happened again, due to this snippet will only be called during printer removed event.

[Expected result]
The status should show disabled.

[Actual result]
The status shows idle.

[info]
Target:
HP LaserJet Pro203dw
HP Officejet 100 Mobile Printer
HP Officeject 200 Mobile Printer
Brother HL-2250DN
Samsung ML-331x

Upstream Bug: https://github.com/OpenPrinting/system-config-printer/issues/182

PPA: https://launchpad.net/~hugh712/+archive/ubuntu/sru-1893300

hugh chao (hugh712)
Changed in oem-priority:
assignee: nobody → hugh chao (hugh712)
importance: Undecided → Critical
status: New → Confirmed
tags: added: laramie oem-priority originate-from-1892987
information type: Proprietary → Public
hugh chao (hugh712)
description: updated
hugh chao (hugh712)
description: updated
Revision history for this message
hugh chao (hugh712) wrote :

currently the syspath for udev-configure-printer is too specific level as:

/devices/pci0000:00/0000:00:14.0/usb1/1-5

But current path can be as below for removing

/devices/pci0000:00/0000:00:14.0/usb1/1-5:1.0
or
/devices/pci0000:00/0000:00:14.0/usb1/1-5:1.0/usbmisc/lp0

so the printer can't be removed, I think the problem is this program - udev-configure-printer, so let me tried to make it more flexible...

hugh chao (hugh712)
description: updated
description: updated
hugh chao (hugh712)
Changed in oem-priority:
status: Confirmed → In Progress
Revision history for this message
hugh chao (hugh712) wrote :

The idea is :
1. check if the path provided by map is a subset of removing device path
eg. /devices/pci0000:00/0000:00:14.0/usb1/1-5 is a subset of /devices/pci0000:00/0000:00:14.0/usb1/1-5:1.0

2. check if the exist of this device
eg. stat /sys/devices/pci0000:00/0000:00:14.0/usb1/1-5

3. if this device is not exist, then remove..

hugh chao (hugh712)
description: updated
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Hugh Chao,

is your commit

https://github.com/hugh712/system-config-printer/commit/c437483c0a

a solution for this problem? If so, could you post a Pull Request on

https://github.com/OpenPrinting/system-config-printer/

mentioning that it solves Issue #182

This should make it easier for the upstream maintainer to review and include your fix.

Revision history for this message
hugh chao (hugh712) wrote :
hugh chao (hugh712)
description: updated
Changed in system-config-printer (Ubuntu):
assignee: nobody → Till Kamppeter (till-kamppeter)
importance: Undecided → High
hugh chao (hugh712)
description: updated
Revision history for this message
hugh chao (hugh712) wrote :

Here is the package diff for groovy

Revision history for this message
hugh chao (hugh712) wrote :

And this is the package diff for focal

hugh chao (hugh712)
tags: added: verification-needed
hugh chao (hugh712)
Changed in oem-priority:
status: In Progress → Triaged
tags: added: rls-ff-incoming
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Uploaded fixed package to Hirsute (1.5.12-0ubuntu4).

Changed in system-config-printer (Ubuntu):
status: New → Fix Released
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Uploaded fixed packages for focal and groovy, correcting version numbers and message in debian/changelog.

Hugh, thanks for the debdiffs.

Changed in system-config-printer (Ubuntu Focal):
importance: Undecided → High
Changed in system-config-printer (Ubuntu Groovy):
importance: Undecided → High
Changed in system-config-printer (Ubuntu Focal):
status: New → Fix Committed
Changed in system-config-printer (Ubuntu Groovy):
status: New → Fix Committed
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

hm, I would appreciate a bit more information in the Regression Potential section. In this section we need some analysis on where to look for regressions after this lands into the archive. This should be an exercise, thinking: "hmmm, if we change these parts of the code, what could go wrong? Where should we expect regressions, new bugs?"

Changed in system-config-printer (Ubuntu Groovy):
status: Fix Committed → Incomplete
Changed in system-config-printer (Ubuntu Focal):
status: Fix Committed → Incomplete
Revision history for this message
hugh chao (hugh712) wrote :

@Łukasz,

updated, please help to review again, thanks.

description: updated
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello hugh, or anyone else affected,

Accepted system-config-printer into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/system-config-printer/1.5.12-0ubuntu3.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in system-config-printer (Ubuntu Groovy):
status: Incomplete → Fix Committed
tags: added: verification-needed-groovy
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello hugh, or anyone else affected,

Accepted system-config-printer into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/system-config-printer/1.5.12-0ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in system-config-printer (Ubuntu Focal):
status: Incomplete → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
hugh chao (hugh712) wrote :

verified the version 1.5.12-0ubuntu3.1 in groovy-proposed, works well and didn't observe any potential regression.

Revision history for this message
hugh chao (hugh712) wrote :

verified the version 1.5.12-0ubuntu1.1 in focal-proposed, works well and didn't observe any potential regression.

tags: added: verification-done-focal verification-done-groovy
removed: verification-needed-focal verification-needed-groovy
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package system-config-printer - 1.5.12-0ubuntu3.1

---------------
system-config-printer (1.5.12-0ubuntu3.1) groovy; urgency=medium

  * Fix USB printers not getting disabled when unplugged (LP: #1893300,
    Upstream issue #182).
     - Update the udev rule due to usb_id udev import is disabled in some
       systems.
     - Make the matching rule of printer device path more flexible.

 -- hugh chao <email address hidden> Tue, 03 Nov 2020 15:31:05 +0800

Changed in system-config-printer (Ubuntu Groovy):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for system-config-printer has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package system-config-printer - 1.5.12-0ubuntu1.1

---------------
system-config-printer (1.5.12-0ubuntu1.1) focal; urgency=medium

  * Fix USB printers not getting disabled when unplugged (LP: #1893300,
    Upstream issue #182).
     - Update the udev rule due to usb_id udev import is disabled in some
       systems.
     - Make the matching rule of printer device path more flexible.

 -- hugh chao <email address hidden> Tue, 03 Nov 2020 15:31:05 +0800

Changed in system-config-printer (Ubuntu Focal):
status: Fix Committed → Fix Released
hugh chao (hugh712)
Changed in oem-priority:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.