Discussion:
Do we expect the ColorMunki to work on Centos6.4?
Richard Kirk
2014-08-29 15:18:25 UTC
Permalink
Hi.

I was not expecting anythig, but having got everything working on a Mac,
I thought I would try the same on my Centos 6.4 machine. It almost
works. I have tried the binaries, and I have built from source, and I
get the same thing...
- it finds the probe
- it connects and sets it up ok
- but I can't take a reading.

This is what I get:

***@gallardo$ sudo ./bin/spotread -v
Connecting to the instrument ..
Instrument Type: ColorMunki
Serial Number: 2066000
Firmware version: 288
Chip ID: 01-9059EF15000046
Version string: 'colormunki FW V1.32 Build Nr. 1303'
Calibration Ver.: 6
Production No.: 101549
Init instrument success !

Spot read needs a calibration before continuing
Set instrument sensor to calibration position,
and then hit any key to continue,
or hit Esc or Q to abort:
icoms_usb_transaction: reaper thread is not running
icoms_usb_transaction: reaper thread is not running
icoms_usb_transaction: reaper thread is not running
icoms_usb_transaction: reaper thread is not running
Calibration complete

Place instrument on spot to be measured,
and hit [A-Z] to read white and setup FWA compensation (keyed to letter)
[a-z] to read and make FWA compensated reading from keyed reference
'r' to set reference, 's' to save spectrum,
'f' to report cal. refresh rate, 'F' to measure refresh rate
'h' to toggle high res., 'k' to do a calibration
Hit ESC or Q to exit, instrument switch or any other key to take a reading:
icoms_usb_transaction: reaper thread is not running

Spot read failed due to communication problem.

Okay, there are plenty of clues for me there. I can have a dig through
the source, but before I do, it would be useful to know whether this
works on other Linux builds and it's just mine that is broken. Or
whether I ought to download the development build.

Thanks.
Richard Kirk
--
FilmLight Ltd. Tel: +44 (0)20 7292 0400 or 0409 224 (direct)
Artists House, Fax: +44 (0)20 7292 0401
14-15 Manette Street
London W1D 4AP
Richard Kirk
2014-08-29 16:33:05 UTC
Permalink
Post by Richard Kirk
Hi.
I was not expecting anythig, but having got everything working on a
Mac, I thought I would try the same on my Centos 6.4 machine. It
almost works. I have tried the binaries, and I have built from source,
and I get the same thing...
- it finds the probe
- it connects and sets it up ok
- but I can't take a reading.
More results...

It works when I 'su root'. It does not work when I run it with 'sudo'


Here's the errors with 'sudo'...

***@gallardo$ sudo ./Argyll_V1.6.3/bin/spotread -D9

I won't attach all of the dump as it is enormous and I don't want to
plague everyone with it. But here is the bit starting just before my
attempt at a measurement...

avg_multi: overall avg = 1857.421875, minavg = 1857.421875, maxavg =
1857.421875, variance 0.000000, THR 0.050000 (darkth 5000.000000)
Saving adaptive black calib to similar modes
Done adaptive interpolated black calibration
urb_reaper: poll returned -1 and events 0 0
urb_reaper: shutdown or too many failure
urb_reaper: cleared requests
urb_reaper: thread done
coms_usb_transaction: reap - 0 left
coms_usb_transaction: returning err 0x20000 and 0 bytes
icoms_usb_rw: returning 0 bytes, ICOM err 0x20000
munki_waitfor_switch_th: read failed with ICOM err 0x20000
Switch thread failed with 0x72
munki_waitfor_switch_th: Read 8 bytes from switch hit port
icoms_usb_transaction: req type 0x1 ep 0x83 size 8
icoms_usb_rw: returning 0 bytes, ICOM err 0x20000
munki_waitfor_switch_th: read failed with ICOM err 0x20000
Switch thread failed with 0x72
munki_waitfor_switch_th: Read 8 bytes from switch hit port
icoms_usb_transaction: req type 0x1 ep 0x83 size 8
icoms_usb_rw: returning 0 bytes, ICOM err 0x20000
munki_waitfor_switch_th: read failed with ICOM err 0x20000
munki_save_calibration saving to file '/root/.cache/ArgyllCMS'
Switch thread failed with 0x72
munki_waitfor_switch_th: Read 8 bytes from switch hit port
icoms_usb_transaction: req type 0x1 ep 0x83 size 8
icoms_usb_rw: returning 0 bytes, ICOM err 0x20000
munki_waitfor_switch_th: read failed with ICOM err 0x20000
Switch thread failed with 0x72
munki_waitfor_switch_th: Read 8 bytes from switch hit port
icoms_usb_transaction: req type 0x1 ep 0x83 size 8
icoms_usb_rw: returning 0 bytes, ICOM err 0x20000
munki_waitfor_switch_th: read failed with ICOM err 0x20000
Switch thread failed with 0x72
Switch thread returning
munki_save_calibration failed to open file for writing
Finished cal with dark_valid = 1, cal_valid = 1
Calibrate returned calt 0x0, calc 0x60, ev 0x0
Calibration complete
inst_handle_calibrate done 0x0

