LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-22-2013, 09:27 AM   #1
burdi01
Member
 
Registered: Dec 2010
Location: The Netherlands
Distribution: Slackware Current64, PartedMagic, Xubuntu
Posts: 465

Rep: Reputation: 114Reputation: 114
Current: udev problem with hplip-3.13.5/1


Current: Since the May 20 upgrade of hplip from 3.13.3/2 to 3.13.5/1 I experience a longish hiccup at system boot, after which the following text is displayed on the console:
Quote:
udevd[218]: timeout: killing '/bin/sh -c 'if [ -f /usr/bin/systemctl ]; then /usr/bin/systemctl --no-blank start hplip-printer@004:005.service; else /usr/bin/hp-config-usb-printer 004:005; fi'' [421]
udevd[218]: '/bin/sh -c 'if [ -f /usr/bin/systemctl ]; then /usr/bin/systemctl --no-blank start hplip-printer@004:005.service; else /usr/bin/hp-config-usb-printer 004:005; fi'' [421] terminated by signal 9 (Killed)
This command comes from /lib/udev/rules.d/56-hpmud.rules; commenting out the pertinent line therein eliminates the hiccup, while printing and scanning are not affected.
 
Old 05-22-2013, 09:35 AM   #2
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,504

Rep: Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461
systemctl... sigh.
 
Old 05-22-2013, 11:22 AM   #3
burdi01
Member
 
Registered: Dec 2010
Location: The Netherlands
Distribution: Slackware Current64, PartedMagic, Xubuntu
Posts: 465

Original Poster
Rep: Reputation: 114Reputation: 114
I have no /usr/bin/systemctl, but for sure I have a /usr/bin/hp-config_usb_printer -> ../share/hplip/config_usb_printer.py*
 
Old 05-22-2013, 11:59 AM   #4
zakame
Member
 
Registered: Apr 2012
Location: Philippines
Distribution: Debian, Ubuntu, Slackware
Posts: 295

Rep: Reputation: 181Reputation: 181
Yech. Seems like the (n)ew package also snuck in a systemd service file as well:

Code:
zakame@jazz:~% grep systemd /var/log/packages/hplip-3.13.5-x86_64-1 
usr/lib/systemd/
usr/lib/systemd/system/
usr/lib/systemd/system/hplip-printer@.service
 
Old 05-22-2013, 08:43 PM   #5
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Check the source's makefile with "make --configure" to see if the package for systemd can be disabled on build with a switch, like --disable-systemd.
 
Old 05-22-2013, 10:28 PM   #6
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,504

Rep: Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461
I think the problem really isn't directly to do with systemd, although changes made to support systemd may have brought it about. When exactly does this "hiccup" occur? Is it possibly during the initrd execution? If that's the case the fix will be blacklisting that rule from being copied to an initrd.

A good test to see if this is the case would be to leave the rule on the main system, but delete it from under /boot/initrd-tree, and then use mkinitrd (with no options) to rebuild the initrd without the rule. Reinstall lilo, reboot, and if it doesn't happen we know what the deal was.
 
Old 05-23-2013, 02:18 AM   #7
zakame
Member
 
Registered: Apr 2012
Location: Philippines
Distribution: Debian, Ubuntu, Slackware
Posts: 295

Rep: Reputation: 181Reputation: 181
I'm wondering where /etc/udev/rules.d/56-hpmud.rules came from. My hplip on 14.0 installed /etc/udev/rules.d/86-hpmud-hp_laserjet_*.rules files (as I'm using an old P1505n here at $WORK,) so I suspect the proprietary stuff that one downloads upon installing the printerr may be the culprit.
 
Old 05-23-2013, 07:15 AM   #8
burdi01
Member
 
Registered: Dec 2010
Location: The Netherlands
Distribution: Slackware Current64, PartedMagic, Xubuntu
Posts: 465

Original Poster
Rep: Reputation: 114Reputation: 114
The hiccup occurs on the main system, not in the initrd.

Actually this specific rule would make no sense in an initrd - not only is there no /usr/bin/systemctl but there is no /usr/bin/hp-config_usb_printer as well.

Things bring me to the more fundamental observation that udev does not seem to run at all in the initrd. I have an "all modules" kernel and if I do not specify the block and filesystem drivers via "mkinitrd -c -m ahci:ata_piix:ext3 -k 3.9.2-burdi64" booting will fail.
 
Old 05-23-2013, 08:07 AM   #9
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,176

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by burdi01 View Post
...

Things bring me to the more fundamental observation that udev does not seem to run at all in the initrd. I have an "all modules" kernel and if I do not specify the block and filesystem drivers via "mkinitrd -c -m ahci:ata_piix:ext3 -k 3.9.2-burdi64" booting will fail.
Of course the modules cannot be loaded when they are not there. The "/lib/modules/" directory on the main system is not available before the main system is mounted.

Udev is run indeed. You can open "/boot/initrd-tree/init" with a text editor and see.
 
Old 05-23-2013, 10:57 AM   #10
burdi01
Member
 
Registered: Dec 2010
Location: The Netherlands
Distribution: Slackware Current64, PartedMagic, Xubuntu
Posts: 465

