[arch-general] Unload module after printer startup
Hi list I've a hp 1020 printer. In order to work, the module usblp must not be loaded. So, i remove that from DAEMONS section at /etc/rc.conf When i boot Arch, that works fine. The module is not loaded, and the printer works. But when i turn off, and then turn on the printer, the usblp module is loaded, and the printer doesn't print. How can i prevent this loading ? I guess it's a udev rule, but i don't know how to configure it. Please, anybody can give a hand on this ? Thanks !
On 08/03/2010 11:12 AM, Mario Daniel Carugno wrote:
Hi list
I've a hp 1020 printer. In order to work, the module usblp must not be loaded. So, i remove that from DAEMONS section at /etc/rc.conf When i boot Arch, that works fine. The module is not loaded, and the printer works. But when i turn off, and then turn on the printer, the usblp module is loaded, and the printer doesn't print. How can i prevent this loading ? I guess it's a udev rule, but i don't know how to configure it. Please, anybody can give a hand on this ? Thanks !
Check the wiki on how to blacklist the IPv6 module and try something similar for usblp, however I don't know if that will do what you want. Right now I can't remember anything else. -- Mauro Santos
On Tue, Aug 03, 2010 at 12:25:48PM +0100, Mauro Santos wrote:
On 08/03/2010 11:12 AM, Mario Daniel Carugno wrote:
Hi list
I've a hp 1020 printer. In order to work, the module usblp must not be loaded. So, i remove that from DAEMONS section at /etc/rc.conf When i boot Arch, that works fine. The module is not loaded, and the printer works. But when i turn off, and then turn on the printer, the usblp module is loaded, and the printer doesn't print. How can i prevent this loading ? I guess it's a udev rule, but i don't know how to configure it. Please, anybody can give a hand on this ? Thanks !
MODULES=(... !usblp ....) --
Thanks for the help I don't use backlist because in the wiki says so. In http://wiki.archlinux.org/index.php/CUPS_printer-specific_problems#LaserJet_... i can read: "Ensure that the usblp module is not blacklisted in the MODULES array of /etc/rc.conf" Just in case, I'll try it anyway. Thanks 2010/8/3 vlad <vla@uni-bonn.de>:
On Tue, Aug 03, 2010 at 12:25:48PM +0100, Mauro Santos wrote:
On 08/03/2010 11:12 AM, Mario Daniel Carugno wrote:
Hi list
I've a hp 1020 printer. In order to work, the module usblp must not be loaded. So, i remove that from DAEMONS section at /etc/rc.conf When i boot Arch, that works fine. The module is not loaded, and the printer works. But when i turn off, and then turn on the printer, the usblp module is loaded, and the printer doesn't print. How can i prevent this loading ? I guess it's a udev rule, but i don't know how to configure it. Please, anybody can give a hand on this ? Thanks !
MODULES=(... !usblp ....) --
Hello, On Tue, Aug 03, 2010 at 09:52:05AM -0300, Mario Daniel Carugno wrote:
Thanks for the help I don't use backlist because in the wiki says so.
In http://wiki.archlinux.org/index.php/CUPS_printer-specific_problems#LaserJet_... i can read:
"Ensure that the usblp module is not blacklisted in the MODULES array of /etc/rc.conf"
Just in case, I'll try it anyway. Thanks
There's clearly described what you have to do. " ... Ensure that the CUPS daemon is running and added to the /etc/rc.conf file: # /etc/rc.d/cups start File: /etc/rc.conf DAEMONS=(... cups crond ...) Now plug in the USB printer and turn it on. The printer will whirl, pause, then whirl once more as the firmware is uploaded. Now remove the usblp module: # rmmod usblp Note: The usblp module must be removed after the firmware is loaded to the printer, and before any printing job is submitted. " As I understand it there is no way to automatize this. --
Yes, that's all i do to configure the printer. Now I want to automatize the removal of the module after i turn on the printer. If there's a rule that loads the module when the printer is turned on, I guess there must be a way to catch that rule to disable the module loading. 2010/8/3 vlad <vla@uni-bonn.de>:
Hello, On Tue, Aug 03, 2010 at 09:52:05AM -0300, Mario Daniel Carugno wrote:
Thanks for the help I don't use backlist because in the wiki says so.
In http://wiki.archlinux.org/index.php/CUPS_printer-specific_problems#LaserJet_... i can read:
"Ensure that the usblp module is not blacklisted in the MODULES array of /etc/rc.conf"
Just in case, I'll try it anyway. Thanks
There's clearly described what you have to do. " ... Ensure that the CUPS daemon is running and added to the /etc/rc.conf file: # /etc/rc.d/cups start File: /etc/rc.conf DAEMONS=(... cups crond ...)
Now plug in the USB printer and turn it on. The printer will whirl, pause, then whirl once more as the firmware is uploaded. Now remove the usblp module: # rmmod usblp Note: The usblp module must be removed after the firmware is loaded to the printer, and before any printing job is submitted. " As I understand it there is no way to automatize this. --
On 03.08.2010 15:47, Mario Daniel Carugno wrote:
Yes, that's all i do to configure the printer. Now I want to automatize the removal of the module after i turn on the printer. If there's a rule that loads the module when the printer is turned on, I guess there must be a way to catch that rule to disable the module loading. Use MODULES=(... !usblp ....) in /etc/rc.conf (already mentioned by vlad). This prevents the module from being loaded.
Wieland
On 08/03/2010 02:47 PM, Mario Daniel Carugno wrote:
Yes, that's all i do to configure the printer. Now I want to automatize the removal of the module after i turn on the printer. If there's a rule that loads the module when the printer is turned on, I guess there must be a way to catch that rule to disable the module loading.
2010/8/3 vlad <vla@uni-bonn.de>:
Hello, On Tue, Aug 03, 2010 at 09:52:05AM -0300, Mario Daniel Carugno wrote:
Thanks for the help I don't use backlist because in the wiki says so.
In http://wiki.archlinux.org/index.php/CUPS_printer-specific_problems#LaserJet_... i can read:
"Ensure that the usblp module is not blacklisted in the MODULES array of /etc/rc.conf"
Just in case, I'll try it anyway. Thanks
There's clearly described what you have to do. " ... Ensure that the CUPS daemon is running and added to the /etc/rc.conf file: # /etc/rc.d/cups start File: /etc/rc.conf DAEMONS=(... cups crond ...)
Now plug in the USB printer and turn it on. The printer will whirl, pause, then whirl once more as the firmware is uploaded. Now remove the usblp module: # rmmod usblp Note: The usblp module must be removed after the firmware is loaded to the printer, and before any printing job is submitted. " As I understand it there is no way to automatize this. --
Ok I see your problem, you could try to do what someone suggests in the thread referenced in the wiki: "You would have to guarantee the sequence load usblp/call hplj1000 script/unload usblp. IMHO to avoid race conditions, it would be better to incorporate load/unload usblp into the hplj1000 script itself: load usblp before the script looks for an lp* device, and unload usblp after the firmware has been successfully copied." If that proves to work then let the packager know about the workaround and maybe submit a patch. One last thing, try not to top post, it makes reading the thread harder. -- Mauro Santos
On Tue, Aug 03, 2010 at 07:12:40AM -0300, Mario Daniel Carugno wrote:
I've a hp 1020 printer. In order to work, the module usblp must not be loaded. So, i remove that from DAEMONS section at /etc/rc.conf When i boot Arch, that works fine. The module is not loaded, and the printer works. But when i turn off, and then turn on the printer, the usblp module is loaded, and the printer doesn't print. How can i prevent this loading ? I guess it's a udev rule, but i don't know how to configure it. Please, anybody can give a hand on this ?
I can't give you the details but it shoul be possible. You'll have to do some reading on writing udev rules, there are resources on the web about that. AFAIK you can run arbitrary scripts from udev. Find the udev rule that loads the modules when the printer is switched on, and modify it so it calls a script (probably in the background) that loads the module (modprobe), waits for some seconds (sleep) and the removes the module (rmmod). Ciao, -- FA There are three of them, and Alleline.
participants (5)
-
fons@kokkinizita.net
-
Mario Daniel Carugno
-
Mauro Santos
-
vlad
-
Wieland Hoffmann