Place instrument on spot to be measured,
and hit [A-Z] to read white and setup FWA compensation (keyed to letter)
[a-z] to read and make FWA compensated reading from keyed reference
'r' to set reference, 's' to save spectrum,
'f' to report cal. refresh rate, 'F' to measure refresh rate
'h' to toggle high res., 'k' to do a calibration
Hit ESC or Q to exit, instrument switch or any other key to take a
reading: munki_imp_measure called
Taking 1 measurments in Emission Adaptive mode called
############# triggered ##############

munki_getstatus: called
icoms_usb_control: message c0, 87 0000 0000 0002
icoms_usb_control_msg: type 0xc0 req 0x87 size 2
icoms_usb_transaction: req type 0x0 ep 0x0 size 10
icoms_usb_control_msg: returning err 0x20000 and -8 bytes
icoms_usb_control: returning ICOM err 0x20000
read data 00 00
munki_getstatus: failed with ICOM err 0x20000
munki_imp_measure getstatus failed


Spot read failed due to communication problem.
Hit Esc or Q to give up, any other key to retry:


There was trouble saving to '/root/.cache/ArgyllCMS' and there is no
sign of the file.

We copied all the Argyll files onto the local disc, as it was running
off a local disc, but that didn't help.

We then changed to root using 'su root' rather than using 'sudo' and it
ran...
Connecting to the instrument ..
Instrument Type: ColorMunki
Serial Number: 2066000
Firmware version: 288
Chip ID: 01-9059EF15000046
Version string: 'colormunki FW V1.32 Build Nr. 1303'
Calibration Ver.: 6
Production No.: 101549
Init instrument success !

Spot read needs a calibration before continuing
Set instrument sensor to calibration position,
and then hit any key to continue,
or hit Esc or Q to abort:
Calibration complete

Place instrument on spot to be measured,
and hit [A-Z] to read white and setup FWA compensation (keyed to letter)
[a-z] to read and make FWA compensated reading from keyed reference
'r' to set reference, 's' to save spectrum,
'f' to report cal. refresh rate, 'F' to measure refresh rate
'h' to toggle high res., 'k' to do a calibration
Hit ESC or Q to exit, instrument switch or any other key to take a reading:


Result is XYZ: 69.232993 73.390863 57.265370, D50 Lab: 88.633797
-3.275202 3.313283

I have just repeated this using 'spotread' with a full path in both cases.
It works when I 'su root'. It does not work when I run it with 'sudo'


Dang. 5:30 on Friday. I will have to leave it there. Weekend cliff-hanger!

Cheers.
Richard Kirk
--
FilmLight Ltd. Tel: +44 (0)20 7292 0400 or 0409 224 (direct)
Artists House, Fax: +44 (0)20 7292 0401
14-15 Manette Street
London W1D 4AP
Graeme Gill
2014-09-01 01:27:28 UTC
Permalink
Richard Kirk wrote:

