Take a look at our
ThinkPads.com HOME PAGE
For those who might want to contribute to the blog, start here: Editors Alley Topic
Then contact Bill with a Private Message

Special keys on T420 (Debian Jessie)

Linux on ThinkPads
Post Reply
Message
Author
l2acket
Posts: 7
Joined: Wed Dec 07, 2016 12:41 am
Location: St James, Trinidad & Tobago

Special keys on T420 (Debian Jessie)

#1 Post by l2acket » Wed Dec 07, 2016 1:09 am

Hello I did a network install of Debian 8.6 with XFCE, and almost everything worked out of the box. I had to install iwlwifi for Intel wireless card, xinit and add some settings to xinitrc for the Trackpoint scroll. The mute sound, volume up and down, the ThinkLight and brightness buttons all worked out of the box.

I'm trying to figure out how to get the mic mute button and other special keys to work. (Fn+F2 lock screen, Fn+F4 sleep, etc) The only one that works is Fn+F5 for wifi on/off.
Also would like to get the "When power button is pressed" Ask to work.

I also read that the fan is at a fixed speed and could lead to problems.

I've used the ThinkWiki and looked at other wikis (Arch, gentoo etc) for thinkpad-acpi and thinkfan configuration, but these articles are tough to decipher for me.

thinkpad-acpi is not an available package in my repos, and synaptic gives a few results for thinkpad namely tp-smapi and tpb. Is tp-smapi the same thing? I installed thinkfan alone but it outputs an error.

Can anyone give me a hand with this? Would be greatly appreciated.

EDIT; I almost forgot! When scrolling (with trackpad or trackpoint) on webpages I hear a low but audible buzz. Is this a problem? Can I fix it? I've noticed this on Ubuntu 16.04 as well, with and without proprietary driver installed.

Dekks
Junior Member
Junior Member
Posts: 499
Joined: Thu Jun 26, 2014 9:38 am
Location: Birmingham, UK

Re: Special keys on T420 (Debian Jessie)

#2 Post by Dekks » Wed Dec 07, 2016 2:33 am

Tp_smapi goes with tlp for power saving.

Have you read https://wiki.archlinux.org/index.php/Le ... nkPad_T420
Home Win10/i5 Arch//Openbox R61//GNOME 3 X201i/X230 Tablet //Spectrwm T61/X61/X61 Debian 9.2/X32/T60p
Work - Win7/X220T BunsenLabs/Debian 9 T43
Retired T60/X30/X31/X61S RIP T400/T21/X61T/X200T

axur-delmeria
ThinkPadder
ThinkPadder
Posts: 1580
Joined: Mon May 28, 2012 5:49 am
Location: Metro Manila, Philippines

Re: Special keys on T420 (Debian Jessie)

#3 Post by axur-delmeria » Wed Dec 07, 2016 2:59 am

Thinkpad-acpi is part of the default Debian kernel. Open a terminal window, type:

Code: Select all

lsmod | grep -i "thinkpad_acpi"
You'll see it if it's already loaded.

Tp-smapi is for advanced controls like setting charge thresholds. A program called tlp helps here. I recommend installing it as it also provides a lot of power saving optimizations.

I haven't tried playing around with fan speed control.

I'm on my X61 at the moment, so I can't help with the Mic Mute function.
Daily driver: X220 4291-P79 i5-2520M

In reserve: X61 T7500, X60 T2300
In pieces: X60s CS U1300 [board only], two retired but working X61Ts
RIP: 760XD 9546-U9E

l2acket
Posts: 7
Joined: Wed Dec 07, 2016 12:41 am
Location: St James, Trinidad & Tobago

Re: Special keys on T420 (Debian Jessie)

#4 Post by l2acket » Wed Dec 07, 2016 4:08 am

Thank you, I have installed tlp and tp-smapi

However I am getting this error;
d@t420:~$ sudo systemctl enable thinkfan.service
Synchronizing state for thinkfan.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d thinkfan defaults
Executing /usr/sbin/update-rc.d thinkfan enable
d@t420:~$ sudo systemctl status thinkfan.service
● thinkfan.service - simple and lightweight fan control program
Loaded: loaded (/lib/systemd/system/thinkfan.service; enabled)
Active: failed (Result: exit-code) since Wed 2016-12-07 05:00:47 AST; 6min ago

