FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Laptop

 
 
LinkBack Thread Tools
 
Old 11-16-2008, 05:38 AM
James Robertson
 
Default Thinkpad R61 Keys- Debian Lenny

I have a Lenovo Thinkpad R61.

I'm running Debian Lenny with a minimal install of XFCE and selected
"laptop" at the tasksel option in the installer and nothing else
(installed xorg, xfce, etc afterward).


The Brightness and Volume/Mute keys do not work and I have researched
how to get them operating but the options I have found all offer
slightly different ways to do it. Hibernate, Thinkpad light works ok.


In Xubuntu 8.10 the keys all work without any post install config
needed. Does anyone know what packages/config that Ubuntu uses to
achieve this? I have booted the Xubuntu Live CD and looked around but
cannot figure it out.



Thanks


--
To UNSUBSCRIBE, email to debian-laptop-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 11-16-2008, 05:10 PM
Bob Proulx
 
Default Thinkpad R61 Keys- Debian Lenny

James Robertson wrote:
> I have a Lenovo Thinkpad R61.

I have a T42. It is similar. But it is also slightly different. Let
me give a warning that you may find that my instructions here are
slightly different than what you need. But I think they will be
pretty close.

> I'm running Debian Lenny with a minimal install of XFCE and selected
> "laptop" at the tasksel option in the installer and nothing else
> (installed xorg, xfce, etc afterward).

Sounds good.

> The Brightness and Volume/Mute keys do not work and I have researched
> how to get them operating but the options I have found all offer
> slightly different ways to do it. Hibernate, Thinkpad light works ok.

Do you have 'tpb' (ThinkPad Buttons) installed?

apt-cache show tpb

I think that this is what you are looking for. It both enables the
function of the special keys and uses the on screen display (through
libxosd2) to display the action. For me this was the secret sauce to
make things work nicely.

The installation of the package installs a script in
/etc/X11/Xsession.d/90tpb that will automatically start the tpb
process when you log into the X11 graphics session. But when you
install it while running X11 then it won't get a chance to start yet
because you already started it. Plus you need to be in the nvram
group at that time too so that the program can access the nvram
controls. These two things mean that typically you will need to log
out and then log back in again as part of the installation process.

Here is the process (I think, this is from my memory and I may have
missed a step):

1. sudo apt-get install tpb
2. Read the /usr/share/doc/tpb/README.Debian, it is short, and
understand the issues it describes concerning the nvram group.
3. editor /etc/default/tpb
... START_TPB="true" ...
... This may have already been presented as a debconf question
at installation time. But it seems like I always miss it. ...
... This will start tpb automatically when next you log in. ...
4. id | grep nvram
... no output means no nvram group listed ...
... observe that you need to be added to the nvram group ...
5. sudo addgroup $(whoami) nvram
... nvram group will now be there upon the next login ...
6. Log out.
7. Log in.
8. id | grep nvram
... observe that you are now in the nvram group ...
9. ps -ef | grep tpb
... observe "/usr/bin/tpb -d" running ...
10. Test the buttons. Enjoy!

If you decide you wanted to undo all of this completely then the
following steps remove it and purge the configuration files from their
locations in /etc/. (Purging the /etc/ configuration of packages
means that if you install it again that it will install into a fresh,
pristine and unedited state. Otherwise the configuration files would
remain behind from the previous installation and would still contain
their previous settings. Sometimes you want one and sometimes you
want the other.)

1. sudo delgroup $(whoami) nvram
2. sudo apt-get remove --purge tpb
3. Log out.
4. Log in.

Additionally I set "MIXER on" in my ~/.tpbrc file. This allowed me to
intersperse changing the volume with the buttons and changing the
volume with other programs such as the gnome panel volume control or
the standalone 'aumix' and 'alsamixer' programs. You may or may not
want that too. Try it first without it and try mixing up the control
and see if you need it before enabling this configuration.