Hi,
Pascal de Bruijn has reported some problems with USB timeouts
on Linux with the ColorMunki. His symptoms were that it would work the
first time after plugging in, but not thereafter. My suspicion
was that is some sort of bug in the Linux driver for a particular
USB hub on his motherboard, but without help from one of
the Linux USB driver writers, it's hard to be sure what the cause is.
Post by Richard Kirk
It works when I 'su root'. It does not work when I run it with 'sudo'
That's strange. Usually such problems are to do with permissions to
open the device - ie. setting up a suitable udev file.
Post by Richard Kirk
Here's the errors with 'sudo'...
I won't attach all of the dump as it is enormous and I don't want to plague everyone with
it. But here is the bit starting just before my attempt at a measurement...
avg_multi: overall avg = 1857.421875, minavg = 1857.421875, maxavg = 1857.421875, variance
0.000000, THR 0.050000 (darkth 5000.000000)
Saving adaptive black calib to similar modes
Done adaptive interpolated black calibration
urb_reaper: poll returned -1 and events 0 0
urb_reaper: shutdown or too many failure
urb_reaper: cleared requests
urb_reaper: thread done
I think the driver has effectively failed at this point,
because poll() has returned -1 so it thinks the driver
is shutting down.
Without the reaper thread, no USB transfers will complete.

What happened before this ? (ie., since you have ommitted the
trace, it's not clear whether USB transfers were working before this,
or what led up to poll failing).

Graeme Gill.
Richard Kirk
2014-09-01 11:03:52 UTC
Permalink
Post by Graeme Gill
Post by Richard Kirk
Here's the errors with 'sudo'...
I won't attach all of the dump as it is enormous and I don't want to plague everyone with
it. But here is the bit starting just before my attempt at a measurement...
avg_multi: overall avg = 1857.421875, minavg = 1857.421875, maxavg = 1857.421875, variance
0.000000, THR 0.050000 (darkth 5000.000000)
Saving adaptive black calib to similar modes
Done adaptive interpolated black calibration
urb_reaper: poll returned -1 and events 0 0
urb_reaper: shutdown or too many failure
urb_reaper: cleared requests
urb_reaper: thread done
I think the driver has effectively failed at this point,
because poll() has returned -1 so it thinks the driver
is shutting down.
Without the reaper thread, no USB transfers will complete.
What happened before this ? (ie., since you have ommitted the
trace, it's not clear whether USB transfers were working before this,
or what led up to poll failing).
Hi, Graeme.

Thanks for looking at this, particularly as I suspect this is an OS problem.

I am running sudo /usr/local/bin/spotread -e -v -D9. I connect to the
instrument, do a self-calibration, and then quit.

I have attached a zip of the co bined stderr and stdout in
spotread_log.zip, which will unpack to spotread.log ( 370394 bytes ).

When I run this without the debug flag I get...
Post by Graeme Gill
sudo /usr/local/bin/spotread -e -v
Connecting to the instrument ..
Instrument Type: ColorMunki
Serial Number: 2066000
Firmware version: 288
Chip ID: 01-9059EF15000046
Version string: 'colormunki FW V1.32 Build Nr. 1303'
Calibration Ver.: 6
Production No.: 101549
Init instrument success !

Spot read needs a calibration before continuing
Set instrument sensor to calibration position,
and then hit any key to continue,
or hit Esc or Q to abort:
icoms_usb_transaction: reaper thread is not running
icoms_usb_transaction: reaper thread is not running
icoms_usb_transaction: reaper thread is not running
icoms_usb_transaction: reaper thread is not running
Calibration complete

Place instrument on spot to be measured,
and hit [A-Z] to read white and setup FWA compensation (keyed to letter)
[a-z] to read and make FWA compensated reading from keyed reference
'r' to set reference, 's' to save spectrum,
'f' to report cal. refresh rate, 'F' to measure refresh rate
'h' to toggle high res., 'k' to do a calibration
Hit ESC or Q to exit, instrument switch or any other key to take a
reading: q

Spot read stopped at user request!
Hit Esc or Q to give up, any other key to retry:

(end)

