Linux - Peripheral hardware

mail

How to detect and use my HP Deskjet printer / scanner on Debian ?

Situation

I have an HP Deskjet F2480 "all-in-one" printer/scanner. I know it works on GNU/Linux because I already printed with it with Ubuntu (can't remember which release, though, 't was the 12.xx or 13.xx maybe). The scanner worked fine too.

Now I've switched to Debian (Jessie in the initial version of this article, Stretch for the current edit), I can't remember what I did to make it work (if anything special).

So here are notes for my future self to make things easier (you're welcome, bro' )

Details

In search of solutions, I've tried many different things which finally worked. But I can't tell whether just the final action was the solution, or a combination of actions. So here's everything I did.

Solution

Jump to the solution.

  1. sane-find-scanner
    • on Jessie :
      # sane-find-scanner will now attempt to detect your scanner. If the
      # result is different from what you expected, first make sure your
      # scanner is powered up and properly connected to your computer.
      
      # No SCSI scanners found. If you expected something different, make sure that
      # you have loaded a kernel SCSI driver for your SCSI adapter.
      
      found USB scanner (vendor=0x03f0 [HP], product=0x7611 [Deskjet F2400 series]) at libusb:001:044
      # Your USB scanner was (probably) detected. It may or may not be supported by
      # SANE. Try scanimage -L and read the backend's manpage.
      
      # Not checking for parallel port scanners.
      
      # Most Scanners connected to the parallel port or other proprietary ports
      # can't be detected by this program.
    • on Stretch :
      
      found USB scanner (vendor=0x03f0 [HP], product=0x7611 [Deskjet F2400 series]) at libusb:001:007
      
  2. scanimage -L
    • on Jessie :
      No scanners were identified. If you were expecting something different,
      check that the scanner is plugged in, turned on and detected by the
      sane-find-scanner tool (if appropriate). Please read the documentation
      which came with this software (README, FAQ, manpages).
    • on Stretch :
      device `hpaio:/usb/Deskjet_F2400_series?serial=CN9AT172RV05BS' is a Hewlett-Packard Deskjet_F2400_series all-in-one
  3. apt install libsane-extras
  4. vim /etc/sane.d/dll.conf (source)
    (nothing found matching my scanner )
  5. lsusb
    
    Bus 001 Device 044: ID 03f0:7611 Hewlett-Packard DeskJet F2492 All-in-One
    
    ls -al /dev/bus/usb/001/044
    crw-rw-r-- 1 root lp 189, 43 Jan 11 20:21 /dev/bus/usb/001/044

    The device ID (here 044) is incremented each time a device is detected (unplug + replug or off + on counts as "new device detected")

  6. sudo adduser saned lp
  7. apt install --no-install-recommends hplip
  8. Do one of these :
    • reboot the computer (tested : it works )
    • turn off and on again the printer/scanner
    • unplug + replug the printer/scanner USB cord
    It should work now
Final note : Xsane now detects my scanner but looks WAY too complex for my VERY basics needs. Simple-scan is just fine.
mail

How to setup dual-screen display ?

To do so, my 1st idea was to try using the ATI Catalyst Control Center (running /usr/bin/amdcccle as root), but this didn't work
After some research, the solution is xrandr.

List the detected monitors :

xrandr -q may output something like (this is actually what is output AFTER configuration) :

Screen 0: minimum 320 x 200, current 1280 x 1024, maximum 8192 x 8192
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DVI-0 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 337mm x 270mm
	1280x1024	75.02	60.02*
	1024x768	75.08	70.07	60.00
	800x600		75.00	60.32
	640x480		75.00	60.00	59.93
	720x400		70.08	70.08
DVI-1 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 338mm x 270mm
	1280x1024	60.02*+	75.02
	1152x864	75.00
	1024x768	75.08	70.07	60.00
	832x624		74.55
	800x600		72.19	75.00	60.32	56.25
	640x480		75.00	72.81	66.67	60.00	59.94
	720x400		70.08
Screen names are listed UPPERCASE, then their settings (details).

Configure both monitors :

  1. xrandr --auto --output DVI-0 --mode 1280x1024
  2. xrandr --auto --output DVI-1 --mode 1024x768 --pos 1280x300
  1. --pos declares the offset of the lower-left corner of DVI-1 relatively to the lower-left corner of DVI-0.
  2. Don't spend too much time trying to align windows on screens of different sizes/resolutions : pixels may not be the same height on both screens
  3. The device that is declared 1st becomes the primary screen. By default, Gnome displays the panel on this screen only (source).

Even simpler method :

xrandr --output DVI-1 --left-of DVI-0

More in the xrandr man page and on Wikipedia.

If xrandr complains xrandr: screen cannot be larger than widthxheight (source) :

  1. Open /etc/X11/xorg.conf (this was created with aticonfig --initial when installing ATI non-free driver)
  2. In the Screen | Display subsection, declare the size on the Virtual Display : Virtual 2304 1068
    Section "Screen"
    	Identifier		"aticonfig-Screen[0]-0"
    	Device			"aticonfig-Device[0]-0"
    	Monitor			"aticonfig-Monitor[0]-0"
    	DefaultDepth		24
    	SubSection		"Display"
    		Viewport	0 0
    		Depth		24
    		Virtual		2304 1068
    	EndSubSection
    EndSection

Save settings (source) :

Simply write the command line above into ~/.xprofile.

(Re-)Apply settings after opening a graphical session :

mail

Linux and USB 2.0

New Logos :

Logo USB version Bandwidth
USB 2.0
(high speed version, with red stripe)
480 Mbits/s (theoretical)
60-80 Mbits/s (practical)
USB 1.1 12 Mbits/s (theoretical)
2 Mbits/s (practical)

Details

mail

How to connect a FireWire (IEEE1394) hard drive?

IEEE 1394 is the "real" name of that technology, also known as FireWire and iLink (Sony).
Actually, the connection method is quite similar to connecting a USB digital camera. Here is the procedure I use :

To connect the HDD :

  1. physically connect the HDD
  2. modprobe ohci1394
  3. modprobe sbp2
  4. mount /dev/sdxx mountPoint

To disconnect this HDD :

  1. Unloading ohci1394 from the 2.4.10-12a kernel results in a DEADLOCK condition that requires a reboot. So never unload ohci1394 and don't use /etc/modules.conf to associate sbp2 with ohci1394 because if you do, then unloading sbp2 will cause ohci1394 to unload
  2. simply unload the sbp2 module :
    modprobe -r sbp2
  3. physically disconnect the HDD

To reconnect the HDD :

  1. physically connect the HDD
  2. To gain access to the drive, both ohci1394 and sbp2 must be loaded:
    • ohci1394 is still loaded since we can't unload it without messing things up.
    • sbp2 must be loaded / unloaded each time the drive is attached / removed. It is currently unloaded, so load it :
      modprobe sbp2