Dec 07 05:00:47 t420 thinkfan[2434]: thinkfan 0.9.1 starting...
Dec 07 05:00:47 t420 systemd[1]: thinkfan.service: control process exited, code=exited status=4
Dec 07 05:00:47 t420 systemd[1]: Failed to start simple and lightweight fan control program.
Dec 07 05:00:47 t420 systemd[1]: Unit thinkfan.service entered failed state.

Journalctl displays these errors;
Dec 07 05:09:23 t420 thinkfan[700]: /proc/acpi/ibm/thermal: No such file or directory
Dec 07 05:09:23 t420 thinkfan[700]: add_sensor: Error getting temperature.
Dec 07 05:09:23 t420 thinkfan[700]: /proc/acpi/ibm/thermal: No such file or directory
Dec 07 05:09:23 t420 thinkfan[700]: Error parsing temperatures:
Dec 07 05:09:23 t420 thinkfan[700]: readconfig: Error getting temperature.
Dec 07 05:09:23 t420 thinkfan[700]: Refusing to run without usable config file!
Dec 07 05:09:24 t420 systemd[1]: Failed to start simple and lightweight fan control program.

Did I miss something?

Dekks
Junior Member
Junior Member
Posts: 499
Joined: Thu Jun 26, 2014 9:38 am
Location: Birmingham, UK

Re: Special keys on T420 (Debian Jessie)

#5 Post by Dekks » Wed Dec 07, 2016 5:00 am

Yes its not configured correctly. The error means that the file its looking for doesn't exist.
First step to work out whats happened is ;m_sensors. plus can you find thinkfan.conf

Have you installed and configured the lm_sensors package? If so what does the command sensors output?
Home Win10/i5 Arch//Openbox R61//GNOME 3 X201i/X230 Tablet //Spectrwm T61/X61/X61 Debian 9.2/X32/T60p
Work - Win7/X220T BunsenLabs/Debian 9 T43
Retired T60/X30/X31/X61S RIP T400/T21/X61T/X200T

l2acket
Posts: 7
Joined: Wed Dec 07, 2016 12:41 am
Location: St James, Trinidad & Tobago

Re: Special keys on T420 (Debian Jessie)

#6 Post by l2acket » Wed Dec 07, 2016 6:33 am

Okay so after some trial and tribulation I've gotten ThinkFan to work;
I added this to my thinkfan.conf file:
#values found here: http://forum.thinkpads.com/viewtopic.php?t=119546
hwmon /sys/devices/virtual/thermal/thermal_zone0/temp
(0, 0, 42)
(1, 40, 47)
(2, 45, 52)
(3, 50, 57)
(4, 55, 62)
(5, 60, 67)
(6, 65, 72)
(7, 70, 77)
(127, 75, 32767)