Cheers.
Richard
--
FilmLight Ltd. Tel: +44 (0)20 7292 0400 or 0409 224 (direct)
Artists House, Fax: +44 (0)20 7292 0401
14-15 Manette Street
London W1D 4AP
Graeme Gill
2014-09-01 12:41:13 UTC
Permalink
Post by Richard Kirk
Thanks for looking at this, particularly as I suspect this is an OS problem.
I am running sudo /usr/local/bin/spotread -e -v -D9. I connect to the instrument, do a
self-calibration, and then quit.
I have attached a zip of the co bined stderr and stdout in spotread_log.zip, which will
unpack to spotread.log ( 370394 bytes ).
Hi,
I don't really have much of an ideal as to what will cause
poll() to fail after working successfully, apart from something
like the device being closed on it. I guess there's a possibility
of something like that being an explanation, some daemon or server
clobbering the USB port which mightn't be able to happen when
spotread has it open as root.

Is there something like an old version of mtp-probe / libmtp running ?
It was known for clobering color instruments.
(look in the udev configuration).

Graeme Gill.
Richard Kirk
2014-09-02 08:35:49 UTC
Permalink
Post by Graeme Gill
Post by Richard Kirk
Thanks for looking at this, particularly as I suspect this is an OS problem.
I am running sudo /usr/local/bin/spotread -e -v -D9. I connect to the instrument, do a
self-calibration, and then quit.
I have attached a zip of the co bined stderr and stdout in spotread_log.zip, which will
unpack to spotread.log ( 370394 bytes ).
Hi,
I don't really have much of an ideal as to what will cause
poll() to fail after working successfully, apart from something
like the device being closed on it. I guess there's a possibility
of something like that being an explanation, some daemon or server
clobbering the USB port which mightn't be able to happen when
spotread has it open as root.
Is there something like an old version of mtp-probe / libmtp running ?
It was known for clobering color instruments.
(look in the udev configuration).
Hi, Graham.

I could find no sign of it in the usual directories. Having a search on the web, this seems to often be connected with using Spyders, and we haven't got one. I also have the same thing happening on two separate machines - it is just possible that I may install some test software that stuck it somewhere unusual on one of them, but I doubt if it happens on both. So, I am about as sure as I can be that that is not it.

I am sure the real clue lies in the fact I can run it under 'su root' but not under 'su'. I shall work on that. I have tried all the different 'sudo' options to try and get the environments and shells to match.

Thanks.
Richard Kirk
---
FilmLight Ltd, Artists House, 14-15 Manette Street, London W1D 4AP
Tel: +44 (0)20 7292 0400 Fax: +44 (0)20 7292 0401
Graeme Gill
2014-09-02 12:14:38 UTC
Permalink
Post by Richard Kirk
I am sure the real clue lies in the fact I can run it under 'su root' but not under
'su'. I shall work on that. I have tried all the different 'sudo' options to try and
get the environments and shells to match.
Another possible angle is to get a usbmon trace at the time of
the failure, and compare that to the 'su root' case and
see if that shows anything interesting.

Graeme Gill.
Richard Kirk
2014-09-03 10:28:03 UTC
Permalink
Post by Graeme Gill
Post by Richard Kirk
I am sure the real clue lies in the fact I can run it under 'su root' but not under
'su'. I shall work on that. I have tried all the different 'sudo' options to try and
get the environments and shells to match.
Another possible angle is to get a usbmon trace at the time of
the failure, and compare that to the 'su root' case and
see if that shows anything interesting.
Hi, Graeme.

I am running Centos 6.4.

I have attached two usbmon logs, one from running
'/usr/local/bin/spotread' under 'su root', and the other under 'sudo'. I
had the ColorMunki probe in the calibration position. I pressed return
to do the calibration. When that had finished, I pressed control-C to
escape.

If I chop out the first two columns and do a 'diff' the interesting
difference happens about line 27...

