Trace: Linux on Laptops

Linux on Laptops

Linux on Laptops

Notes regarding putting Linux on recept laptop computers. I have mainly use Thinkpads since the 1990s, so that's what I'll cover here. I started with SuSE on an A31p and later had a T61 running Gentoo, as does my T510 that I have had since 2010 — eight years old and still runs Linux very satisfactorily, matching the performance of many 2018 laptops.

IBM/Lenovo Thinkpad T510

Item Works? Summary
Video Y 1920×1080 resolution was a bit tricky to configure, but works great once done. Framebuffer supports 1280×1024-77. Fn-keys for brightness work properly in CLI and X.
Mouse Y Trackpoint works perfectly. Touchpad parameters cannot be modified even though X log says that the driver loaded properly. Sometimes upon resume the touchpad is disabled.
Sound Y Soft keys function properly to control volume level. OSD of volume control in KDE 3.5.10 works properly.
Network Y Ethernet works with kernel driver. Wireless needs Broadcom proprietary driver (see below).
USB Y Three USB 2.0 ports all worked without issues.
Thinklight Y Works perfectly including OSD.
Suspend/Resume Y STR works perfectly from KDE 3.5.10 desktop. From CLI using acpitool for STR resumes with a blank screen. STD works properly from both CLI and X.

I have successfully run Gentoo, Fedora, CentOS, Manjaro, Antergos, Mint, Pear, Solus, Sabayon, Arya, GNU/EXE with TDE, and Makulu on the T510. Some distributions were not suited for this laptop, including SuSE (which just doesn't work at all), PCLinux (which works at first but then quickly developed issues with video that I could never resolve), and several lesser-known ones like KaOS, Humanity, etc.

IBM/Lenovo Thinkpad P70

Linux on the P70 was a complete disappointment in 2016. By 2017 Antergos (Arch-based) had managed to make it work rather well.

Item Works? Summary
Video Y 3840×2160 (4k) using the Intel graphics driver, but I could not get the Nvidia driver working at this resolution.
Mouse Y Trackpoint and touchpad both seem to work properly.
Sound Y
Network Y
USB Y
Suspend/Resume Y

USE Flags

For the T510:

CFLAGS="-O2 -pipe -march=native"
CXXFLAGS="${CFLAGS}"
CHOST="x86_64-pc-linux-gnu"
MAKEOPTS="-j4"
INPUT_DEVICES="keyboard mouse synaptics"
VIDEO_CARDS="fbdev intel nv nvidia"

Both “nv” and “nvidia” work, but the proprietary “nvidia” driver is needed for certain accelerated-graphics apps such as Earth.

Packages

Name Description I use it?
configure-thinkpad Thinkpad GNOME configuration utility for tpctl N
kthinkbat Thinkpad battery viewer applet N
tp_smapi Thinkpad SMAPI BIOS driver Y
tpb Thinkpad buttons utility Y
tpctl Thinkpad system control user-space programmes (for older Thinkpads) N
thinkpad Thinkpad system control kernel modules (for older Thinkpads) N

Acer A0721-3858 netbook

I am generally not a fan of Acer, but this is an amazing little machine: a fast AMD CPU with the highest screen resolution and largest memory of any netbook I've seen – 1366×768, 4GB RAM, and 500GB hard disk drive.

Item Works? Summary
Video Y 1366×768 and lower resolutions supported and work well. Framebuffer supports 1024×768. Fn-keys for brightness work properly in CLI and X.
Mouse Y Have not tested modifying the touchpad parameters yet.
Sound Y Soft keys function properly to control volume level. Graphical display of volume control in KDE 3.5.10 works properly.
Network Y Ethernet works with kernel driver. Wireless needs Broadcom proprietary driver (see below).
USB Y Three USB 2.0 ports all worked without issues.
Suspend/Resume Y Broken.

I booted Parted Magic to down-size the Windows partition to 40GB, booted the latest Gentoo AMD64 minimal install image from a USB stick, partitioned the remaining ~450GB of the hard disk for Linux,1) then copied a back-up from my Thinkpad T510 running Tuxonice 2.6.37 AMD64 kernel and all its apps to the netbook.

After first boot I reconfigured the kernel to have the proper Ethernet driver and rebooted again. Everything worked fine, even KDE, but I recompiled the system 2) just to be safe. Everything worked fine except for suspend/resume and wireless, so I recompiled KDE to see if that would fix the suspend problem.

At this writing everything but suspend is resolved.

USE Flags

CFLAGS="-O2 -pipe -march=native"
CXXFLAGS="${CFLAGS}"
CHOST="x86_64-pc-linux-gnu"
INPUT_DEVICES="keyboard mouse synaptics"
VIDEO_CARDS="fbdev radeon"

Suspend problem

After STR, on resume the screen stays black. After about one minute the network is accessible so that one can SSH into the machine. About five processes (including USB-storage, X, and kded) have the CPU pegged for five or ten minutes, and then suddenly there is an error message from klogd on the SSH terminal and the sluggishness is gone, but the screen is still blank.

Still to try: See if using gentoo-sources has the same issue; see if STD (suspend-to-disk / hibernate) works.

Broadcom wireless

Netbook has a Broadcom 4357 2.4GHz 802.11 b/g/n device which does not work with kernel modules.

Remove kernel wireless drivers for Broadcom. You also need to disable MAC80211 and enable LIB80211.

Running “emerge broadcom-sta” will work because the source has a bug.3)

To install follow these steps:

  1. Unpack the source into a working directory
  2. Change line 487 of src/wl/sys/wl_linux.c from
    init_MUTEX(&wl->sem);

    to

    sema_init(&wl->sem, 1);
  3. Now you can compile it:
    ./configure
    make
    sudo make install
    insmod wl.ko

Once the driver is loaded in memory, the Fn-F3 wireless key works and the wireless LED shows the state of the wireless device.

1)
I made four partitions: boot, root, portage, and distfiles
2)
emerge -e system