man tpctl (Commandes) - a ThinkPad configuration tool for Linux

NAME

tpctl - a ThinkPad configuration tool for Linux

SYNOPSIS

tpctl [c --h|--help c ] [c --V|--version c ] [c --device=<name> c ] [c --dull c ] [c --quiet c ]

[c --S|--standby|--Z|--suspend|--H|--hibernate c ]

[c --x|--all c ]

[c --ix|--info-all c ]

[c --ib|--info-bios c ]

[c --ic|--info-CMOS-RAM c ]

[c --id|--info-display c ]

[c --io|--info-docking c ]

[c --ip|--info-processor c ]

[c --ir|--info-refresh=<VGA-mode-#> c ]

[c --is|--info-sensor c ]

[c --iU|--info-UltraBay c ]

[c --sx|--setup-all c ]

[c --sdx|--setup-display-all c ]

[c --sdi|--setup-display-internal[=(disable|enable)] c ]

[c --sdc|--setup-display-CRT[=(disable|enable)] c ]

[c --sdt|--setup-display-TV[=(disable|enable)] c ]

[c --sdT|--setup-display-TV-select[=(disable|enable)] c ]

[c --sdm|--setup-display-monitor-detection-ignore[=(disable|enable)] c ]

[c --sd2|--setup-display-dual[=(disable|enable)] c ]

[c --sf |--setup-Fn-hotkey[=(nonsticky|sticky|locked)] c ]

[c --spx|--setup-pointing-device-all c ]

[c --spi|--setup-pointing-device-internal[=(disable|enable|auto)] c ]

[c --spe|--setup-pointing-device-external[=(disable|enable|auto)] c ]

[c --sst|--setup-daylight-saving-time c ]

[c --px|--pm-all c ]

[c --pmx|--pm-mode-all c ]

[c --pma|--pm-mode-AC[=(high|auto|manual)] c ]

[c --pmb|--pm-mode-battery[=(high|auto|manual)] c ]

[c --pmR|--pm-mode-RediSafe|--pm-mode-safe-suspend[=(disable|enable)] c ]

[c --prx|--pm-resume-all c ]

[c --pra|--pm-resume-appointment[=(enable|disable|(daily|<yy>:<mm>:<dd>):<hh>:<mm>:<ss>)] c ]

[c --prh|--pm-resume-hardware[=(disable|enable)] c ]

[c --prl|--pm-resume-lid[=(disable|enable)] c ]

[c --prs|--pm-resume-serial-RI[=(disable|enable)] c ]

[c --psx|--pm-sedation-all c ]

[c --psS|--pm-sedation-standby-timer[=(-|S|Z|R|H|O)] c ]

[c --psZ|--pm-sedation-suspend-or-hibernate-timer[=(-|S|Z|R|H|O)] c ]

[c --psH|--pm-sedation-hibernate-from-suspend-timer[=(-|S|Z|R|H|O)] c ]

[c --psb|--pm-sedation-battery-low[=(-|S|Z|R|H|O)] c ]

[c --pse|--pm-sedation-environment-exhausted[=(-|S|Z|R|H|O)] c ]

[c --psh|--pm-sedation-hardware-or-software[=(-|S|Z|R|H|O)] c ]

[c --psl|--pm-sedation-lid-closure[=(-|S|Z|R|H|O)] c ]

[c --psp|--pm-sedation-power-switch[=(-|S|Z|R|H|O)] c ]

[c --ptx|--pm-timer-mode-all c ]

[c --ptB|--pm-timer-mode-blank-display[=(disable|enable)] c ]

[c --ptS|--pm-timer-mode-standby[=(disable|enable)] c ]

[c --ptZ|--pm-timer-mode-suspend-or-hibernate[=(disable|enable)] c ]

[c --ptd|--pm-timer-mode-drive-powerdown[=(disable|enable)] c ]

[c --pdx|--pm-delay-all c ]

[c --pdH|--pm-delay-hibernate-from-suspend[=<minutes>] c ]

[c --pdZx|--pm-delay-suspend-or-hibernate-all c ]

[c --pdZa|--pm-delay-suspend-or-hibernate-AC-manual[=<minutes>] c ]

[c --pdZb|--pm-delay-suspend-or-hibernate-battery-manual[=<minutes>] c ]

[c --pdZh|--pm-delay-suspend-or-hibernate-high] c ]

