For sure you have heard or read, at least once, recommendations about how to improve the battery life of a laptop, mobile phone, or whatever gadget. But I’ve detected that several times that recommendations are wrong, and they do more harm than benefit to a laptops battery. That’s because battery technology has been changing along the years, and the methods of taking care of them also. So, I’ll try to summarize some of the most basic up-to-date tips to increase the life of a laptop’s battery. Before applying them, just check that you battery is of lithium-ion (Li-ion) type.
Category Archives: Arch Linux
Information about the Arch GNU/Linux distribution.
Simple virtual user mail system on Debian
On this post I will explain how to set-up an e-mail server on Debian using Postfix, Cyrus, Courier, PAM, PostfixAdmin and Roundcube. I’m not going to explain nothing completely new or revolutionary neither reinvent the wheel. To be clear, what I did to implement the server was following this guide: Simple Virtual User Mail System. But, it’s for Arch Linux, so if we want it to work on Debian there are several changes that we have to take into account. So, instead of repeating everything, I will just highlight the changes. Continue reading
Find outdated packages installed from AUR
If you don’t use Yaourt to manage packages installed from AUR, you will find useful this script from Edgar Kalkowski. It checks all installed packages (including those from the AUR) for updates but does not do any automatic update attempt like yaourt does.
How to find the uninstalled package that will provide xxx
I’m cleaning my e-mail, but I’ve discovered that I have a lot of mails from the Arch Linux mailing list which I’m just archiving because they contain useful tips and howtos. So, in order to delete them without losing these pearls of information, I’ll put them in the blog under the Arch Linux category for easy reference.
The first one: Maybe you are interested in a concrete file, but you don’t know which package contains it. pacman -Ss
just search package names and not the contents, so it’s not helpful. The solution is pkgfile
from pkgtools.
Configuring the Touch screen for Lenovo X200T
One of the first things you would like to try on a Tablet PC would be the Touch Screen. Having it working on the Lenovo X200T is as easy as:
- Install the Linux Wacom drivers. On Arch Linux, you can find it on AUR.
- Configure the X.Org server to use it. I post my xorg.conf file as an example:
Section "ServerLayout"
Identifier "X.org Configured"
Screen "Screen0"
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "stylus" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"
InputDevice "touch" "SendCoreEvents" # Only a few TabletPCs support this typeEndSection
EndSection
Section “Files”
ModulePath “/usr/lib/xorg/modules”
FontPath “/usr/share/fonts/misc”
FontPath “/usr/share/fonts/100dpi:unscaled”
FontPath “/usr/share/fonts/75dpi:unscaled”
FontPath “/usr/share/fonts/TTF”
FontPath “/usr/share/fonts/Type1″
EndSection
Section “Module”
Load “dri”
Load “xtrap”
Load “dbe”
Load “glx”
Load “extmod”
Load “freetype”
EndSection
Section “InputDevice”
Identifier “Keyboard0″
Driver “kbd”
Option “XkbLayout” “es”
EndSection
Section “InputDevice”
Identifier “Mouse0″
Driver “mouse”
Option “Protocol” “auto”
Option “Device” “/dev/input/mice”
Option “ZAxisMapping” “4 5 6 7″
EndSection
Section “InputDevice”
Driver “wacom”
Identifier “stylus”
Option “Device” “/dev/ttyS0″ # SERIAL ONLY
Option “Type” “stylus”
Option “ForceDevice” “ISDV4″ # Tablet PC ONLY
EndSection
Section “InputDevice”
Driver “wacom”
Identifier “eraser”
Option “Device” “/dev/ttyS0″ # SERIAL ONLY
Option “Type” “eraser”
Option “ForceDevice” “ISDV4″ # Tablet PC ONLY
EndSection
Section “InputDevice”
Driver “wacom”
Identifier “cursor”
Option “Device” “/dev/ttyS0″ # SERIAL ONLY
Option “Type” “cursor”
Option “ForceDevice” “ISDV4″ # Tablet PC ONLY
EndSection
Section “InputDevice”
Driver “wacom”
Identifier “pad”
Option “Device” “/dev/ttyS0″ # SERIAL ONLY
Option “Type” “pad”
EndSection
# Uncomment the following section if you you have a TabletPC that upports touch
Section “InputDevice”
Driver “wacom”
Identifier “touch”
Option “Device” “/dev/ttyS0″ # SERIAL ONLY
Option “Type” “touch”
Option “ForceDevice” “ISDV4″ # Serial Tablet PC ONLY
# Adding manual calibration, since proper calibration seems impossible.
Option “BottomX” “915”
Option “BottomY” “940”
Option “TopX” “48”
Option “TopY” “90”
EndSection
Section “Monitor”
#DisplaySize 260 160 # mm
Identifier “Monitor0″
VendorName “LEN”
ModelName “4011”
Option “DPMS”
EndSection
Section “Monitor”
Identifier “HDMI-1″
Option “Ignore” “True”
EndSection
Section “Monitor”
Identifier “HDMI-2″
Option “Ignore” “True”
EndSection
Section “Device”
Identifier “Card0″
Driver “intel”
VendorName “Intel Corporation”
BoardName “Mobile 4 Series Chipset Integrated Graphics Controller”
BusID “PCI:0:2:0″
Option “monitor-HDMI-1″ “HDMI-1″
Option “monitor-HDMI-2″ “HDMI-2″
EndSection
Section “Screen”
Identifier “Screen0″
Device “Card0″
Monitor “Monitor0″
DefaultDepth 24
Option “RandRRotation” “on”
SubSection “Display”
Modes “1280×800″ “1024×768″ “800×600″ “640×480″
EndSubSection
EndSection
Section “Extensions”
Option “Composite” “Enabled”
EndSection
And thats’s all! With just these two steps you can use your pen or your finger to control the screen :)
Installing Linux on Lenovo X200 Tablet
Eventually, I am the proud owner of a Lenovo X200 Tablet :).
The distribution I have chosen is Arch Linux. It’s not an “everything works without having edit configuration files” distribution, but with a laptop with special hardware (i.e., tablet pc), you end doing it anyway. In addition to this, I like its principles, the community (AUR, forums, mailing lists) around it, and the wiki :).
Base installation
The laptop does not have a optical drive so we can install booting from USB or from network via PXE. First I tried the simplest case: boot from a USB drive. But the last stable (this word is not appropriate on a rolling release distribution, but I expect you will understand the idea) installer release does not include drivers for the Ethernet or the Wifi, leading to a almost useless installation. So, I used a “non-official” boot image with the kernel 2.6.28, which supports all my networking options. But, I didn’t discovered why, but this image doesn’t boot on my laptop. The screen goes blank with the message “Boot Error”. Then, I tried to boot from network using this newer image (fortunately, I have a home server that could provide DHCP and PXE), following this guide, and everything worked fine. From this point, everything worked as expected and leaded to a full operational base system with network capabilities.
Apart from the network drivers issue, I spent A LOT of time trying to shrink the Windows partition to gain space for the Linux. The problem was that it had some unmovable files near the end of the partition, that limited how much could it be resized. After playing with several defragmentation tools (even some of them commercial software in trial version mode), I could gain enough space to be happy :).
On next posts I’m going to talk about how to configure the system to use most of the hardware (rotation and touch screen, special buttons, bluetooth, etc.).