27,37c27
< C Ci:4:002:0 0 2 = 0100
< C Ii:4:002:3 0:64 8 = 00010000 bbe77c0a
< S Ii:4:002:3 -115:64 8 <
< C Ii:4:002:3 0:64 8 = 00010000 cae77c0a
< S Ii:4:002:3 -115:64 8 <
< C Ii:4:002:3 0:64 8 = 00010000 17e87c0a
< S Ii:4:002:3 -115:64 8 <
< C Ii:4:002:3 0:64 8 = 00010000 01e97c0a
< S Ii:4:002:3 -115:64 8 <
< C Ii:4:002:3 0:64 8 = 00010000 44e97c0a
< S Ii:4:002:3 -115:64 8 <
---
Post by Graeme Gill
C Ci:4:002:0 0 2 = 0200
45,47c35,37
< C Bi:4:002:1 0 16384 = 37073707 36073807 37073907 39073a07 38073907
37073707 39073807 39073807
< C Bi:4:002:1 0 16384 = 39073807 39073807 39073907 39073707 39073907
39073907 3a073907 3a073907
< C Bi:4:002:1 0 5592 = 39073907 38073807 39073807 38073907 38073807
39073807 36073907 38073807
---
Post by Graeme Gill
C Bi:4:002:1 0 16384 = 37073707 37073807 36073807 39073907 39073707
39073807 39073907 39073907
Post by Graeme Gill
C Bi:4:002:1 0 16384 = 39073807 39073807 38073907 38073807 39073707
38073907 39073707 39073907
Post by Graeme Gill
C Bi:4:002:1 0 5592 = 39073707 39073907 38073807 38073807 38073907
38073907 39073807 38073907
51,54c41,42
< C Bi:4:002:1 0 274 = 40073c07 3c073d07 3d073f07 45074507 45074707
46074707 49074807 48074707
< S Co:4:002:0 s 40 8e 0000 0000 0008 8 = 00010000 00000000
< C Co:4:002:0 0 8 >
< C Ii:4:002:3 -2:64 0
---
Post by Graeme Gill
C Bi:4:002:1 0 274 = 42073d07 3c073c07 3e073f07 45074607 45074807
46074707 48074807 48074707
Post by Graeme Gill
C Ii:4:002:3 -108:64 0
PS:
There's no reason why my company ought to get support from you for
nothing. I ought to poke them to make a donation to the Argyll project
at least, unless you have something you prefer.

Thanks.
Richard Kirk
--
FilmLight Ltd. Tel: +44 (0)20 7292 0400 or 0409 224 (direct)
Artists House, Fax: +44 (0)20 7292 0401
14-15 Manette Street
London W1D 4AP
Richard Kirk
2014-09-09 15:18:09 UTC
Permalink
Post by Richard Kirk
Post by Graeme Gill
Post by Richard Kirk
I am sure the real clue lies in the fact I can run it under 'su root' but not under
'su'. I shall work on that. I have tried all the different 'sudo' options to try and
get the environments and shells to match.
Another possible angle is to get a usbmon trace at the time of
the failure, and compare that to the 'su root' case and
see if that shows anything interesting.
Hi, Graeme.
I am running Centos 6.4.
I have attached two usbmon logs, one from running
'/usr/local/bin/spotread' under 'su root', and the other under 'sudo'.
I had the ColorMunki probe in the calibration position. I pressed
return to do the calibration. When that had finished, I pressed
control-C to escape.
If I chop out the first two columns and do a 'diff' the interesting
difference happens about line 27...
27,37c27
< C Ci:4:002:0 0 2 = 0100
< C Ii:4:002:3 0:64 8 = 00010000 bbe77c0a
< S Ii:4:002:3 -115:64 8 <
< C Ii:4:002:3 0:64 8 = 00010000 cae77c0a
< S Ii:4:002:3 -115:64 8 <
< C Ii:4:002:3 0:64 8 = 00010000 17e87c0a
< S Ii:4:002:3 -115:64 8 <
< C Ii:4:002:3 0:64 8 = 00010000 01e97c0a
< S Ii:4:002:3 -115:64 8 <
< C Ii:4:002:3 0:64 8 = 00010000 44e97c0a
< S Ii:4:002:3 -115:64 8 <
---
Post by Graeme Gill
C Ci:4:002:0 0 2 = 0200
It seems to work on the 1.7 beta version. So, I will use that for now.

Yay!

Cheers.
Richard
--
FilmLight Ltd. Tel: +44 (0)20 7292 0400 or 0409 224 (direct)
Artists House, Fax: +44 (0)20 7292 0401
14-15 Manette Street
London W1D 4AP
Graeme Gill
2014-09-09 23:12:41 UTC
Permalink
Post by Richard Kirk
It seems to work on the 1.7 beta version. So, I will use that for now.
Yay!
Hmm. Good, but it would be nice to know why ! :-)

Graeme Gill.

Loading...