> In Xubuntu 8.10 the keys all work without any post install config
> needed. Does anyone know what packages/config that Ubuntu uses to
> achieve this? I have booted the Xubuntu Live CD and looked around but
> cannot figure it out.

Ubuntu has put a lot of effort into making the installer do a lot of
these types of things automatically. This is good for casual desktop
users because most of the time it works the way they want it to work
without extra steps. But sometimes this type of automatic decision
making also gets in the way. Sometimes it guesses too agressively.
Then people need to take action to remove and deconfigure things.

Sometimes the code to do this gets to be a burden upon the maintainers
because it can basically turn into a huge lookup table of systems and
types. As years go buy it can become a burden on the maintainers to
keep the understanding of how the hacks works when making additional
hacks.

Having the maintainers gather experience with both ways of creating
system installers is a good thing in the long run and will produce a
better installer over time. But for the moment there are some things
that need to be helped out after install for particular special pieces
of hardware. The ThinkPad buttons is one of those that is special and
different from say the Toshiba buttons or other models.

Here are some good resources for ThinkPads. Note that you probably
should read articles for the entire T-series in addition to your T61.

http://wiki.debian.org/InstallingDebianOn/Thinkpad

http://www.thinkwiki.org/wiki/Installing_Debian_Lenny_on_a_ThinkPad_T61

http://www.thinkwiki.org/wiki/Category:T_Series

Hope this helps,
Bob

P.S. Note that in Sarge and Etch the kernel module 'ibm-acpi' was
needed to be loaded, usually by addition to /etc/modules. But in
Lenny's Linux kernel this was renamed to 'thinkpad-acpi' and is now
automaticaly loaded in Lenny therefore nothing manual needs to be done.
 
Old 11-22-2008, 01:26 AM
James Robertson
 
Default Thinkpad R61 Keys- Debian Lenny

Bob Proulx wrote:

James Robertson wrote:


I have a Lenovo Thinkpad R61.



I have a T42. It is similar. But it is also slightly different. Let
me give a warning that you may find that my instructions here are
slightly different than what you need. But I think they will be
pretty close.


I'm running Debian Lenny with a minimal install of XFCE and selected
"laptop" at the tasksel option in the installer and nothing else
(installed xorg, xfce, etc afterward).



Sounds good.


The Brightness and Volume/Mute keys do not work and I have researched
how to get them operating but the options I have found all offer
slightly different ways to do it. Hibernate, Thinkpad light works ok.



Do you have 'tpb' (ThinkPad Buttons) installed?

apt-cache show tpb

I think that this is what you are looking for. It both enables the
function of the special keys and uses the on screen display (through
libxosd2) to display the action. For me this was the secret sauce to
make things work nicely.

The installation of the package installs a script in
/etc/X11/Xsession.d/90tpb that will automatically start the tpb
process when you log into the X11 graphics session. But when you
install it while running X11 then it won't get a chance to start yet
because you already started it. Plus you need to be in the nvram
group at that time too so that the program can access the nvram
controls. These two things mean that typically you will need to log
out and then log back in again as part of the installation process.

Here is the process (I think, this is from my memory and I may have
missed a step):

1. sudo apt-get install tpb
2. Read the /usr/share/doc/tpb/README.Debian, it is short, and
understand the issues it describes concerning the nvram group.
3. editor /etc/default/tpb
... START_TPB="true" ...
... This may have already been presented as a debconf question
at installation time. But it seems like I always miss it. ...
... This will start tpb automatically when next you log in. ...
4. id | grep nvram
... no output means no nvram group listed ...
... observe that you need to be added to the nvram group ...
5. sudo addgroup $(whoami) nvram
... nvram group will now be there upon the next login ...
6. Log out.
7. Log in.
8. id | grep nvram
... observe that you are now in the nvram group ...
9. ps -ef | grep tpb
... observe "/usr/bin/tpb -d" running ...
10. Test the buttons. Enjoy!

