1# Version=1.7.0
2# udev rule to recognize instruments and make them accessible to user applications.
3# Copy this to /etc/udev/rules.d/55-Argyll.rules
4# or           /usr/lib/udev/rules.d/55-Argyll.rules
5# and remove   /usr/lib/udev/rules.d/69-cd-sensors.rules
6# as appropriate for your system
7
8#--------------------------------------------------------------------------
9# Copyright 2012 Graeme W. Gill.
10#
11# Permission is hereby granted, free of charge, to any person obtaining a copy
12# of this file, to deal in this file without restriction, including without
13# limitation the rights to use, copy, modify, merge, publish, distribute,
14# sublicense, and/or sell copies of this file, and to permit persons to whom
15# this file is furnished to do so, subject to the following conditions:
16#
17# The above copyright notice and this permission notice shall be included in
18# all copies or substantial portions of this file.
19#
20# THIS FILE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25# OUT OF OR IN CONNECTION WITH THIS FILE OR THE USE OR OTHER DEALINGS IN
26# THIS FILE.
27#--------------------------------------------------------------------------
28
29# Skip all this to speed things up if it'a not a usb add.
30ACTION!="add", GOTO="argyll_rules_end"
31SUBSYSTEM!="usb", GOTO="argyll_rules_end"
32
33# Recognize the color measurement devices
34# COLORD_SENSOR_KIND, COLORD_SENSOR_CAPS, COLORD_SENSOR_EMBEDDED, COLORD_IGNORE
35# are for the benefit of Gnome Color Manager - ArgyllCMS doesn't use them.
36
37# Colorimtre HCFR
38ATTRS{idVendor}=="04db", ATTRS{idProduct}=="005b", ENV{COLORD_SENSOR_KIND}="colorimtre-hcfr", ENV{COLORD_SENSOR_CAPS}="projector"
39
40
41# MonacoOPTIX (Same as i1 Display 1)
42ATTRS{idVendor}=="0670", ATTRS{idProduct}=="0001", ENV{COLORD_SENSOR_KIND}="i1-display1", ENV{COLORD_SENSOR_CAPS}="lcd crt"
43
44
45# HueyL (not tested)
46ATTRS{idVendor}=="0765", ATTRS{idProduct}=="5001", ENV{COLORD_SENSOR_KIND}="huey", ENV{COLORD_SENSOR_CAPS}="lcd crt" ENV{COLORD_SENSOR_EMBEDDED}="1"
47
48# HueyL (not tested)
49ATTRS{idVendor}=="0765", ATTRS{idProduct}=="5010", ENV{COLORD_SENSOR_KIND}="huey", ENV{COLORD_SENSOR_CAPS}="lcd crt" ENV{COLORD_SENSOR_EMBEDDED}="1"
50
51# i1Display 3
52ATTRS{idVendor}=="0765", ATTRS{idProduct}=="5020", ENV{COLORD_SENSOR_KIND}="i1-display3", ENV{COLORD_SENSOR_CAPS}="lcd crt projector ambient"
53
54# ColorMunki Smile
55ATTRS{idVendor}=="0765", ATTRS{idProduct}=="6003", ENV{COLORD_SENSOR_KIND}="color-munki-smile", ENV{COLORD_SENSOR_CAPS}="lcd-ccfl lcd-white-led"
56
57# DTP20
58ATTRS{idVendor}=="0765", ATTRS{idProduct}=="d020", ENV{COLORD_SENSOR_KIND}="dtp20" ENV{COLORD_SENSOR_CAPS}="printer spot"
59
60# DTP92Q (not tested)
61ATTRS{idVendor}=="0765", ATTRS{idProduct}=="d092", ENV{COLORD_SENSOR_KIND}="dtp92" ENV{COLORD_SENSOR_CAPS}="crt"
62
63# DTP94
64ATTRS{idVendor}=="0765", ATTRS{idProduct}=="d094", ENV{COLORD_SENSOR_KIND}="dtp94" ENV{COLORD_SENSOR_CAPS}="lcd crt"
65
66
67# i1Pro
68ATTRS{idVendor}=="0971", ATTRS{idProduct}=="2000", ENV{COLORD_SENSOR_KIND}="i1-pro" ENV{COLORD_SENSOR_CAPS}="lcd crt projector printer ambient"
69
70# i1Monitor
71ATTRS{idVendor}=="0971", ATTRS{idProduct}=="2001", ENV{COLORD_SENSOR_KIND}="i1-pro" ENV{COLORD_SENSOR_CAPS}="lcd crt"
72
73# i1Display
74ATTRS{idVendor}=="0971", ATTRS{idProduct}=="2003", ENV{COLORD_SENSOR_KIND}="i1-display1" ENV{COLORD_SENSOR_CAPS}="lcd crt"
75
76# i1 io table (not tested)
77ATTRS{idVendor}=="0971", ATTRS{idProduct}=="2004", ENV{COLORD_SENSOR_KIND}="i1-pro" ENV{COLORD_SENSOR_CAPS}="printer"
78
79# Huey
80ATTRS{idVendor}=="0971", ATTRS{idProduct}=="2005", ENV{COLORD_SENSOR_KIND}="huey" ENV{COLORD_SENSOR_CAPS}="lcd crt ambient"
81
82# i1 iSis (not tested)
83ATTRS{idVendor}=="0971", ATTRS{idProduct}=="2006", ENV{COLORD_SENSOR_KIND}="iSis" ENV{COLORD_SENSOR_CAPS}="printer"
84
85# ColorMunki
86ATTRS{idVendor}=="0971", ATTRS{idProduct}=="2007", ENV{COLORD_SENSOR_KIND}="color-munki-photo" ENV{COLORD_SENSOR_CAPS}="lcd crt projector printer spot ambient"
87
88
89# Spyder 1
90ATTRS{idVendor}=="085c", ATTRS{idProduct}=="0100", ENV{COLORD_SENSOR_KIND}="spyder1" ENV{COLORD_SENSOR_CAPS}="lcd crt"
91
92# Spyder 2
93ATTRS{idVendor}=="085c", ATTRS{idProduct}=="0200", ENV{COLORD_SENSOR_KIND}="spyder2" ENV{COLORD_SENSOR_CAPS}="lcd crt"
94
95# Spyder 3
96ATTRS{idVendor}=="085c", ATTRS{idProduct}=="0300", ENV{COLORD_SENSOR_KIND}="spyder3" ENV{COLORD_SENSOR_CAPS}="lcd crt ambient"
97
98# Spyder 4
99ATTRS{idVendor}=="085c", ATTRS{idProduct}=="0400", ENV{COLORD_SENSOR_KIND}="spyder4" ENV{COLORD_SENSOR_CAPS}="lcd crt ambient"
100
101# Spyder 5
102ATTRS{idVendor}=="085c", ATTRS{idProduct}=="0500", ENV{COLORD_SENSOR_KIND}="spyder5" ENV{COLORD_SENSOR_CAPS}="lcd crt ambient"
103
104# JETI & KLEIN serial port (not used)
105#KERNEL=="ttyUSB[0-9]*", TAG+="udev-acl", TAG+="uaccess"
106
107# ArgyllCMS USB serial chip driver for JETI & KLEIN (not used)
108#ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ENV{COLORD_SENSOR_KIND}="FT232R"
109#ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", ENV{COLORD_SENSOR_KIND}="FT231XS"
110
111
112# ColorHug, old and new USB ID's, ColorHug 2
113ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="f8da", ENV{COLORD_SENSOR_KIND}="colorhug" ENV{COLORD_SENSOR_CAPS}="lcd" ENV{COLORD_IGNORE}="1"
114
115ATTRS{idVendor}=="273f", ATTRS{idProduct}=="1001", ENV{COLORD_SENSOR_KIND}="colorhug" ENV{COLORD_SENSOR_CAPS}="lcd"
116
117ATTRS{idVendor}=="273f", ATTRS{idProduct}=="1004", ENV{COLORD_SENSOR_KIND}="colorhug" ENV{COLORD_SENSOR_CAPS}="lcd"
118
119# ColorHug Spectro
120ATTRS{idVendor}=="273f", ATTRS{idProduct}=="1002", ENV{COLORD_SENSOR_KIND}="colorhug-spectro", ENV{COLORD_SENSOR_CAPS}="lcd"
121
122# Image Engineering EX1
123ATTRS{idVendor}=="2457", ATTRS{idProduct}=="4000", ENV{COLORD_SENSOR_KIND}="ex1", ENV{COLORD_SENSOR_CAPS}="lcd crt ambient"
124
125#########################################################
126
127# Set ID_VENDOR and ID_MODEL acording to VID and PID
128#TEST=="/lib/udev/usb-db", IMPORT{program}="usb-db %p"
129ENV{COLORD_SENSOR_KIND}=="*?", ENV{ID_MODEL}=="", IMPORT{program}="usb_id --export %p"
130ENV{COLORD_SENSOR_KIND}=="*?", ENV{ID_MODEL_FROM_DATABASE}=="", IMPORT{program}="usb-db %p"
131
132# Is a color calibration device. 70-uaccess.rules may use this to set TAG+="uaccess",
133# but there is no way to know if this is the case from here.
134# May also be used by other rules to avoid claiming this device.
135ENV{COLORD_SENSOR_KIND}=="*?", ENV{COLOR_MEASUREMENT_DEVICE}="1"
136
137# Let ConsoleKit udev-acl manage these devices, if it's available.
138# (Except that this stuffs up on Slackware 14.1 because
139#  ConsoleKit/database is present even when ACL is not enabled).
140# Some recent systems no longer use ConsoleKit or ACL_MANAGE - acl is done by systemd ?
141# TEST=="/var/run/ConsoleKit/database", ENV{COLOR_MEASUREMENT_DEVICE}=="*?", ENV{ACL_MANAGE}="1"
142ENV{COLOR_MEASUREMENT_DEVICE}=="*?", ENV{ACL_MANAGE}="1"
143
144# In any case, make color instruments accessible to members of the colord group,
145# which the user may have to add to the system and add themselves to if ACL isn't present.
146ENV{COLOR_MEASUREMENT_DEVICE}=="*?", MODE="660", GROUP="colord"
147
148LABEL="argyll_rules_end"
149