Bug 881931 - Colord does not work with Spyder 4 devices even though the argyllcms that ships with fedora supports it
Summary: Colord does not work with Spyder 4 devices even though the argyllcms that shi...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: colord
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-29 19:40 UTC by John (J5) Palmieri
Modified: 2013-03-13 04:53 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-06 05:29:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
udev rule for the spyder 4 device (1.20 KB, patch)
2012-11-29 19:40 UTC, John (J5) Palmieri
no flags Details | Diff
Add defs for spyder4 to sources (1.28 KB, patch)
2012-11-29 20:03 UTC, John (J5) Palmieri
no flags Details | Diff
Adds def for spyder4 and correctly return string rep of enum (1.90 KB, patch)
2012-11-30 20:35 UTC, John (J5) Palmieri
no flags Details | Diff

Description John (J5) Palmieri 2012-11-29 19:40:29 UTC
Created attachment 654511 [details]
udev rule for the spyder 4 device

Description of problem:

Colord is missing udev rules for the spyder 4 device which I supply with the attached patch.

Even with the patch I now get this error in the logs:

Nov 29 13:21:02 j5-stackdriver kernel: [  229.767186] usb 3-2: New USB device found, idVendor=085c, idProduct=0400
Nov 29 13:21:02 j5-stackdriver kernel: [  229.767195] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Nov 29 13:21:02 j5-stackdriver kernel: [  229.767199] usb 3-2: Product: Datacolor Spyder4
Nov 29 13:21:02 j5-stackdriver kernel: [  229.767203] usb 3-2: Manufacturer: Datacolor
Nov 29 13:21:02 j5-stackdriver kernel: [  229.767808] usb 3-2: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
Nov 29 13:21:02 j5-stackdriver colord[1578]: (colord:1578): Cd-WARNING **: CdSensorClient: failed to set CM sensor: failed to recognize color device: Datacolor - Datacolor_Spyder4

How reproducible:

Every time I plug the device in

Steps to Reproduce:
1. Plug in a spyder 4 device
  
Actual results:

No devices are listed in applications like gcm which use colord 

Expected results:

colord detects device and notifies the user to launch gcm 

Other info:

Note that running argyllcms tools like ccxxmake properly detect the device and turn on its ambient sensor.

Comment 1 John (J5) Palmieri 2012-11-29 20:03:25 UTC
Created attachment 654518 [details]
Add defs for spyder4 to sources

Comment 2 John (J5) Palmieri 2012-11-30 20:35:37 UTC
Created attachment 655242 [details]
Adds def for spyder4 and correctly return string rep of enum

This actually allows the spyder 4 to be detected and run through the tests.  Will let you know if it actually succeeds all the way throught

Comment 3 John (J5) Palmieri 2012-11-30 20:36:45 UTC
The attachment also seems to fix a bug with spyder 2 and spyder 3 detection though I don't have those to test with

Comment 4 John (J5) Palmieri 2012-11-30 23:27:09 UTC
I now get this error - dispread: Error - new_disprd failed with 'Instrument Access Failed'

From googling it seems the color subsystem thinks the the spyder 4 is a spectrometer but it is only a colorimeter or something like that.  Is there a way to get colord to treat it as such?

Comment 5 Richard Hughes 2012-12-03 13:54:56 UTC
Good catch on the missing spyder2,3 defines, that fixes another bug on my list. What we need now to fix this is the missing USB bits in rules/cd-sensor.rules.in

I've added this in git, can you give it a go please?

Thanks.

Richard.

Comment 6 John (J5) Palmieri 2012-12-03 18:33:15 UTC
Sensor works up to a point. Sends a bunch of patches for preconfigure but then fails as above in comment 4.

Comment 7 John (J5) Palmieri 2012-12-03 19:21:14 UTC
Tried to run it in verbose mode manually but now the color config app (or the gnome control center) wants to run.

Comment 8 John (J5) Palmieri 2012-12-05 06:48:40 UTC
I've been reading the argyllcms code and I think I know what is going on - might be related to bug #881928

