Categories
Gentoo Linux

Fixing ‘interface claimed’ printing problems

After leaving my printer unused for some time I suddenly found myself unable to print to my Canon ip4300 printer (which is connected using USB and should be run by CUPS). Dmesg showed the following after powering up the printer:

usb 1-3.1: new high speed USB device using ehci_hcd and address 5
usb 1-3.1: configuration #1 chosen from 1 choice
usblp0: USB Bidirectional printer dev 5 if 0 alt 0 proto 2 vid 0x04A9 pid 0x10B6
usb 1-3.1: usbfs: interface 0 claimed by usblp while 'usb' sets config #1
usb 1-3.1: usbfs: interface 0 claimed by usblp while 'usb' sets config #1
usb 1-3.1: usbfs: interface 0 claimed by usblp while 'usb' sets config #1
usb 1-3.1: usbfs: interface 0 claimed by usblp while 'usb' sets config #1

The problem here is the USB Printer subsystem of the kernel called ‘usblp’. Some people might have it compiled into the kernel (like me – seemed like a good idea at the time) and others might have it as a module. If you have it as a module, unload it and blacklist it so it won’t be loaded automatically. Power cycle on the printer and it should suddenly become available to CUPS.

If you have it compiled in – like I had – recompile your kernel after disabling USB Printing. The device manager will pick it up if you connect it again so the printing subsystem can use it.

On a side note: it would have been nice to have a warning in the kernel description that using printing subsystems will not work properly if you use ‘usblp’…

Categories
Gentoo Linux

Kill all waiting backup jobs in Bacula

If you are a Bacula user, you most likely had the problem of a Director clogging up on one or more jobs getting stuck while others keep piling up. With the new directives for managing duplicate jobs, this should not happen anymore but last night I found out that 2 of my backup servers managed to dead-lock.

The resulting job queue was over 300 jobs long and restarting the Director did not seem to help. So I threw a little shell script together to use bconsole to cancel all jobs in a waiting state.

Us usual, use on your own risk, I only tested it on my servers and it worked fine…

#!/bin/bash
jobIds=`echo 'status dir running' | bconsole | fgrep 'is waiting' | awk '{print $1}'`
for i in $jobIds
do
  if [ -z `echo "$i" | grep '^[0-9]\+$'` ]
  then
    echo "Error: job ID $i is not a number!"
  else
    echo "Killing waiting Bacula job $i"
    echo "cancel jobid=$i" | bconsole
  fi
done
Categories
Gentoo Linux

QuickCam Communicate STX on Linux

Looking for instructions to get your latest Logitech webcam to work on linux? Your in the right place! Need a replacement for gspcav1 or spca5xx? Have no clue what I just said but you need a new webcam driver? Please, read on…

Categories
Gentoo Linux

KDE 4 random crashes (when launching Konsole)

After upgrading my laptop to the latest of the latest and even recompiling pretty much the whole system after that, I was still facing a whacky system which crashed on me on seemingly random times.

After a while I noticed that when I log in, hit alt+F2 and fire up ‘konsole’, the whole X server comes down crashing on me. Resulting in a few seconds of dark terror and a fresh login panel.

After running konsole from a text terminal, I spotted the following errors:

 kdeinit4: preparing to launch /usr/bin/konsole konsole(2671): Attempt to use QAction "change-profile" with KXMLGUIFactory!  Undecodable sequence \001b(hex)[?1034h

Because any attempt to trace the program failed, I started to search for other people and their solutions.

I’ve read things about people reinstalling parts of Xorg (namely libX11 as 1.1.5 seems to have some quirks) and parts of Qt 4.5 which should be unstable as well. None of these things worked for me and after restoring the system in the unmodified state, I found someone claiming that removing ‘tweaks’ in the xorg.conf file for the nVidia driver did the trick.

Although I indeed upgraded the nvidia-drivers package, I thought this was one of the bogus stories (like people solvin mounting problems by unplugging printers on the other side of the globe) – but at this point I had nothing to lose.

To my sheer terror I must admit that it actually worked!

I’ve had one occasion where konsole started but the window rendering was all screwed up (white or no background or no window decorations) but I hadn’t linked it to the display driver itself.

For now, everything is stable so I assume that I found the culprit. Please note that one or more of the following will make your KDE 4.2.2 desktop crash randomly:

  • TrippleBuffer
  • BackingStore
    • I have 2 options left in my configuration which are there for a while now and which still seems to be perfectly safe:

      • AddARGBVisuals
      • OnDemandVBlankInterrupts
        • Hopefully this post will safe someone a lot of grey hairs and a couple of precious hours spent on a goose hunt…