# HP Scanjet 5300C segmentation fault

## Sparkster

Hi, guys. I am having a little problem with my scanner, so I hope you can help me.

Until a couple months ago, I had an old P4 and with that computer my scanner worked well (HP Scanjet 5300C). Recently I bought a new PC (an intel core i7, amd64, with motherboard Asus p7p55d deluxe) and now I can't get my scanner working.

When I run xsane, I get always segmentation fault, by pressing the scan or the preview button. I also tried with scanimage with the same result:

```

sparkster@fenix ~ $ scanimage -L

device `v4l:/dev/video0' is a Noname vivi virtual device

device `avision:libusb:002:008' is a Hewlett-Packard ScanJet 5300C flatbed scanner

sparkster@fenix ~ $ scanimage -d avision:libusb:002:008

Violación de segmento <-- Segmentation fault :P

```

I thought the scanner could be broken, so I installed a virtual PC with vmware (x86) and it worked fine.

The scanner is correctly detected. This is the output of dmesg after unplug and plug it again:

```

[ 2377.536300] hub 2-1:1.0: state 7 ports 8 chg 0000 evt 0002

[ 2377.536539] hub 2-1:1.0: port 1, status 0101, change 0001, 12 Mb/s

[ 2377.640136] hub 2-1:1.0: debounce: port 1: total 100ms stable 100ms status 0x101

[ 2377.651114] hub 2-1:1.0: port 1 not reset yet, waiting 10ms

[ 2377.713029] usb 2-1.1: new full speed USB device using ehci_hcd and address 9

[ 2377.723999] hub 2-1:1.0: port 1 not reset yet, waiting 10ms

[ 2377.797816] usb 2-1.1: ep0 maxpacket = 8

[ 2377.798389] usb 2-1.1: USB quirks for this device: 1

[ 2377.800129] usb 2-1.1: default language 0x0409

[ 2377.804373] usb 2-1.1: udev 9, busnum 2, minor = 136

[ 2377.804377] usb 2-1.1: New USB device found, idVendor=03f0, idProduct=0701

[ 2377.804380] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3

[ 2377.804384] usb 2-1.1: Product: Hewlett Packard ScanJet 5300C/5370C

[ 2377.804387] usb 2-1.1: Manufacturer: Hewlett Packard

[ 2377.804390] usb 2-1.1: SerialNumber: 0000000000000000

[ 2377.804468] usb 2-1.1: uevent

[ 2377.804488] usb 2-1.1: usb_probe_device

[ 2377.804491] usb 2-1.1: configuration #1 chosen from 1 choice

[ 2377.804841] usb 2-1.1: adding 2-1.1:1.0 (config #1, interface 0)

[ 2377.804869] usb 2-1.1:1.0: uevent

[ 2377.804938] drivers/usb/core/inode.c: creating file '009'

[ 2377.805877] usb 2-1.1: uevent

```

I am running a kernel 2.6.31-gentoo-r10 and these are the versions of sane program and dependencies:

```

*  media-gfx/sane-backends

      Latest version available: 1.0.19-r2

      Latest version installed: 1.0.19-r2

      Size of files: 4,200 kB

      Homepage:      http://www.sane-project.org/

      Description:   Scanner Access Now Easy - Backends

      License:       GPL-2 public-domain

*  media-gfx/sane-frontends

      Latest version available: 1.0.14

      Latest version installed: [ Not Installed ]

      Size of files: 226 kB

      Homepage:      http://www.sane-project.org

      Description:   Scanner Access Now Easy

      License:       GPL-2

*  media-gfx/xsane

      Latest version available: 0.996

      Latest version installed: 0.996

      Size of files: 3,265 kB

      Homepage:      http://www.xsane.org/

      Description:   graphical scanning frontend

      License:       GPL-2

```

I don't know where is the problem, so I hope you can help me. If you need more information, just ask. Thanks.

----------

## Rexilion

My guess is that you are missing some kernel configs. OR that you are facing a regression, since the old P4 might run an older kernel?

----------

## Sparkster

I was doing a few more test and this is what I got:

I tried to use the scanner in an old P2, with gentoo too, same kernel, and it didn't work. It worked in that PC with windows so it seemed a system or configuration problem.

I installed the scanner in my mom's PC (also a gentoo box, amd64) and the same problem, segmentation fault, but her scanner works well (multifunction, epson CXwhatever).

After that, I installed gentoo in a virtual PC, and same problem, segmentation fault, with the same kernel configuration of the P2 and the i7, and also configured with genkernel. Then, I installed debian into that virtual PC and the scanner worked without problems (kernel 2.6.26-2-686).

So the problem is in the kernel or in the system. I don't know which other test I can do. Any sugestion?

----------

## Sparkster

Another little hint. I have just tried to scan as a normal user (all other test were done as a supersuser to avoid permission problems) and this is what I got:

```

sparkster@fenix ~ $ scanimage -d avision:libusb:002:008 --resolution=200 >out.pnm

Error del bus <-- Bus error

```

Then, I tried with other resolution (it uses 100 by default) and I got segmentation fault again:

```

sparkster@fenix ~ $ scanimage -d avision:libusb:002:009 >out.pnm

Violación de segmento

```

With --resolution=300 I got bus error again.

----------

## freifunk_connewitz

I have the same problem, using an HP 5370C.

but for me, the scanner just stopped to work on the very same system. it must have been some update anywhere in my system some months ago. I have no clue which package it could have been. but IMHO this tells me it's probably not a kernel issue.

----------