[c --pdZu|--pm-delay-suspend-or-hibernate-auto] c ]

[c --rx|--resource-all c ]

[c --rf|--resource-floppy c ]

[c --rp|--resource-parallel[=(<port>|LPT<#>|IRQ<#>|enable|disable)] c ]

[c --rsx|--resource-serial-all c ]

[c --rs1|--resource-serial-1[=(<port>|COM<#>|IRQ<#>|enable|disable|on|off)] c ]

[c --rs2|--resource-serial-2[=(<port>|COM<#>|IRQ<#>|enable|disable)] c ]

DESCRIPTION

tpctl is a configuration and control utility for the IBM ThinkPad series of laptops. tpctl requires device drivers for certain ThinkPad components in the form of loadable kernel modules. These are available in the separate thinkpad package. tpctl is a console interface to these drivers. (The ntpctl program offers a subset of tpctl functionality through an ncurses interface. See the ntpctl man page for details.)

OPTIONS

--help
(or --h) option outputs a usage listing which is designed to be largely self-explanatory.
--dull
option turns off highlighting in the printed output.
--quiet
makes tpctl a bit less verbose.
--device=special
allows setting the ThinkPad kernel device interface to special rather than the default /dev/thinkpad/thinkpad.

Entering standby, suspend, or hibernate states

--standby
(or --S) will make the machine stand by.
--suspend
(or --Z) will suspend the machine. Pressing the Function key will resume operation.
--hibernate
(or --H) will hibernate the machine. Pressing the power switch will resume operation.

Gaining information

--all
(or --x) will output all information and settings available.
--info-all
(or --ix) will output all information. More specific information can be requested with --info-bios (--ib), --info-CMOS-RAM (--ic), --info-display (--id), --info-docking (--io), --info-processor (--ip), --info-sensor (--is) and --info-UltraBay (--iU).
--info-refresh=VGA-mode-number
(or --ir=VGA-mode-number). Information about refresh rates capabilities for particular VGA modes requires that the VGA mode number be provided. Known modes include: 0x100 : 640 x 400 x 8 (256) 0x101 : 640 x 480 x 8 (256) 0x102 : 800 x 600 x 4 (16) 0x103 : 800 x 600 x 8 (256) 0x104 : 1024 x 768 x 4 (16) 0x105 : 1024 x 768 x 8 (256) 0x106 : 1280 x 1024 x 4 (16) 0x107 : 1280 x 1024 x 8 (256) 0x108 : (reserved) 0x109 : 1056 x 350 x 4 (16) 0x10A : 1056 x 473 x 4 (16) 0x10B : (reserved) 0x10C : 1056 x 480 x 4 (16) 0x10D : (reserved) 0x10E : (reserved) 0x10F : (reserved) 0x110 : 640 x 480 x 15 (32K) 0x111 : 640 x 480 x 16 (64K) 0x112 : 640 x 480 x 24 (16M) 0x113 : 800 x 600 x 15 (32K) 0x114 : 800 x 600 x 16 (64K) 0x115 : 800 x 600 x 24 (16M) 0x116 : 1024 x 768 x 15 (32K) 0x117 : 1024 x 768 x 16 (64K) 0x118 : 1024 x 768 x 24 (16M) 0x119 : 1280 x 1024 x 15 (32K) 0x11A : 1280 x 1024 x 16 (64K) 0x11B : 1280 x 1024 x 24 (16M) ... (reserved) 0xA00 : 1600 x 1200 x 4 (16) 0xA01 : 1600 x 1200 x 8 (256) 0xA02 : 1600 x 1200 x 15 (32K) 0xA03 : 1600 x 1200 x 16 (64K) 0xA04 : 1600 x 1200 x 24 (16M) ... (reserved)
--pm-all
(or --px) will output all power management data. More specific information can be requested with: --pm-delay-all (--pdx), --pm-timer-mode-all (--ptx), --pm-resume-all (--prx), --pm-sedation-all (--psx) --pm-delay-suspend-or-hibernate-all (--pdZx) or --pm-mode-all (--pmx)
--setup-all
(or --sx) will output all setup data. More specific information can be requested with --setup-display-all (--sdx) or --setup-pointing-device-all (--spx)
--resource-all
or (--rx) will output all resource (floppy, parallel and serial port) settings. More specific information can be requested with: --resource-floppy (--rf), --resource-parallel (--rp) or --resource-serial-all (--rsx).

Controlling the general setup

--setup-display-internal[=(disable|enable)]
(or --sdi)
--setup-display-CRT[=(disable|enable)]
(or --sdc)
--setup-display-TV[=(disable|enable)]
(or --sdt)
--setup-display-TV-select[=(disable|enable)]
(or --sdT)
--setup-display-monitor-detection-ignore[=(disable|enable)]
(or --sdm)
--setup-display-dual[=(disable|enable)]
(or --sd2)
--setup-Fn-hotkey[=(nonsticky|sticky|locked)]
(or --sf )
--setup-daylight-saving-time
(or --sst)

Controlling the pointing devices

--setup-pointing-device-all
(or --spx) causes tpctl to output the current settings of the internal and external pointing devices.
--setup-pointing-device-internal
(or --spi) will restrict the output to just the internal pointing device.
--setup-pointing-device-external
or (--spe) will restrict the output to just the external pointing device.

These latter flags can be used to alter the settings, using e.g. --spi=keyword where keyword is one of enable, disable or auto.

If you boot with the internal pointing device in "auto-disable" mode then the TrackPoint will not work when you start X. However on my ThinkPad 600 I can "tpctl --spi=enable" prior to starting X windows and this allows use of both external and internal pointing devices.

You may want to stick with auto-disable mode if you have a wheel mouse, however: the wheels on some wheel mice work with X windows, but only if the TrackPoint is disabled. Please let me know if you manage to get a wheel-mouse wheel working simultaneously with the TrackPoint!

Controlling the power management functions

--pm-mode-AC=arg
(--pma=arg) where arg is high, auto or manual
--pm-mode-battery=arg
(--pmb=arg) where arg is high, auto or manual
--pm-mode-RediSafe|--pm-mode-safe-suspend=arg
(--pmR=arg) where arg is disable or enable
--pm-resume-appointment=arg
(--pra=arg) where arg is [=(enable|disable|(daily|<yy>:<mm>:<dd>):<hh>:<mm>:<ss>)]
--pm-resume-hardware=arg
(--prh=arg) where arg is disable or enable
--pm-resume-lid=arg
(--prl=arg) where arg is disable or enable
--pm-resume-serial-RI=arg
(--prs=arg) where arg is disable or enable
--pm-sedation-standby-timer=arg
(--psS=arg) where arg is is one of - S Z R H or O where these mean: -: disable S: standby Z: suspend R: safely suspend (RediSafe) H: hibernate O: power off
--pm-sedation-suspend-or-hibernate-timer=arg
(--psZ=arg)
--pm-sedation-hibernate-from-suspend-timer=arg
(--psH=arg)
--pm-sedation-battery-low=arg
(--psb=arg)
--pm-sedation-environment-exhausted=arg
(--pse=arg)
--pm-sedation-hardware-or-software=arg
(--psh=arg)
--pm-sedation-lid-closure=arg
(--psl=arg)
--pm-sedation-power-switch=arg
(--psp=arg)
--pm-timer-mode-blank-display=arg
(--ptB=arg) where arg is disable or enable
--pm-timer-mode-standby=arg
(--ptS=arg) where arg is disable or enable
--pm-timer-mode-suspend-or-hibernate=arg
(--ptZ=arg) where arg is disable or enable
--pm-timer-mode-drive-powerdown=arg
(--ptd=arg) where arg is disable or enable
--pm-delay-hibernate-from-suspend=arg
(--pdH=arg) where arg is <minutes>
--pm-delay-suspend-or-hibernate-AC-manual=arg
(--pdZa=arg) where arg <minutes>
--pm-delay-suspend-or-hibernate-battery-manual=arg
(--pdZb=arg) where arg <minutes>
--pm-delay-suspend-or-hibernate-high]
(--pdZh)
--pm-delay-suspend-or-hibernate-auto]
(--pdZu) <YY:<MM>:<DD>:<HH>:<MM>:<SS> or daily:<HH>:<MM>:<SS> or d:<HH>:<MM>:<SS> '<SS>' etc. should be pairs of digits signifying the year, month, day, hour, minute and second of the appointment.

Controlling the resource settings

--resource-parallel=arg
(--rp=arg) where arg is one of <port> LPT<#> IRQ<#> enable or disable)

<port> is a hardware I/O address, e.g., '0x3f8'

--resource-serial-1=arg
(--rs1=arg where arg is one of <port> COM<#> IRQ<#> enable disable on or off))
--resource-serial-2=arg
(--rs2=arg where arg is one of <port> COM<#> IRQ<#> enable or disable

Note that the --r** options cause tpctl to talk directly to hardware. They do not change settings stored in nonvolatile RAM. Therefore your changes will be lost on power-off. To make nonvolatile changes, use the setpnp utility.

These options have not been tried out on every model of ThinkPad; but they work on many.

Here is an example of a session in which I first moved my serial port 1 from 0x3e8 irq4 to 0x2f8 irq3, and then enabled serial port 2 at 0x3e8 irq4. Please read the man page for the "setserial" command for more information. On my ThinkPad 600, serial port 1 is connected to the DB-9 on the back of the machine; serial port 2 is connected to the infrared interface.

[root@myhost]# setserial /dev/ttyS1 auto_irq autoconfig ; setserial /dev/ttyS2 auto_irq autoconfig ; setserial /dev/ttyS1 ; setserial /dev/ttyS2

ttyS1, UART: unknown, Port: 0x02f8, IRQ: 3

ttyS2, UART: 16550A, Port: 0x03e8, IRQ: 4

[root@myhost]# tpctl -rs1=0x2f8 -rs1=irq3

tpctl: serial port 1 interrupt has been set to IRQ3

tpctl: serial port 1 base address has been set to 0x2f8

resource current state:

serial port 1: enabled COM1 0x2f8 IRQ3

[root@myhost]# setserial /dev/ttyS1 auto_irq autoconfig ; setserial /dev/ttyS2 auto_irq autoconfig ; setserial /dev/ttyS1 ; setserial /dev/ttyS2

ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3

ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4

[root@myhost]# tpctl -rs2=0x3e8 -rs2=irq4 -rs2=enable

tpctl: serial port 2 has been enabled

tpctl: serial port 2 interrupt has been set to IRQ4

tpctl: serial port 2 base address has been set to 0x3e8

resource current state:

serial port 2: enabled COM2 0x3e8 IRQ4

[root@myhost]# setserial /dev/ttyS1 auto_irq autoconfig ; setserial /dev/ttyS2 auto_irq autoconfig ; setserial /dev/ttyS1 ; setserial /dev/ttyS2

ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3

ttyS2, UART: 16550A, Port: 0x03e8, IRQ: 4

General

Note that at the present time all the options can be given with a single dash.

You can give as many different options as you like, including multiple instances of an option with different arguments: e.g., tpctl --rs1=enable --rs1=irq5

SECURITY

The user requires write permission on the device file in order to change settings or to "sedate" the machine. This means that it is safe to allow a normal user to execute tpctl or ntpctl, so long as he or she doesn't have write permission on the device file.

FILES

/dev/thinkpad
This is a directory containing the following special device files:
/dev/thinkpad/thinkpad
Special device file (char, major 10, minor 170) through which ThinkPad devices are controlled
/dev/thinkpad/smapi
Special device file through which the SMAPI BIOS may be accessed
/dev/thinkpad/superio
Special device file through which the Super I/O chip may be controlled
/dev/thinkpad/rtcmosram
Special device file through which the RT CMOS RAM chip may be controlled
/dev/thinkpad/thinkpadpm
Special device file through which certain ThinkPad power management actions may be performed

BUGS

None known.

AUTHOR

tpctl was written by Thomas Hood and Bill Mair.

This man page was written by Adrian Bridgett and Thomas Hood.

SEE ALSO