Samsung SyncMaster 173P plus, 193P plus Specifications

DDCcontrol Documentation
Nicolas Boichat
DDCcontrol Documentation
Nicolas Boichat
Copyright © 2005-2006 Nicolas Boichat
Abstract
Documentation for DDCcontrol version 0.4.
Table of Contents
1. About DDCcontrol ............................................................................................................. 1
About DDCcontrol ........................................................................................................ 1
DDC/CI ...................................................................................................................... 1
2. Install notes ...................................................................................................................... 2
Software Requirement .................................................................................................... 2
Download the sources .................................................................................................... 2
Compile and install ........................................................................................................ 2
Configure /dev/i2c-* devices .................................................................................... 2
Kernel configuration options ................................................................................... 3
3. Usage .............................................................................................................................. 4
GTK+ GUI .................................................................................................................. 4
Gnome panel applet ....................................................................................................... 4
Command line tool ........................................................................................................ 4
Usage example ..................................................................................................... 4
A. Report problems and successes ............................................................................................ 6
B. Supported monitors ........................................................................................................... 7
C. Supported graphics cards .................................................................................................... 9
ATI Radeon series ......................................................................................................... 9
Direct PCI memory access support ........................................................................... 9
/dev/i2c-* devices support ................................................................................ 9
nVidia ........................................................................................................................10
Direct PCI memory access support ..........................................................................10
/dev/i2c-* devices support ...............................................................................10
Intel ...........................................................................................................................11
i810/i815/i830/i845/i855/i865/i915/i945 with Integrated Graphics Controller ..................11
SiS ............................................................................................................................11
VIA ...........................................................................................................................11
Matrox .......................................................................................................................12
G200/G400/G450/G550 series ................................................................................12
D. Thanks ...........................................................................................................................13
E. Documents for developers ..................................................................................................14
Monitor database structure .............................................................................................14
Control list ..........................................................................................................14
Monitor Profiles ...................................................................................................15
Profile file structure ......................................................................................................16
F. GNU General Public License ..............................................................................................18
Preamble ....................................................................................................................18
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION .......19
How to Apply These Terms to Your New Programs ............................................................22
iv
Chapter 1. About DDCcontrol
About DDCcontrol
DDCcontrol is a tool used to control monitor parameters, like brightness and contrast, without using
the OSD (On Screen Display) and the buttons in front of the monitor.
All the software provided by monitor manufacturers (NEC/Mitsubishi NaviSet and Samsung MagicTune) are closed-source and only runs on Windows. DDCcontrol is open-source and runs on Linux.
There is two versions of this tool, a command line version, and an user-friendly Gnome GUI.
DDC/CI
DDC/CI is a protocol designed by VESA to configure monitor by software, using two wires on the
VGA or DVI cables, which forms an I2C bus.
1
Chapter 2. Install notes
Software Requirement
To compile and run DDCcontrol, you need to have these packages installed:
•
libxml2 [http://www.xmlsoft.org/]
•
pci-utils [http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml]
•
gtk+>=2.4 [http://www.gtk.org/]
In addition to the library packages, you also need the development packages, which are not usually
installed. For example, on Debian, their names are libxml2-dev, pciutils-dev and
libgtk2.0-dev. Others distributions probably have similar packages names.
Note
You don't need pci-utils if you don't use direct PCI memory access, and you don't need gtk+ if you
don't plan to use the Gnome GUI. Usually, this is not the case, so you will need these packages.
Download the sources
Go to the download section [http://sourceforge.net/project/showfiles.php?group_id=117933] of
ddccontrol project's page and download the latest ddccontrol and ddccontrol-db source tarballs.
Then unpack these two archives with:
# tar xvfz ddccontrol-X.Y.tar.gz
# tar xvfz ddccontrol-db-YYYYMMDD.tar.gz
You should now have two directories, ddccontrol and ddccontrol-db.
Compile and install
To compile and install the source tarballs, type:
# ./configure
# make
# su root
Password: <root password>
# make install
You need to do this in ddccontrol and ddccontrol-db directories.
If you set the --prefix parameter when configuring one package, you must set it to the same
value when configuring the other.
Configure /dev/i2c-* devices
Note
/dev/i2c-* devices are only working with kernel 2.6 or greater.
If your graphics card is supported by /dev/i2c-* devices (see Appendix C, Supported graphics
cards), you must load the i2c-dev module by typing, as root:
2
Install notes
# modprobe i2c-dev
You must also load your graphics card framebuffer driver (for card-specific instructions see Appendix C, Supported graphics cards).
If you want to automatically load these modules when Linux starts, see your distribution's documentation.
On systems not using devfs, even after loading framebuffer and i2c-dev modules, the devices /
dev/i2c/* or /dev/i2c-* does not exists. On Debian, these devices are created using this
command :
# /sbin/MAKEDEV i2c
To allow standard (i.e. non-root) users to use DDCcontrol, you must change permissions on /
dev/i2c-*. This is done by typing, as root:
# chmod a+rw /dev/i2c-*
Kernel configuration options
If i2c-dev or your graphics card's framebuffer modules are not available with your kernel, you
can build your own kernel with the following options turned on (with recommend to build them as
modules):
•
Devices drivers->I2C support.
•
Devices drivers->I2C support->I2C device interface.
•
Devices drivers->Graphics support->Framebuffer support.
•
and a specific driver for your graphic card (see Appendix C, Supported graphics cards).
3
Chapter 3. Usage
GTK+ GUI
If GTK+>=2.4 is installed on your computer, the configure process will detect it, and build the
GTK+ application.
The GTK+ GUI is designed to be user-friendly, so it should be easy to use it. To launch this GUI,
simply type:
# gddccontrol
Gnome panel applet
If Gnome>=2.10 is installed on your computer, the configure process will detect it, and build the
Gnome panel applet.
The Gnome panel applet is useful to switch between different monitor profiles created with the
GTK+ GUI. To add it to your Gnome Panel, simply right-click on the panel, choose “Add to Panel”,
and select “Monitor Profile Switcher”.
Command line tool
The command line tool is useful for debugging purpose, and to create automatic scripts.
Note
We won't present everything you can do with ddccontrol, if you want more information, type:
# ddccontrol -h
Usage example
This example explains how to list all available controls and then change the brightness parameter.
List available controls
To list available controls, type:
# ddccontrol -p
This probes for available monitors, then takes the first probed monitor and lists controls supported
by it. This should give you an output like this (this example uses a Samsung Syncmaster 173P and a
nVidia GeForce FX 5700):
ddccontrol version 0.1
Copyright 2004 Oleg I. Vdovikin (oleg-at-cs.msu.su)
Copyright 2004 Nicolas Boichat (nicolas-at-boichat.ch)
This program comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of this program under the terms of the GNU General
Public License.
Device : pci:01:00.0-0
Error while reading write message answer: Bad message
Reading EDID 0x50 failed.
Device : pci:01:00.0-1
Device : pci:01:00.0-2
Detected monitors :
4
Usage
- Device : pci:01:00.0-1
DDC/CI supported : Yes
Monitor Name : Samsung SyncMaster 173P (DVI)
Input type : Digital
(Automatically selected)
- Device : pci:01:00.0-2
DDC/CI supported : Yes
Monitor Name : NEC Multisync 2080UX+
Input type : Analog
Reading EDID and initializing DDC/CI at bus pci:01:00.0-1...
Device : pci:01:00.0-1
EDID readings:
Plug and Play ID: SAM00E2 [Samsung SyncMaster 173P (DVI)]
Input type: Digital
= Samsung SyncMaster 173P (DVI)
> Color settings
> Brightness and Contrast
> id=brightness, name=Brightness, address=0x10, delay=-1ms, type=0
supported, value=55, maximum=100
> id=contrast, name=Contrast, address=0x12, delay=-1ms, type=0
supported, value=60, maximum=100
> id=magicbright, name=Magic Bright Mode, address=0xdc, delay=-1ms, type=2
Possible values:
> id=text - name=Text, value=1
> id=internet - name=Internet, value=2
> id=entertain - name=Entertain, value=3
> id=custom - name=Custom, value=4
supported, value=4, maximum=4
> Others
> Restore defaults
> id=defaults, name=Restore Factory Defaults, address=0x4, delay=-1ms, type=1
Possible values:
> id=default - name=Restore Factory Defaults, value=1
supported, value=0, maximum=1
> id=defaultluma, name=Restore Brightness and Contrast, address=0x5,
delay=-1ms, type=1
Possible values:
> id=default - name=Restore Brightness and Contrast, value=1
supported, value=0, maximum=1
> id=settings, name=Settings, address=0xb0, delay=-1ms, type=1
Possible values:
> id=store - name=Save Current Settings, value=1
> id=restorefactory - name=Restore Factory Settings, value=2
supported, value=0, maximum=2
> Input settings
> id=inputsource, name=Input Source Select, address=0x60, delay=-1ms, type=2
Possible values:
> id=analog - name=Analog, value=1
> id=digital - name=Digital, value=3
supported, value=3, maximum=3
> Power control
> id=dpms, name=DPMS Control, address=0xd6, delay=-1ms, type=2
Possible values:
> id=on - name=On, value=1
> id=standby - name=Standby, value=4
supported, value=1, maximum=4
Change the brightness
The lines concerning brightness in the available controls list are:
> id=brightness, name=Brightness, address=0x10, delay=-1ms, type=0
supported, value=55, maximum=100
The important elements are address (here: 0x10), current value (55) and maximum value (100).
To change the brightness value to 70/100, type:
ddccontrol -p -r 0x10 -w 70
The last lines of the output should be:
Writing 0x10, 0x46(70)...
Control 0x10: +/70/100 [Brightness]
5
Appendix A. Report problems and
successes
If you have problems building or running DDCcontrol, if your monitor doesn't work with DDCcontrol, or if your graphics card is not listed in the Appendix C, Supported graphics cards, please write
a
message
to
ddccontrol-users@lists.sourceforge.net
[mailto:ddccontrol-users@lists.sourceforge.net].
For more informations on ddccontrol mailing lists, see the sourceforge project page
[http://sourceforge.net/mail/?group_id=117933].
6
Appendix B. Supported monitors
The following monitors are supported by DDCcontrol:
Dell
•
Dell 1704FPT (DVI input)
•
Dell 2005FPW
•
Dell 2405FPW
Fujitsu Siemens
•
P17-2
•
P19-2
•
P20-2 (VGA and DVI inputs)
Mitsubishi
•
Diamond Plus 92
•
Diamond Pro 2060u (VGA input B only)
•
Diamond Pro 2070sb
•
Multisync 2080UX+ (VGA and DVI inputs)
NEC
Samsung
•
SyncMaster 171P (VGA input only)
•
SyncMaster 173P (VGA and DVI inputs)
•
SyncMaster 173P Plus
•
SyncMaster 173T (VGA input only)
•
SyncMaster 174T (at least DVI input)
•
SyncMaster 193P (VGA and DVI inputs)
•
SyncMaster 193P Plus (VGA and DVI inputs)
7
Supported monitors
•
SyncMaster 701T
•
SyncMaster 710T
•
SyncMaster 710TM
•
SyncMaster 712N (at least VGA input)
•
SyncMaster 730BF
•
SyncMaster 760BF
•
SyncMaster 910T
•
SyncMaster 912N (at least VGA input)
•
SyncMaster 920N (at least VGA input)
•
SyncMaster 913V
•
SyncMaster 930BF (at least VGA input)
•
SyncMaster 960BF (VGA and DVI inputs)
•
SyncMaster 970P (VGA and DVI inputs)
•
SyncMaster 997MB
•
GDM-5410 (Sony OEM)
SUN
Your monitor is not on this list?
If your monitor is not on this list, and so doesn't work with DDCcontrol, but you think that it supports the DDC/CI protocol, please run this command:
LANG= LC_ALL= ddccontrol -p -c -d
And send the output to one of the DDCcontrol mailing lists (see Appendix A, Report problems and
successes).
8
Appendix
cards
C.
Supported
graphics
/dev/i2c-* versus PCI memory
To control a monitor, DDCcontrol must access to the I2C bus of the graphics card. There are two
methods to do so: the first one uses /dev/i2c-* devices provided by kernel drivers (abbreviated
by dev in tables), the second one reads and writes directly in the card PCI memory (abbreviated by
PCI in the tables).
Depending on your hardware, one method or the other works, or even both.
ATI Radeon series
Direct PCI memory access support
Almost every ATI cards should work with direct PCI memory access, even if it has not been very
extensively tested.
To use it, you have nothing special to do, everything is done by DDCcontrol.
/dev/i2c-* devices support
ATI Radeon cards also work with /dev/i2c-* devices. To use /dev/i2c-* devices with ATI
cards, you must load the radeonfb module by typing, as root:
# modprobe radeonfb
The kernel configuration options needed to enable Radeon framebuffer driver and I2C support are:
•
Devices drivers->Graphics support->Framebuffer support->ATI Radeon display support.
•
Devices drivers->Graphics support->Framebuffer support->ATI Radeon display support>DDC/I2C for ATI Radeon support.
Warning
The radeonfb kernel module may cause system instability (crashes or screen corruption)
when used at the same time as used the ATI closed source drivers.
This is why we recommend that you use direct PCI memory access with ATI cards.
ATI cards support table
These ATI cards have been reported to work, but others models should also work. If yours is not listed, please send a message to one of the DDCcontrol mailing lists (see Appendix A, Report problems and successes).
Name
Works
dev
PCI
Radeon 7000
Yes
???
Radeon 7500
Yes
???
Radeon 9200
Yes
Yes
9
Supported graphics cards
Works
Name
dev
PCI
Radeon 9200 SE
???
Yes
Radeon 9500
Yes
???
Radeon 9550 SE
Yes
???
Radeon 9600 Pro
Yes
???
Radeon 9700
Yes
???
Radeon 9800 Pro
Yes
Yes
nVidia
Direct PCI memory access support
Almost every nVidia cards work with direct PCI memory access, and this method is compatible
with the nVidia proprietary drivers.
To use it, you have nothing special to do, everything is done by DDCcontrol.
/dev/i2c-* devices support
Note
To use /dev/i2c-* devices with nVidia cards, you must have a rather recent kernel (at least version 2.6.9).
Most nVidia cards, starting with TNT, but excluding the most recent GeForce FX series, work with
/dev/i2c-* devices. To use them, you must load the rivafb module by typing, as root:
# modprobe rivafb
The kernel configuration options needed to enable nVidia framebuffer and I2C support are:
•
Devices drivers->Graphics support->Framebuffer support->nVidia Riva support.
•
Devices drivers->Graphics support->Framebuffer support->nVidia Riva support->Enable DDC
Support.
Warning
The rivafb kernel module is not compatible with the binary nVidia X drivers, which are the only
drivers for nVidia cards to provide 3D acceleration.
This is why we recommend that you use direct PCI memory access with nVidia cards.
nVidia cards support table
Most of these nVidia cards have been reported to work, but others models should also work. If yours
is not listed, please send a message to one of the DDCcontrol mailing lists (see Appendix A, Report
problems and successes).
Name
Works
dev
PCI
GeForce Ti 200
Yes
Yes
GeForce FX 5600
No
Yes
10
Supported graphics cards
Works
Name
dev
PCI
GeForce FX 5700
No
Yes
GeForce FX 5700 LE
???
Yes
GeForce FX 5950 Ultra
???
Yes
GeForce 6200 TC
???
Yes
GeForce 6600
???
Yes
GeForce 6800 GT
???
Yes
nForce 2 IGP
No
No
Intel
i810/i815/i830/i845/i855/i865/i915/i945 with Integrated
Graphics Controller
Intel integrated graphics controllers only work with direct PCI memory access, so you don't have to
have any kernel module built or loaded.
Intel chipset support table
These Intel chipsets have been reported to work. If yours is not listed, please send a message to one
of the DDCcontrol mailing lists (see Appendix A, Report problems and successes).
Works
Name
dev
PCI
Intel i915G (82915G)
No
Yes
Intel i865G (82865G)
No
Yes
SiS
SiS graphics controllers only work with direct PCI memory access, so you don't have to have any
kernel module built or loaded.
SiS chipset support table
These SiS chipsets have been reported to work. If yours is not listed, please send a message to one
of the DDCcontrol mailing lists (see Appendix A, Report problems and successes).
Works
Name
SiS
[M]661xX/[M]741[GX]/[M]760
PCI/AGP VGA Adapter
dev
PCI
No
Yes
VIA
VIA graphics controllers only work with direct PCI memory access, so you don't have to have any
kernel module built or loaded.
11
Supported graphics cards
VIA chipset support table
These VIA chipsets have been reported to work. If yours is not listed, please send a message to one
of the DDCcontrol mailing lists (see Appendix A, Report problems and successes).
Works
Name
dev
PCI
VIA VT8623 [Apollo CLE266] integrated CastleRock graphics
No
Yes
VIA S3 Unichrome Pro VGA Adapter
No
Yes
Matrox
G200/G400/G450/G550 series
Matrox cards only work with /dev/i2c-* devices. To use them, you must load both matroxfb
and i2c-matroxfb modules by typing, as root:
# modprobe matroxfb
# modprobe i2c-matroxfb
The kernel configuration options needed to enable Matrox framebuffer driver and I2C support are,
at least:
•
Devices drivers->Graphics support->Framebuffer support->Matrox acceleration.
•
Devices
drivers->Graphics
support->Framebuffer
>G100/G200/G400/G450/G550 support.
•
Devices drivers->Graphics support->Framebuffer support->Matrox acceleration->Matrox I2C
support.
support->Matrox
acceleration-
Matrox cards support table
These Matrox cards have been reported to work. If yours is not listed, please send a message to one
of the DDCcontrol mailing lists (see Appendix A, Report problems and successes).
Name
Works
dev
PCI
Matrox G200 AGP
No
No
Matrox G450 AGP
Yes
No
12
Appendix D. Thanks
Thanks to Oleg I. Vdovikin, for his work which was used as a basis for ddccontrol, and for his help
when designing the XML database.
Thanks to Christian Schilling, for his nice additions to the Gnome GUI, and for the Gnome panel
applet.
Thanks to William Hollingworth, of NEC/Mitsubishi, for his constant help and support to this
project.
Thanks to Chernyavskyy Valentin, for testing Intel graphics chipset support.
Thanks to Johannes Deisenhofer, for providing a patch to add VIA and SiS graphics chipset support.
Thanks to all users that reported if DDCcontrol works on their hardware.
Thanks to various people on mailing-lists (X.org, fbdevel...), for their help, in particular Jon Smirl,
on the X.org list, who guided me in the direction of using the kernel framebuffer driver.
13
Appendix
developers
E.
Documents
for
Monitor database structure
The monitor database is written in XML, it can be found in the db directory of ddccontrol-db
package.
This directory contains the following files:
•
options.xml
•
monitor/%monitor_id%.xml
Control list
XML file: options.xml
control elements (e.g. “brightness”) are contained in group elements (e.g. “color
settings”). group and subgroup elements allow the GUI to separate the controls in different
branches on the tree.
options attributes:
•
date: indicates the release date of the current database (YYYYMMDD format).
•
dbversion: indicates which version of database format is used (must be set to 3).
group attributes:
•
name: full English group name.
subgroup attributes:
•
name: full English subgroup name.
•
pattern: name of the fullscreen pattern gddccontrol must display to help the user to adjust subgroup's controls (optional). For possible values, see ddccontrol/
src/gddccontrol/fspatterns.c.
control attributes:
•
id: abbreviated control name.
•
name: full English control name.
•
address: DDC/CI address (optional).
•
type: one of these values:
•
“value”: The control accepts values in a continuous range (e.g. brightness).
14
Documents for developers
•
•
“command”: An action occurs when the value is set to something greater than “0” (e.g.
degauss). If you don't define any value element in a command control, the default value
“0x01” will be used.
•
“list”: The control accepts a list of values (e.g. OSD language).
refresh (only for list and command controls): Set whether other controls must be refreshed
after changing list value or running the command associated with the control (optional). Possible
values:
•
“none”: Do not refresh anything. (default)
•
“all”: Refresh all controls.
value attributes:
•
id: abbreviated value name.
•
name: full English value name (it is not needed if there is only one value for command controls).
•
value: DDC/CI control value (optional).
File format:
<?xml version="1.0"?>
<options date="%date%" dbversion="3">
<group name="%groupname%">
<subgroup name="%subgroupname%" pattern="%patternname%">
<control id="%control_id%" type="value" name="%control_name%"
address="%hex_address%"/>
<!-- Command using the default 0x01 address -->
<control id="%control_id%" type="command" name="%control_name%"
address="%hex_address%"/>
<control id="%control_id%" type="command" name="%control_name%"
address="%hex_address%">
<value id="%value_id%" value="%hex_value%"/>
</control>
<control id="%control_id%" type="list" name="%control_name%"
address="%hex_address%">
<value id="%value_id%" name="%value_name%" value="%hex_value%"/>
<value...>
</control>
<control ...>
</subgroup>
</group>
<group ...>
</options>
Monitor Profiles
XML files: monitor/%monitor_id%.xml
caps element
The caps attribute is optional. Its format is defined in ACCESS.bus specifications.
To add controls to caps, use the add attribute. To remove controls from caps, use the remove attribute.
Note remove is handled before add, so if you remove and add a same control, it will finally be in
caps.
controls element
15
Documents for developers
List of controls supported by a monitor (optional if you have an include element).
control id attributes are defined in options.xml. If control type is “list” or
“command” without default values, supported values must be defined.
address attribute for control elements and value attribute for value elements are optional if
they are defined in the general options file.
The init attribute in monitor element define the type of the initialization: DDC/CI standard
(“standard”), or Samsung (“samsung”). This attribute is optional, as long as the monitor profile includes another profile which defines this attribute.
You can set a delay attribute in control elements to set the time in milliseconds to wait after
changing the value of this control. If you don't, a default value is used.
include element
Includes another monitor, manufacturer or standard profile, specified by the file attribute.
Note
Monitor profile are read sequentially. Control and init mode redifinitions are ignored, so define specific controls and init mode before including a generic profile. Caps are also treated sequentially, so
if a control is not in CAPS at the time it is defined, it won't be supported by ddccontrol.
File format:
<?xml version="1.0"?>
<monitor name="%full_monitor_name%" init="[standard|samsung]">
<caps add="%add_caps%" remove="%remove_caps%"/>
<controls>
<!--- value -->
<control id="%control_id%" address="%hex_address%" delay="%wait_time%"/>
<!--- command using a default 0x01 value-->
<control id="%control_id%" address="%hex_address%" delay="%wait_time%"/>
<!--- command -->
<control id="%control_id%" address="%hex_address%" delay="%wait_time%">
<value id="activate" value="%hex_value%"/>
</control>
<!--- list -->
<control id="%control_id%" address="%hex_address%" delay="%wait_time%">
<value id="%value_id%" value="%hex_value%"/>
<value...>
</control>
<control...>
</controls>
<!--- Including VESA generic profile is generally a good idea. -->
<include file="VESA"/>
</monitor>
If a monitor supports exactly the same controls as another one, you can define it as shown:
<?xml version="1.0"?>
<monitor name="%full_monitor_name%">
<caps add="%add_caps%" remove="%remove_caps%"/>
<include file="%include_monitor_id%"/>
</monitor>
Profile file structure
Profile files are used to save the value of some controls.
profile attributes:
•
pnpid: indicates the PNP id of the monitor that this profile applies to.
•
name: profile name.
16
Documents for developers
•
version: indicates which version of profile format is used (must be set to 1).
control attributes:
•
address: DDC/CI address of the control.
•
value: DDC/CI control value.
File format:
<?xml version="1.0"?>
<profile pnpid="%pnp_id%" name="%profile_name%" version="1">
<control address="%hex_address%" value="%control_value%"/>
<control...>
</profile>
17
Appendix F. GNU General Public
License
Version 2, June 1991
Copyright © 1989, 1991 Free Software Foundation, Inc.
Free Software Foundation, Inc.
59 Temple Place, Suite 330,
Boston,
MA
02111-1307
USA
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing
it is not allowed.
Version 2, June 1991
Preamble
The licenses for most software are designed to take away your freedom to share and change it. By
contrast, the GNU General Public License is intended to guarantee your freedom to share and
change free software - to make sure the software is free for all its users. This General Public License
applies to most of the Free Software Foundation's software and to any other program whose authors
commit to using it. (Some other Free Software Foundation software is covered by the GNU Library
General Public License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software
(and charge for this service if you wish), that you receive source code or can get it if you want it,
that you can change the software or use pieces of it in new free programs; and that you know you
can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to
ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give
the recipients all the rights that you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their rights.
We protect your rights with two steps:
1.
copyright the software, and
2.
offer you this license which gives you legal permission to copy, distribute and/or modify the
software.
Also, for each author's protection and ours, we want to make certain that everyone understands that
there is no warranty for this free software. If the software is modified by someone else and passed
on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger
that redistributors of a free program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any patent must be licensed for
18
GNU General Public License
everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS FOR COPYING,
DISTRIBUTION AND MODIFICATION
Section 0
This License applies to any program or other work which contains a notice placed by the copyright
holder saying it may be distributed under the terms of this General Public License. The "Program",
below, refers to any such program or work, and a “work based on the Program ” means either the
Program or any derivative work under copyright law: that is to say, a work containing the Program
or a portion of it, either verbatim or with modifications and/or translated into another language.
(Hereinafter, translation is included without limitation in the term “modification ”.) Each licensee is
addressed as “you”.
Activities other than copying, distribution and modification are not covered by this License; they are
outside its scope. The act of running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the Program (independent of having been
made by running the Program). Whether that is true depends on what the Program does.
Section 1
You may copy and distribute verbatim copies of the Program's source code as you receive it, in any
medium, provided that you conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and
to the absence of any warranty; and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer
warranty protection in exchange for a fee.
Section 2
You may modify your copy or copies of the Program or any portion of it, thus forming a work based
on the Program, and copy and distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
1.
You must cause the modified files to carry prominent notices stating that you changed the files
and the date of any change.
2.
You must cause any work that you distribute or publish, that in whole or in part contains or is
derived from the Program or any part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
3.
If the modified program normally reads commands interactively when run, you must cause it,
when started running for such interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a notice that there is no warranty
(or else, saying that you provide a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this License.
Exception:
If the Program itself is interactive but does not normally print such an announcement, your
work based on the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If identifiable sections of that work are
19
GNU General Public License
not derived from the Program, and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those sections when you distribute them
as separate works. But when you distribute the same sections as part of a whole which is a work
based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of
who wrote it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely
by you; rather, the intent is to exercise the right to control the distribution of derivative or collective
works based on the Program.
In addition, mere aggregation of another work not based on the Program with the Program (or with a
work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
Section 3
You may copy and distribute the Program (or a work based on it, under Section 2 in object code or
executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
1.
Accompany it with the complete corresponding machine-readable source code, which must be
distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
2.
Accompany it with a written offer, valid for at least three years, to give any third party, for a
charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
3.
Accompany it with the information you received as to the offer to distribute corresponding
source code. (This alternative is allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for making modifications to it.
For an executable work, complete source code means all the source code for all modules it contains,
plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that
component itself accompanies the executable.
If distribution of executable or object code is made by offering access to copy from a designated
place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with
the object code.
Section 4
You may not copy, modify, sublicense, or distribute the Program except as expressly provided under
this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void,
and will automatically terminate your rights under this License. However, parties who have received
copies, or rights, from you under this License will not have their licenses terminated so long as such
parties remain in full compliance.
Section 5
You are not required to accept this License, since you have not signed it. However, nothing else
grants you permission to modify or distribute the Program or its derivative works. These actions are
20
GNU General Public License
prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so,
and all its terms and conditions for copying, distributing or modifying the Program or works based
on it.
Section 6
Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject
to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties
to this License.
Section 7
If, as a consequence of a court judgment or allegation of patent infringement or for any other reason
(not limited to patent issues), conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not excuse you from the conditions
of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could
satisfy both it and this License would be to refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the
balance of the section is intended to apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right
claims or to contest validity of any such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is implemented by public license practices.
Many people have made generous contributions to the wide range of software distributed through
that system in reliance on consistent application of that system; it is up to the author/donor to decide
if he or she is willing to distribute software through any other system and a licensee cannot impose
that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of
this License.
Section 8
If the distribution and/or use of the Program is restricted in certain countries either by patents or by
copyrighted interfaces, the original copyright holder who places the Program under this License may
add an explicit geographical distribution limitation excluding those countries, so that distribution is
permitted only in or among countries not thus excluded. In such case, this License incorporates the
limitation as if written in the body of this License.
Section 9
The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies a version number of
this License which applies to it and "any later version", you have the option of following the terms
and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version
ever published by the Free Software Foundation.
Section 10
21
GNU General Public License
If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by
the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
Section 11 NO WARRANTY
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT
WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS
WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
Section 12
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING
BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO
OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY
HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible use to the public, the
best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each
source file to most effectively convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name
of author>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU
General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if
not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
22
GNU General Public License
If the program is interactive, make it output a short notice like this when it starts in an interactive
mode:
Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome
to redistribute it under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General
Public License. Of course, the commands you use may be called something other than `show w' and
`show c'; they could even be mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your school, if any, to sign a
"copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes
passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice
This General Public License does not permit incorporating your program into proprietary programs.
If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public
License instead of this License.
23