LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   USB printer issues in slackware 14.1 (http://www.linuxquestions.org/questions/slackware-14/usb-printer-issues-in-slackware-14-1-a-4175490109/)

bobjusto 01-04-2014 05:59 AM

USB printer issues in slackware 14.1
 
Hi all,

since slack 14.1 all my USB printer don't work until i load "by the hand" the usblp module (modprobe usblp)
so far in 14.0 it worked!

I have profread all my rules in /lib/udev/rules.d, /etc/udev/rules.d
and i found this :
  • in 14.0 and 14.1 the rules are the same !
  • the usblp' module is loaded on printer' power up by the rule :
    DRIVER!="?*", ENV{MODALIAS}=="?*", IMPORT{builtin}="kmod load $env{MODALIAS}"
    (but don't work in 14.1)
    this rules is in /lib/udev/rules.d/80-drivers.rules (package udev-182-x86_64-7)
  • if i put in /etc/udev/rules.d a rule like that :

    DRIVER!="?*", ENV{MODALIAS}=="?*",RUN+="/sbin/modprobe usblp"

    it works , but it is awful (the usblp'module will be loading with all device ?)

I would appreciate any help.

Didier Spaier 01-04-2014 12:58 PM

Hi bobjusto and welcome on LQ.

Uncomment (remove the #) following line in /etc/rc.d/rc.modules
Code:

#/sbin/modprobe usblp

bobjusto 01-04-2014 02:42 PM

yes i know that , but it's ugly , the usblp is always loaded ,even if all printers are powered off,

i want to load it only when it is powered on by using a rule ( as in former slackware)

Didier Spaier 01-04-2014 03:20 PM

In any case once loaded (either applying an udev rule or otherwise), the kernel module will stay in memory even if you unplug the printer or power it off, as AFAIK there's no udev rule to unload it, so IMHO that doesn't make a big change...

bobjusto 01-04-2014 03:45 PM

by the way that don't solve the issue ! why on the earth this rule don't work anymore in 14.1 ?

ReaperX7 01-04-2014 04:20 PM

Ask Kay Sievers the maintainer of udev. He might know why rules get all borked with udev and it acts retarded from time to time. Then again, that's just udev.

Udev handles all hotplugging anymore so the driver will stay in the memory while cups and udev handle the device management protocols. It's either that or you learn the inner workings of kmod to load and unload drivers by hand.

Didier Spaier 01-04-2014 04:36 PM

I think that your assumption "/lib/udev/rules.d/80-drivers.rules is the same, so we should see the same behavior" is wrong. Here is a diff of /lib/udev/rules.d/70-printers.rules beetween 14.0 (on the left) and 14.1 (on the right):
Code:

2,5c2
< ACTION=="add", SUBSYSTEM=="usb", ATTR{bInterfaceClass}=="07", ATTR{bInterfaceSubClass}=="01", TAG+="udev-configure-printer", RUN+="udev-configure-printer add %p"
< # usblp device add trigger (needed when usblp is already loaded)
< ACTION=="add", KERNEL=="lp*", TAG+="udev-configure-printer", RUN+="udev-configure-printer add %p"
<
---
> ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", TAG+="systemd", ENV{SYSTEMD_WANTS}="configure-printer@usb-$env{BUSNUM}-$env{DEVNUM}.service"

I am not very good at deciphering udev rules, but this could make a plausible culprit ;)

mancha 01-04-2014 06:00 PM

@bobjusto:

Even though Pat added my patch to cups that addresses outstanding conflicts some printers have with usblp, he chose a conservative approach and also blacklisted "usblp" in Slackware 14.1.

You can disable the blacklisting by removing /lib/modprobe.d/cups-blacklist-usblp.conf.

--mancha

bobjusto 01-04-2014 06:19 PM

Quote:

Originally Posted by Didier Spaier (Post 5091966)
I think that your assumption "/lib/udev/rules.d/80-drivers.rules is the same, so we should see the same behavior" is wrong. Here is a diff of /lib/udev/rules.d/70-printers.rules beetween 14.0 (on the left) and 14.1 (on the right):
Code:

2,5c2
< ACTION=="add", SUBSYSTEM=="usb", ATTR{bInterfaceClass}=="07", ATTR{bInterfaceSubClass}=="01", TAG+="udev-configure-printer", RUN+="udev-configure-printer add %p"
< # usblp device add trigger (needed when usblp is already loaded)
< ACTION=="add", KERNEL=="lp*", TAG+="udev-configure-printer", RUN+="udev-configure-printer add %p"
<
---
> ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", TAG+="systemd", ENV{SYSTEMD_WANTS}="configure-printer@usb-$env{BUSNUM}-$env{DEVNUM}.service"

I am not very good at deciphering udev rules, but this could make a plausible culprit ;)

it was the first thing i had made : putting the 70-printerxxx of the 14.0 in /etc/udev/rules.d , didn't work by he hell!

bobjusto 01-04-2014 06:28 PM

Quote:

Originally Posted by mancha (Post 5091981)
@bobjusto:

Even though Pat added my patch to cups that addresses outstanding conflicts some printers have with usblp, he chose a conservative approach and also blacklisted "usblp" in Slackware 14.1.

You can disable the blacklisting by removing /lib/modprobe.d/cups-blacklist-usblp.conf.

--mancha

Thank you very much indeed , mancha, removing this file fixed this !

actually i didn't watch at the blacklisted modules in /lib/modprobe.d but in /etc/modprobe.d as in the old time!

now i will try to put an empty cups-blacklist-usblp.conf in /etc/modprobe.d to override the one in /lib/modprobe.d !


All times are GMT -5. The time now is 01:07 PM.