d@t420:~$ sensors
acpitz-virtual-0
Adapter: Virtual device
temp1: +45.0°C (crit = +98.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Physical id 0: +46.0°C (high = +86.0°C, crit = +100.0°C)
Core 0: +40.0°C (high = +86.0°C, crit = +100.0°C)
Core 1: +43.0°C (high = +86.0°C, crit = +100.0°C)

thinkpad-isa-0000
Adapter: ISA adapter
fan1: 1959 RPM

Logs return this:
Dec 07 07:04:27 t420 thinkfan[701]: WARNING: Using default fan control in /proc/acpi/ibm/fan.

Is it not using the values listed in thinkfan.conf?

Thanks for your help, I will most likely edit this post as I try to get the special keys to work tomorrow.

Dekks
Junior Member
Junior Member
Posts: 499
Joined: Thu Jun 26, 2014 9:38 am
Location: Birmingham, UK

Re: Special keys on T420 (Debian Jessie)

#7 Post by Dekks » Wed Dec 07, 2016 9:14 am

Thinkfan can't find the stored temp value to read off.

run cat /sys/devices/virtual/thermal/thermal_zone0/temp see what value is stored there, if no file exists check for a /temp file in thermal_zone1 directory. If that's where the temp value is being stored change hwmon statement as appropriate.
Home Win10/i5 Arch//Openbox R61//GNOME 3 X201i/X230 Tablet //Spectrwm T61/X61/X61 Debian 9.2/X32/T60p
Work - Win7/X220T BunsenLabs/Debian 9 T43
Retired T60/X30/X31/X61S RIP T400/T21/X61T/X200T

l2acket
Posts: 7
Joined: Wed Dec 07, 2016 12:41 am
Location: St James, Trinidad & Tobago

Re: Special keys on T420 (Debian Jessie)

#8 Post by l2acket » Wed Dec 07, 2016 7:25 pm

d@t420:~$ sudo cat /sys/devices/virtual/thermal/thermal_zone0/temp
43000
d@t420:~$ sensors
acpitz-virtual-0
Adapter: Virtual device
temp1: +43.0°C (crit = +98.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Physical id 0: +43.0°C (high = +86.0°C, crit = +100.0°C)
Core 0: +37.0°C (high = +86.0°C, crit = +100.0°C)
Core 1: +39.0°C (high = +86.0°C, crit = +100.0°C)

thinkpad-isa-0000
Adapter: ISA adapter
fan1: 1975 RPM

They both return 43 degrees. I checked again on boot today and got;
Dec 07 20:09:06 t420 thinkfan[695]: WARNING: Using default fan control in /proc/

evening_hunger
Sophomore Member
Posts: 221
Joined: Thu Nov 26, 2015 2:55 pm
Location: Rouen, France

Re: Special keys on T420 (Debian Jessie)

#9 Post by evening_hunger » Thu Dec 08, 2016 8:21 am

I'm on Debian Testing, this is not that far from Jessie, at least for matters discussed. I don't get Fn+F2 to lock the screen indeed. It may be hard to map manually (as Fn is seen by xev to be 'XF86WakeUp'). However Fn+F4 works for sleep. You may want to check whether it is actually possible to put the laptop in to standbay/sleep mode at all, e.g. by trying XFCE's menu option.
x220/i7-2620M/8GB/256gb.ssd/ips/debian (main driver)
x230/i5/8GB/500gb.hdd+256gb.m2ssd/tn/debian+win7 (better half)

axur-delmeria
ThinkPadder
ThinkPadder
Posts: 1580
Joined: Mon May 28, 2012 5:49 am
Location: Metro Manila, Philippines

Re: Special keys on T420 (Debian Jessie)

#10 Post by axur-delmeria » Thu Dec 08, 2016 9:31 am

This is how my Debian Jessie XFCE is configured for screen locking:

Go to: Settings > Keyboard > Application Shortcuts

Add a new command:

Command: xflock4
Shortcut : (you can set this to Fn+F2)

xflock4 is part of the xfce4-session package. AFAIK it's automatically installed as part XFCE.
Daily driver: X220 4291-P79 i5-2520M

In reserve: X61 T7500, X60 T2300
In pieces: X60s CS U1300 [board only], two retired but working X61Ts
RIP: 760XD 9546-U9E

l2acket
Posts: 7
Joined: Wed Dec 07, 2016 12:41 am
Location: St James, Trinidad & Tobago

Re: Special keys on T420 (Debian Jessie)

#11 Post by l2acket » Thu Dec 08, 2016 9:54 pm

Nice thank you guys, got thinkfan to find the right file. I used;

d@t420:~$ sudo find /sys/devices -type f -name "temp*_input"

to find what sensors, and added those to thinkfan.conf like;

tp_fan /proc/acpi/ibm/fan
hwmon /sys/devices/virtual/hwmon/hwmon0/temp1_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp3_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp2_input

Now on boot I don't get the error message.

Also got the FN+F2 to lock to work under XFCE keyboard macros. The easiest thing I've done so far lol.

Does anyone have thoughts on the scrolling issue? This buzzing is driving me mad. I've researched it a bit to no avail.

axur-delmeria
ThinkPadder
ThinkPadder
Posts: 1580
Joined: Mon May 28, 2012 5:49 am
Location: Metro Manila, Philippines

Re: Special keys on T420 (Debian Jessie)

#12 Post by axur-delmeria » Thu Dec 08, 2016 11:37 pm

About the buzzing sound, try muting the one labelled "Beep" on Audio Mixer.
Not sure if it would work though.
Daily driver: X220 4291-P79 i5-2520M

In reserve: X61 T7500, X60 T2300
In pieces: X60s CS U1300 [board only], two retired but working X61Ts
RIP: 760XD 9546-U9E

evening_hunger
Sophomore Member
Posts: 221
Joined: Thu Nov 26, 2015 2:55 pm
Location: Rouen, France

Re: Special keys on T420 (Debian Jessie)

#13 Post by evening_hunger » Fri Dec 09, 2016 6:14 am

Add

Code: Select all

xset b off
into any files that are read during your boot. This would be: .bashrc, .bash_profile, .xinitrc, and that funny XFCE "autostart" group. Anyhow first try this comand out in the terminal, it should completely disable the beep everywhere. Then it's up to you how to make it pernament. In my case I have it in my window manager's startup, but I don't use XFCE nor Gnome nor anything you know:)
x220/i7-2620M/8GB/256gb.ssd/ips/debian (main driver)
x230/i5/8GB/500gb.hdd+256gb.m2ssd/tn/debian+win7 (better half)

jaspen-meyer
Senior Member
Senior Member
Posts: 771
Joined: Wed May 19, 2010 11:21 pm
Location: Pardubice, Czech Republic
Contact:

Re: Special keys on T420 (Debian Jessie)

#14 Post by jaspen-meyer » Fri Dec 09, 2016 9:34 am

I've never noticed buzzing with my T420. For other electrical noises I run:
sudo powertop --auto-tune

Sleep may be this command:
xfce4-session-logout --suspend

You can set shortcut keys via
xfce4-keyboard-settings

Other sleep/lock screen ideas:
http://unix.stackexchange.com/questions ... d-shortcut
T420 i7 3612QM; T420 i7 3630QM; T400 Q9100; x60s libreboot, led; x24 xiphmont led

l2acket
Posts: 7
Joined: Wed Dec 07, 2016 12:41 am
Location: St James, Trinidad & Tobago

Re: Special keys on T420 (Debian Jessie)

#15 Post by l2acket » Thu Dec 15, 2016 5:29 am

xset b off works to turn off the beep but it doesn't make the buzz go away. Do you guys think the buzz is caused by interference from the pc speaker and the mobo/soundcard? If that's the case shouldn't I turn off the speaker entirely?

I get this when I use the aforementioned command;
d@t420:~$ sudo powertop --auto-tune
Loaded 3 prior measurements
Cannot load from file /var/cache/powertop/saved_parameters.powertop
RAPL device for cpu 0
RAPL device for cpu 0
RAPL device for cpu 0
Cannot load from file /var/cache/powertop/saved_parameters.powertop
Leaving PowerTOP

jaspen-meyer
Senior Member
Senior Member
Posts: 771
Joined: Wed May 19, 2010 11:21 pm
Location: Pardubice, Czech Republic
Contact:

Re: Special keys on T420 (Debian Jessie)

#16 Post by jaspen-meyer » Thu Dec 15, 2016 8:53 am

Does the buzzing stop after running the 'powertop' command?
T420 i7 3612QM; T420 i7 3630QM; T400 Q9100; x60s libreboot, led; x24 xiphmont led

brchan
ThinkPadder
ThinkPadder
Posts: 1340
Joined: Sun Jun 01, 2014 11:43 am
Location: West Lafayette, Indiana

Re: Special keys on T420 (Debian Jessie)

#17 Post by brchan » Thu Dec 15, 2016 9:03 am

If you are using alsamixer you can also disable it through there.
Current Thinkpads: W530 (functional classic keyboard mod), X301, T61, T60, T43, A31p, T23, 600X, 770
Other: mk5 Toughbook cf-19, mk1 Toughbook cf-53

l2acket
Posts: 7
Joined: Wed Dec 07, 2016 12:41 am
Location: St James, Trinidad & Tobago

Re: Special keys on T420 (Debian Jessie)

#18 Post by l2acket » Thu Dec 15, 2016 4:42 pm

jaspen-meyer wrote:Does the buzzing stop after running the 'powertop' command?
Sorry nope.

Disabling the beep in alsamixer makes no change.

Also I have encountered another problem. I have both pulseaudio and alsamixer. When I press the mute button it mutes master in alsa, and the built in audio analog stereo in pavucontrol. However when you press it again to unmute, it only unmutes the master in alsa, and built in audio remains muted in pavucontrol. I have it set as fallback already.

Dekks
Junior Member
Junior Member
Posts: 499
Joined: Thu Jun 26, 2014 9:38 am
Location: Birmingham, UK

Re: Special keys on T420 (Debian Jessie)

#19 Post by Dekks » Thu Dec 15, 2016 5:38 pm

powertop does not do anything active on your laptop it just produces a report with settings it thinks with reduce power consumption
Home Win10/i5 Arch//Openbox R61//GNOME 3 X201i/X230 Tablet //Spectrwm T61/X61/X61 Debian 9.2/X32/T60p
Work - Win7/X220T BunsenLabs/Debian 9 T43
Retired T60/X30/X31/X61S RIP T400/T21/X61T/X200T

axur-delmeria
ThinkPadder
ThinkPadder
Posts: 1580
Joined: Mon May 28, 2012 5:49 am
Location: Metro Manila, Philippines

Re: Special keys on T420 (Debian Jessie)

#20 Post by axur-delmeria » Fri Dec 16, 2016 5:57 pm

I'm thinking that the pcspkr kernel module may need to be blacklisted (prevented from loading). https://wiki.debian.org/KernelModuleBlacklisting has a guide, but I haven't tried it yet.
Daily driver: X220 4291-P79 i5-2520M

In reserve: X61 T7500, X60 T2300
In pieces: X60s CS U1300 [board only], two retired but working X61Ts
RIP: 760XD 9546-U9E

jaspen-meyer
Senior Member
Senior Member
Posts: 771
Joined: Wed May 19, 2010 11:21 pm
Location: Pardubice, Czech Republic
Contact:

Re: Special keys on T420 (Debian Jessie)

#21 Post by jaspen-meyer » Sat Dec 17, 2016 2:23 am

Dekks wrote:powertop does not do anything active on your laptop it just produces a report with settings it thinks with reduce power consumption

Code: Select all

sudo powertop --auto-tune
https://wiki.archlinux.org/index.php/Powertop
You can use the --auto-tune feature from PowerTOP which sets all tunable options to their GOOD setting.
Powertop finds settings which could be adjusted and issues commands to adjust them. However, the commands it issues are not compatible with every system, adjusting the issued commands is needed to get the full benefit.
T420 i7 3612QM; T420 i7 3630QM; T400 Q9100; x60s libreboot, led; x24 xiphmont led

Dekks
Junior Member
Junior Member
Posts: 499
Joined: Thu Jun 26, 2014 9:38 am
Location: Birmingham, UK

Re: Special keys on T420 (Debian Jessie)

#22 Post by Dekks » Sat Dec 17, 2016 7:02 am

jaspen-meyer wrote:
Dekks wrote:powertop does not do anything active on your laptop it just produces a report with settings it thinks with reduce power consumption

Code: Select all

sudo powertop --auto-tune
https://wiki.archlinux.org/index.php/Powertop
You can use the --auto-tune feature from PowerTOP which sets all tunable options to their GOOD setting.
Powertop finds settings which could be adjusted and issues commands to adjust them. However, the commands it issues are not compatible with every system, adjusting the issued commands is needed to get the full benefit.
Why ive never looked t autotune - best to do it manually/.
Home Win10/i5 Arch//Openbox R61//GNOME 3 X201i/X230 Tablet //Spectrwm T61/X61/X61 Debian 9.2/X32/T60p
Work - Win7/X220T BunsenLabs/Debian 9 T43
Retired T60/X30/X31/X61S RIP T400/T21/X61T/X200T

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Linux Questions”

Who is online

Users browsing this forum: No registered users and 8 guests