Original Poster
Rep: Reputation: 114Reputation: 114
As a longtime Slacker using an initrd I opened "/boot/initrd-tree/init" with a text editor to see many, many times. Of course udevd is run, but in my opinion it does not do anything:
-- setting /etc/udev/udev.conf > udev_log="debug" shows output
-- in /init commenting out the /load_kernel_modules invocation makes booting fail
-- in /init commenting out the udevd invocation instead makes booting successful.

In other words: (At least in my use case) including udev in the initrd is superfluous.

Last edited by burdi01; 05-23-2013 at 10:59 AM.
 
Old 05-28-2013, 04:46 AM   #11
burdi01
Member
 
Registered: Dec 2010
Location: The Netherlands
Distribution: Slackware Current64, PartedMagic, Xubuntu
Posts: 465

Original Poster
Rep: Reputation: 114Reputation: 114
To recap: This thread has two subthreads:
a. The hiccup at boot;
b. Udev in the initrd.

Ad a:
I am still running with the pertinent line in /lib/udev/rules.d/56-hpmud.rules commented out. I have not seen any effects on printing and/or scanning.

Ad b:
To me it seems that udev in the initrd does run, but does not do anything. At least in my use case this has no consequences.


Last edited by burdi01; 06-01-2013 at 04:55 AM. Reason: Corrected typo.
 
Old 05-31-2013, 10:18 AM   #12
timkb4cq
LQ Newbie
 
Registered: Jan 2006
Posts: 17

Rep: Reputation: 0
I just got finished troubleshooting this for a package for MEPIS 12 (now in beta).
If your system was using systemd instead of some version of sysvinit, the hplip udev rule wouldn't block udev on startup causing the delay. The second branch launching hp-config_usb_printer does block. It sits in a 12x loop with a wait(5) in each trying to delete extraneous printer queues, so it blocks udev for 1:05

If your printer doesn't use a plugin, commenting out the line works fine. If your HP does use a plugin you may need hp-config_usb_printer to run.

I solved the issue by detaching hp-config_usb_printer from udev by starting it with nohup like so:
Code:
# This rule will add the printer and install plugin
ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'logger -p user.info loading HP Device $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c 'if [ -f /usr/bin/systemctl ]; then /usr/bin/systemctl --no-block start hplip-printer@$env{BUSNUM}:$env{DEVNUM}.service; else /usr/bin/nohup /usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM} 2>/var/log/hp/hplip_config_usb_printer.err &; fi'"
Redirecting the error messages with the 2> was necessary to keep it from blocking even though none are produced...

There's also a typo in line 260 of hplip3.13.5/config_usb_printer.py where they spelled utils as utlis. This will keep some printers from loading their plugins. If you rebuild might as well fix this too
And there are added debugging messages left in HPCupsFilter.cpp that flood the syslog with
Code:
prnt/hpcups/HPCupsFilter.cpp 157: ERROR: File pointer is NULL!
messages when you print...

Last edited by timkb4cq; 05-31-2013 at 10:26 AM. Reason: p.s.
 
Old 06-01-2013, 05:00 AM   #13
burdi01
Member
 
Registered: Dec 2010
Location: The Netherlands
Distribution: Slackware Current64, PartedMagic, Xubuntu
Posts: 465

Original Poster
Rep: Reputation: 114Reputation: 114
So my LaserJet 3020 does not need a plugin.
Nevertheless I applied your two fixes. And indeed the hiccup does not occur.
Thank you very much.
 
Old 06-05-2013, 03:50 AM   #14
burdi01
Member
 
Registered: Dec 2010
Location: The Netherlands
Distribution: Slackware Current64, PartedMagic, Xubuntu
Posts: 465

Original Poster
Rep: Reputation: 114Reputation: 114
Timkb4cq's patch is included in ap/hplip-3.13.5-i486-2.txz as published on Tue Jun 4 23:30:57 UTC 2013.
 
Old 08-26-2013, 04:41 PM   #15
cwizardone
LQ Veteran
 
Registered: Feb 2007
Distribution: Slackware64-current with "True Multilib" and KDE4Town.
Posts: 9,097

Rep: Reputation: 7275Reputation: 7275Reputation: 7275Reputation: 7275Reputation: 7275Reputation: 7275Reputation: 7275Reputation: 7275Reputation: 7275Reputation: 7275Reputation: 7275
@burdi01,

Many thanks. I had the same hiccup with hplip-3.13.8.


Last edited by cwizardone; 08-26-2013 at 06:02 PM. Reason: Typo.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HPlip woes on --current ; Sharing printer gets broken if the hplip gui is launched Old_Fogie Slackware 2 10-28-2010 10:23 AM
[SOLVED] HPLIP & slack 13 -current lpallard Slackware 12 06-17-2010 09:24 PM
Problem with pppd after new udev update from -current niels.horn Slackware 8 10-10-2008 07:30 AM
current users - udev-128 - don't forget rc.udev.new! tobyl Slackware 3 10-08-2008 03:28 AM
slackware-current, udev 0.96, and custom udev rules not working rignes Slackware 6 08-10-2006 03:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration