Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Configuration to make Linux run smoothly on the Lenovo Thinkpad x240
License
darkstego/thinkpad_x240
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
Configuration to make Linux run smoothly on the Lenovo Thinkpad x240
I have an x240 with FHD touchscreen display that I will be running Linux on. I am using this public repo as a place to put all the configuration and scripts I will be using to get Linux running well on my x240 lapotop, in hopes that it might be useful to others or maybe others would contribute so we have a spot to gather the ideas on getting everything working correctly.
I am running SolydK (amd64) with kernel version 3.11.10, Xorg 1.14.5. Installation required running the UEFI in legacy (BIOS) mode to enable the install. After that everything went smoothly.
TODO Make linux boot through UEFI.
The screen dimensions and DPI were not reported correctly in xdpyinfo. Turns out Xorg uses a logical dpi of ’96’ instead of the physical dpi. This mimics the behaviour of other OSes since many websites and applications assume a 96 dpi and setting a higher dpi would not render these correctly.
On the FHD of the x240 this results in text that is too small. This can be fixed by changing the dpi from within the DE. In KDE the it can be found under System Settings -> Application Appearance -> Fonts -> Force fonts DPI. Setting the DPI to 110 provides a good font size for the screen.
If you would like Xorg to use the actual screen dpi then you will need to include the appropriate conf file. You will have to create a xorg.conf.d directory first if you do not already have one.
sudo mkdir /etc/X11/xorg.conf.d/ sudo cp 90-monitor.conf /etc/X11/xorg.conf.d/
In some DEs (KDE for example) the power management settings sets the battery level to critical when it reaches 5%. This also happens to be when the second (built in) battery takes over. Under the default settings the laptop will hibernate on critical and never utilize the second battery. In order to get around this you need to set the critical battery level to 4% under the power managment settings.
The following are Touchpad options that are recommended for use with the x240. You can setup all the options by adding the appropriate xorg conf file by running the following:
sudo mkdir /etc/X11/xorg.conf.d/ sudo cp 99-synaptics-x240.conf /etc/X11/xorg.conf.d/
After which a restart of Xorg will be required. Or the options could be changed through synclient. The following are the settings used:
- «HorizHysteresis»=30 # Used to reduce mouse «jitter»
- «VertHysteresis»=30 # Used to reduce mouse «jitter»
- «FingerLow»=40
- «FingerHigh»=45
Any other suggestions for touchpad settings are welcome.
Adjustments for the the trackpoint speed can be found in the file trackpoint-speed.sh . Running this file should make the trackpoint faster and far more usable. Make sure that the script has is executable by running
chmod +x trackpoint-speed.sh
The problem is that using the trackpad as a button causes mouse movement when you attempt to click. So in order to use the trackpoint properly the trackpad has to be disabled. That is done by executing the script trackpad-disable.sh . It can be re-enabled by using trackpad-enable.sh . These scripts could be linked to keyboard shortcuts for quick enabling and disabling of the touchpad.
Given the clickpad needs to be pushed down to register a click for the mouse, the issue of the mouse moving around due to accidently grazing the touchpad with your palm while typing is not longer a serious problem (unless you decide to allow touchpad soft press to register as a click, in which case syndaemon might still be neseccary since currently palm detection is not fully supported in linux). There is however the requirement for a similar deamon that disables the trackpad while the trackpoint is being used so the clicks do not register as mouse movements. This would be far more useful than manually enabling and disabling the trackpad. I will try to code something that hopefully does this task.
About
Configuration to make Linux run smoothly on the Lenovo Thinkpad x240
Debian on Lenovo Thinkpad X240
I recently got myself a new computer, the Lenovo Thinkpad X240. It’s my first Thinkpad so I cannot compare it to previous models. My old laptop is a Dell XPS m1530 that’s about 5 years old by the time of this writing. Still very functional but I wanted an upgrade in hardware and a lighter computer to travel with.
– weight
– matte screen and higher resolution
– keyboard
– speed (processor, RAM, SSD, USB3)
– GNU/Linux compatibility
– wireless
– brightness controls
– FN key and FN Lock
So let’s go and review the whole thing:
It came with Windows 8 pre-installed, but I immediately installed Debian Testing (Jessie) on it. This machine comes with UEFI boot, but fortunately it has a Legacy mode to behave like normal BIOS. Installing like normal boot instead of UEFI boot is a lot easier and you don’t have to struggle with the disk partitions and boot options. On the boot configuration settings, disable secure boot and set it to legacy boot first instead of UEFI boot first.
The X240 is very light, even with the additional 6 cell battery instead of the default 3 cell battery. It is a 12.5″ computer, so it can be comparable to a Macbook Air or similar computer. The case is plastic, but feels very well built and durable.
There are no indicating LEDs anywhere except for the power button LED that indicates if the computer is on, off or suspended (blinking). There are no hard disk writing indication, battery charging indicator, wireless, bluetooth or any. Just an additional led behind the screen, the dot in the “ThinkPad” logo lights following the power button LED and that’s it.
This is a bit confusing specially when charging the laptop, since the charger also lacks any LED indicator, so the only way to know if your computer is charging is with the software indicators in your desktop environment (the battery monitor icon in your system tray).
It has no HDMI port, but it has the old VGA adapter and a mini digital port for external monitors. Only 2 USB ports, both are USB 3.0, and one with power over USB. My model came with a fingerprint reader, an SD card reader, a 720p webcam and an Ethernet port.
It seems that all new Lenovo models are coming with the new “chicklets” style keyboard and its new layout. I’ve heard some criticism about it, but since this is my first Thinkpad, I’m not biased. Comparing to other laptop keyboards, it is nice. The keys feel good and not fragile and is very silent. My only compliant was the strange placement of the Fn key where I usually expect the Ctrl key. Fortunately for me as an Emacs user I map my CapsLock key to an additional Ctrl and use that instead, so my key stroke memory doesn’t get much affected by that. What I didn’t like is that the F keys are now by default media keys and to use them as F keys you need to press Fn+key or Fn+Esc to activate ‘Function key lock’ then press the F key you need. So, for example, if you want to reload your browser and immediately lower the volume of the speakers, you have to strike additional keys.
The screen brightness control keys by default didn’t work for me, but there is a fix. You need to load the thinkpad acpi kernel module on boot. So edit /etc/modules file and add:
Then you’ll need to add this to your /etc/default/grub file and check that your kernel options are as follows:
RUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=!Windows2012 acpi_backlight=vendor"
This will enable the volume, mute, brightness and wireless media keys. I haven’t been able to make the microphone mute button work.
The keyboard backlight works by default using FN+spacebar and it looks nice. It has three states: dim, bright and off.
As many other previous ThinkPads, the X240 still keeps the nipple mouse or clit mouse or however you’ve heard it’s called. The downside is on the trackpad, now called clickpad which has no hardware buttons but does have a larger surface area. By default on Debian Jessie + KDE the clickpad works but it’s not precise. When trying to press for a click it inevitably moves from the target area, so clicking is hard. Right click worked out of the box for me by just pressing the pad on its bottom right area. Clicking can be fixed by addding:
sudo apt-get install kde-config-touchpad
and configure single tap clicking, two-finger scrolling and three finger tap for middle click. If you like to use the /nipple/ pointer and miss the buttons for it on the top of the pad, you can configure the button area to be on the top part instead of the bottom part in the X config file.
Make sure you have the following in your file /usr/share/X11/xorg.conf.d/50-synaptics.conf
# This option enables the bottom right corner to be a right button on # non-synaptics clickpads. # This option is only interpreted by clickpads. Section "InputClass" Identifier "Default clickpad buttons" MatchDriver "synaptics" #Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0" Option "SoftButtonAreas" "60% 0 0 5% 40% 60% 0 5%" # To disable the bottom edge area so the buttons only work as buttons, # not for movement, set the AreaBottomEdge #Option "AreaBottomEdge" "82%" Option "AreaTopEdge" "4%" EndSection
The wireless card is an Intel 7620 rev 6. After having to struggle with a Broadcom card for many years I thought my wireless card struggle days were going to be over. Well, turns out that the 7620 card is a very recent card and is not very well supported yet. By default it doesn’t work with Debian. To make it work you need to enable the non-free repository and install
sudo apt-get install firmware-iwlwifi
This will enable your card and make it work, but if you suspend the computer, you’ll loose bluetooth conectivity. To fix that you need to disable the 802.11n compatibility in the driver configuration. Add this to a file in a new file called: /etc/modprobe.d/wifi-disable11n.conf
options iwlwifi 11n_disable=1
I have experienced some instability with it. At random times the driver would just stop working and your card will seem working and connected but no traffic goes on. If you suspend the computer with the card in that state, it will not suspend and will hang the system. Once the wifi card is stuck the only way to bring it back is with a restart. I’ve tried rfkill, unloading and loading the module, but nothing works.
Another issue is that it will not connect to a wireless-n router, even when disabling n-band in the driver configurations. I had to configure my home router to only use b/g bands for it to connect.
**UPDATE**: Debian Jessie has upgraded to the Linux kernel 3.13, enabling the use of the iwlwifi driver version 22.24.8.0, which doesn’t need any of the changes mentioned and doesn’t crash anymore.
Not being able to compare to other previous Series X Thinkpad models, I cannot say if the X240 is an improvement or not. I’ve seen a lot of criticism to it, and I don’t blame them. Some indicating LEDs would be nice to have, and why does a new computer model in 2014 doesn’t have an HDMI port and has the old VGA port instead? There are weird hardware choices in this, but overall I’m enjoying the portability and speed of the computer. I’m hoping that my GNU/Linux compatibility issues (specially the WiFi card issues) get fixed over time.
Do you have some other configuration or fix tips for Debian on the X240? What to you think of this model? Share some ideas with me on the comments.