I had the same behaviour on my T60p and X60t, thinkpad-keys using ~2% cpu at all times:
$ uptime ; ps aux | awk '/[t]hinkpad-keys/{print$11,$10}'
12:37:57 up 6 days, 19:39, 1 user, load average: 0.17, 0.14, 0.11
/usr/sbin/thinkpad-keys 189:07
The attached patch bundles the 4 read+seek operations into one (10 byte read),
as well increasing POLL_DELAY to 100ms.
As a result thinkpad-keys drops off the top(1) charts entirely.
Additionally, the Makefile is fixed to forward CFLAGS, and call CC with default -02.
Tested on: T60p, X60t (Feisty, 2.6.20-lowlatency kernel), A30p (Edgy).
The A30p did not exhibit this behaviour, but applying the patch did not do any harm either.
Applies to latest release (0.1-17ubuntu9).
cd hotkey-setup-0.1
patch < hotkey-setup_0.1-17ubuntu9_optimize+CFLAGS.patch
DISCLAIMER: I have no knowledge of the inner workings of /dev/nvram, but this seems to work for me...
Also, this is my first patch here, so constructive criticism are very welcome.
I had the same behaviour on my T60p and X60t, thinkpad-keys using ~2% cpu at all times: keys/{print$ 11,$10} ' sbin/thinkpad- keys 189:07
$ uptime ; ps aux | awk '/[t]hinkpad-
12:37:57 up 6 days, 19:39, 1 user, load average: 0.17, 0.14, 0.11
/usr/
The attached patch bundles the 4 read+seek operations into one (10 byte read),
as well increasing POLL_DELAY to 100ms.
As a result thinkpad-keys drops off the top(1) charts entirely.
Additionally, the Makefile is fixed to forward CFLAGS, and call CC with default -02.
Tested on: T60p, X60t (Feisty, 2.6.20-lowlatency kernel), A30p (Edgy).
The A30p did not exhibit this behaviour, but applying the patch did not do any harm either.
Applies to latest release (0.1-17ubuntu9). setup_0. 1-17ubuntu9_ optimize+ CFLAGS. patch
cd hotkey-setup-0.1
patch < hotkey-
DISCLAIMER: I have no knowledge of the inner workings of /dev/nvram, but this seems to work for me...
Also, this is my first patch here, so constructive criticism are very welcome.