If you decide you wanted to undo all of this completely then the
following steps remove it and purge the configuration files from their
locations in /etc/. (Purging the /etc/ configuration of packages
means that if you install it again that it will install into a fresh,
pristine and unedited state. Otherwise the configuration files would
remain behind from the previous installation and would still contain
their previous settings. Sometimes you want one and sometimes you
want the other.)

1. sudo delgroup $(whoami) nvram
2. sudo apt-get remove --purge tpb
3. Log out.
4. Log in.

Additionally I set "MIXER on" in my ~/.tpbrc file. This allowed me to
intersperse changing the volume with the buttons and changing the
volume with other programs such as the gnome panel volume control or
the standalone 'aumix' and 'alsamixer' programs. You may or may not
want that too. Try it first without it and try mixing up the control
and see if you need it before enabling this configuration.


In Xubuntu 8.10 the keys all work without any post install config
needed. Does anyone know what packages/config that Ubuntu uses to
achieve this? I have booted the Xubuntu Live CD and looked around but
cannot figure it out.



Ubuntu has put a lot of effort into making the installer do a lot of
these types of things automatically. This is good for casual desktop
users because most of the time it works the way they want it to work
without extra steps. But sometimes this type of automatic decision
making also gets in the way. Sometimes it guesses too agressively.
Then people need to take action to remove and deconfigure things.

Sometimes the code to do this gets to be a burden upon the maintainers
because it can basically turn into a huge lookup table of systems and
types. As years go buy it can become a burden on the maintainers to
keep the understanding of how the hacks works when making additional
hacks.

Having the maintainers gather experience with both ways of creating
system installers is a good thing in the long run and will produce a
better installer over time. But for the moment there are some things
that need to be helped out after install for particular special pieces
of hardware. The ThinkPad buttons is one of those that is special and
different from say the Toshiba buttons or other models.

Here are some good resources for ThinkPads. Note that you probably
should read articles for the entire T-series in addition to your T61.

http://wiki.debian.org/InstallingDebianOn/Thinkpad

http://www.thinkwiki.org/wiki/Installing_Debian_Lenny_on_a_ThinkPad_T61

http://www.thinkwiki.org/wiki/Category:T_Series

Hope this helps,
Bob

P.S. Note that in Sarge and Etch the kernel module 'ibm-acpi' was
needed to be loaded, usually by addition to /etc/modules. But in
Lenny's Linux kernel this was renamed to 'thinkpad-acpi' and is now
automaticaly loaded in Lenny therefore nothing manual needs to be done.


Thanks Bob,

I tried tpb but found it slow to alter the brightness and since I'm
trying to go minimal I continued to look for solutions that didn't need
any further packages installed. From various things I found tpb was
mentioned as being and older way of doing it.


I ended up rewriting the following scripts to get it working. The
package hotkey-setup was installed.


root@griffin:~# cat /etc/acpi/thinkpad-brightness-up.sh
#!/bin/sh

echo $[`cat /sys/class/backlight/acpi_video1/brightness`+2]
>/sys/class/backlight/acpi_video1/brightness


# END
root@griffin:~# cat /etc/acpi/thinkpad-brightness-down.sh
#!/bin/sh

echo $[`cat /sys/class/backlight/acpi_video1/brightness`-2]
>/sys/class/backlight/acpi_video1/brightness


#END

You could also use /sys/class/backlight/thinkpad_screen/brightness
instead of /sys/class/backlight/acpi_video1/brightness but I reinstalled
Lenny and cannot remember how I ended up getting
/sys/class/backlight/thinkpad_screen/brightness to show up (probably
missing some package) but the "acpi_video1" option worked so I wasn't to
bothered.


This works on my R61 so I don't know how it will go on other models.

Now for volume/mute keys

Thanks again for your help.




--
To UNSUBSCRIBE, email to debian-laptop-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 02:34 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org