I used the downloaded binary spy4gen to get the manufacturer's calibration data but it may be putting the files in the wrong directory since the 'Instrument Access Failed' error can also happen if it can't find the data when running dispcal.  If spy4en was compiled on Fedora it might fix the issue.

Comment 9 John (J5) Palmieri 2012-12-06 03:33:07 UTC
Tracked it down with gdb to argyllcms dispread being the issue.  Will file a bug upstream but perhaps this might ring a bell:

Work during pre-config using dispcal but when dispread is run it can't read from the device and I get this:

$ /usr/bin/dispread -v -d1 -y2 -D10 -k "GCM - Lenovo - 2352CTO - unknown (2012-12-05) [21-47-01].cal" "-P 0.5,0.5,1.2" "GCM - Lenovo - 2352CTO - unknown (2012-12-05) [21-47-01]"

Number of patches = 64
Setting up the instrument
usb_get_paths about to look through devices:
usb_check_and_add() called with VID 0x8087, PID 0x24
usb_check_and_add() called with VID 0x8087, PID 0x24
usb_check_and_add() called with VID 0x85c, PID 0x400
usb_check_and_add() found known instrument
usb_check_and_add() called with VID 0x1d6b, PID 0x2
usb_check_and_add() called with VID 0x1d6b, PID 0x2
usb_check_and_add() called with VID 0x1d6b, PID 0x2
usb_check_and_add() called with VID 0x1d6b, PID 0x3
usb_check_and_add() called with VID 0xa5c, PID 0x21e6
usb_check_and_add() called with VID 0x4f2, PID 0xb2da
managed to open serial "/dev/ttyS3"
managed to open serial "/dev/ttyS2"
managed to open serial "/dev/ttyS1"
managed to open serial "/dev/ttyS0"
spyd2: About to init coms
spyd2: About to init USB
icoms: About to set usb port characteristics
icoms: About to open the USB port, tries 0
icoms: USB port needs opening
icoms: About to open USB port 'usb:/bus3/dev2/ (Datacolor Spyder4)'
open() of USB port 'usb:/bus3/dev2/ (Datacolor Spyder4)' suceeded
Number of configurations = 1
icoms: USB port is now open
icoms: Clearing any USB errors
icoms: usb port characteristics set ok
spyd2: init coms has suceeded
spyd2: About to init instrument
icoms: About to return usb read 0 bytes, ICOM err 0x2000
icoms: About to return usb read 0 bytes, ICOM err 0x2000
icoms: About to return usb read 0 bytes, ICOM err 0x2000
icoms: About to return usb read 0 bytes, ICOM err 0x2000
icoms: About to return usb read 0 bytes, ICOM err 0x2000
icoms: About to return usb read 0 bytes, ICOM err 0x2000
icoms: About to return usb read 0 bytes, ICOM err 0x2000
icoms: About to return usb read 0 bytes, ICOM err 0x2000
icoms: About to return usb read 0 bytes, ICOM err 0x2000
icoms: About to return usb read 0 bytes, ICOM err 0x2000
icoms: About to return usb read 0 bytes, ICOM err 0x2000
spyd2: about to read all the EEProm values

spyd2: Read EEProm addr 5, bytes 1

spyd2: Read bytes retry with ICOM err 0x2000

spyd2: Read bytes retry with ICOM err 0x2000

spyd2: Read bytes retry with ICOM err 0x2000

spyd2: Read bytes retry with ICOM err 0x2000

spyd2: Read bytes failed with ICOM err 0x2000
init_inst returned 'Communications failure' (Communications failure)
new_disprd failed because init_inst failed
icoms: delete called
icoms: closing port
usb_close_port() called
usb port has been released and closed
dispread: Error - new_disprd failed with 'Instrument Access Failed'

Comment 10 John (J5) Palmieri 2012-12-06 05:29:38 UTC
Gah, closing this as fixed.  Seems like the issue was either the usb3.0 port or Lenovo uses a USB hub for some of their slots.  Switching to one of the back usb slots allowed the spyder to complete the calibration.


Note You need to log in before you can comment on or make changes to this bug.