https://bugzilla.novell.com/show_bug.cgi?id=481794 User jsmeix@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=481794#c6 Johannes Meixner <jsmeix@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |seife@novell.com --- Comment #6 from Johannes Meixner <jsmeix@novell.com> 2009-03-25 04:33:20 MST --- Meanwhile I learned that we already have a way to notify CUPS in case of power/suspend events. This is provided by the pm-utils package in particular the scripts in /usr/lib/pm-utils/sleep.d/ which are called in alpabetical ordering during suspend with a parameter "hibernate" or "suspend" and in reverse alpabetical ordering during resume with a parameter "thaw" or "resume" see /usr/lib/pm-utils/sleep.d/06autofs for a simple example and have a look at the documentation in /usr/share/doc/packages/pm-utils/README Ulrich, please test if the following works: 1. cp -p /usr/lib/pm-utils/sleep.d/06autofs /usr/lib/pm-utils/sleep.d/07cupsd 2. Modify /usr/lib/pm-utils/sleep.d/07cupsd so that its content is ----------------------------------------------------------------------- #!/bin/bash /usr/lib/pm-utils/functions case "$1" in hibernate|suspend) stopservice cups sleep 3 ;; thaw|resume) restartservice cups ;; *) ;; esac exit $? ----------------------------------------------------------------------- Note the unconditional simple "sleep 3" so that the cupsd gets at least three seconds to terminate active print jobs. Of course such an unconditional sleep delays the seuspend in any case but here it is only for a simple first test to find out if the general idea works at all. 3. Try out what happens for an active print job when you do suspend and resume. Background information: In general it is not possible to resume an active print job for a network printer correctly because after the suspend the established TCP network connection to the network printer will get somehow lost (the connection is not actively and correctly terminated during suspend) so that the network printer will after some time do whatever is implemented in the network printer when suddenly there is no longer any communication possible via the TCP connection. Usually the network printer will after some time abort the printout (usually somewhere in the middle of a page) and fall back into its initial "reset/ready" state where it waits to accept a new arriving print job. Therefore the only generally working solution is to also stop the active print job during suspend which is done above simply via a full "stopservice cups". It would not work in general to only cancel a currently active job because there could be a subsequent job which becomes immediately active after the first one was cancelled. Accordingly during resume a full "restartservice cups" is needed which would re-print all jobs which were stopped during "stopservice cups" from the beginning which is the only generally working solution because the printers should be usually meanwhile in a "reset/ready" state where only jobs from the beginning print out correctly. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.