Page 1 of 1
Special keys on T420 (Debian Jessie)
Posted: Wed Dec 07, 2016 1:09 am
by l2acket
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.
Re: Special keys on T420 (Debian Jessie)
Posted: Wed Dec 07, 2016 2:33 am
by Dekks
Tp_smapi goes with tlp for power saving.
Have you read
https://wiki.archlinux.org/index.php/Le ... nkPad_T420
Re: Special keys on T420 (Debian Jessie)
Posted: Wed Dec 07, 2016 2:59 am
by axur-delmeria
Thinkpad-acpi is part of the default Debian kernel. Open a terminal window, type:
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.
Re: Special keys on T420 (Debian Jessie)
Posted: Wed Dec 07, 2016 4:08 am
by l2acket
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?
Re: Special keys on T420 (Debian Jessie)
Posted: Wed Dec 07, 2016 5:00 am
by Dekks
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?
Re: Special keys on T420 (Debian Jessie)
Posted: Wed Dec 07, 2016 6:33 am
by l2acket
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.
Re: Special keys on T420 (Debian Jessie)
Posted: Wed Dec 07, 2016 9:14 am
by Dekks
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.
Re: Special keys on T420 (Debian Jessie)
Posted: Wed Dec 07, 2016 7:25 pm
by l2acket
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/
Re: Special keys on T420 (Debian Jessie)
Posted: Thu Dec 08, 2016 8:21 am
by evening_hunger
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.
Re: Special keys on T420 (Debian Jessie)
Posted: Thu Dec 08, 2016 9:31 am
by axur-delmeria
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.
Re: Special keys on T420 (Debian Jessie)
Posted: Thu Dec 08, 2016 9:54 pm
by l2acket
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.
Re: Special keys on T420 (Debian Jessie)
Posted: Thu Dec 08, 2016 11:37 pm
by axur-delmeria
About the buzzing sound, try muting the one labelled "Beep" on Audio Mixer.
Not sure if it would work though.
Re: Special keys on T420 (Debian Jessie)
Posted: Fri Dec 09, 2016 6:14 am
by evening_hunger
Add
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:)
Re: Special keys on T420 (Debian Jessie)
Posted: Fri Dec 09, 2016 9:34 am
by jaspen-meyer
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
Re: Special keys on T420 (Debian Jessie)
Posted: Thu Dec 15, 2016 5:29 am
by l2acket
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
Re: Special keys on T420 (Debian Jessie)
Posted: Thu Dec 15, 2016 8:53 am
by jaspen-meyer
Does the buzzing stop after running the 'powertop' command?
Re: Special keys on T420 (Debian Jessie)
Posted: Thu Dec 15, 2016 9:03 am
by brchan
If you are using alsamixer you can also disable it through there.
Re: Special keys on T420 (Debian Jessie)
Posted: Thu Dec 15, 2016 4:42 pm
by l2acket
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.
Re: Special keys on T420 (Debian Jessie)
Posted: Thu Dec 15, 2016 5:38 pm
by Dekks
powertop does not do anything active on your laptop it just produces a report with settings it thinks with reduce power consumption
Re: Special keys on T420 (Debian Jessie)
Posted: Fri Dec 16, 2016 5:57 pm
by axur-delmeria
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.
Re: Special keys on T420 (Debian Jessie)
Posted: Sat Dec 17, 2016 2:23 am
by jaspen-meyer
Dekks wrote:powertop does not do anything active on your laptop it just produces a report with settings it thinks with reduce power consumption
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.
Re: Special keys on T420 (Debian Jessie)
Posted: Sat Dec 17, 2016 7:02 am
by Dekks
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
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/.