User Tools

Site Tools


os:archlinux:30l3

Installation and configuration reminder for my x230Tablet laptop

Overview

I “enhanced” my Lenovo x230 Laptop with a Crucial M4 256 GB Harddrive in mSata format and 16GB RAM in case :-P.
I intend to use this SSD as main OS partitions (C:\ / ), the original 500GB HD will be for swap/var/home partitions (see underneath).

Here's the output of lspci

00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04)
00:16.3 Serial controller: Intel Corporation 7 Series/C210 Series Chipset Family KT Controller (rev 04)
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4)
00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4)
00:1c.2 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 3 (rev c4)
00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation QM77 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller (rev 04)
02:00.0 System peripheral: Ricoh Co Ltd MMC/SD Host Controller (rev 07)
03:00.0 Network controller: Intel Corporation Centrino Ultimate-N 6300 (rev 3e)

Here's the output of lsusb

Bus 003 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 004 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 003: ID 147e:2020 Upek TouchChip Fingerprint Coprocessor (WBF advanced mode)
Bus 003 Device 004: ID 0a5c:21e6 Broadcom Corp. BCM20702 Bluetooth 4.0 [ThinkPad]
Bus 004 Device 003: ID 056a:00e6 Wacom Co., Ltd 

Here's the output of cpuinfo

processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 58
model name	: Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz
stepping	: 9
microcode	: 0x16
cpu MHz		: 1200.000
cache size	: 3072 KB
physical id	: 0
siblings	: 4
core id		: 0
cpu cores	: 2
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
bogomips	: 5189.89
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:
 
processor	: 1
vendor_id	: GenuineIntel
cpu family	: 6
model		: 58
model name	: Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz
stepping	: 9
microcode	: 0x16
cpu MHz		: 1200.000
cache size	: 3072 KB
physical id	: 0
siblings	: 4
core id		: 0
cpu cores	: 2
apicid		: 1
initial apicid	: 1
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
bogomips	: 5189.89
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:
 
processor	: 2
vendor_id	: GenuineIntel
cpu family	: 6
model		: 58
model name	: Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz
stepping	: 9
microcode	: 0x16
cpu MHz		: 1200.000
cache size	: 3072 KB
physical id	: 0
siblings	: 4
core id		: 1
cpu cores	: 2
apicid		: 2
initial apicid	: 2
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
bogomips	: 5189.89
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:
 
processor	: 3
vendor_id	: GenuineIntel
cpu family	: 6
model		: 58
model name	: Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz
stepping	: 9
microcode	: 0x16
cpu MHz		: 1200.000
cache size	: 3072 KB
physical id	: 0
siblings	: 4
core id		: 1
cpu cores	: 2
apicid		: 3
initial apicid	: 3
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
bogomips	: 5189.89
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

Partition table

DiskPartitionNameLabelSizeFormatComment
SSD1sdb1SYSTEM_DRV1.5GBNTFSCrap partition for Lenovo's tools …
SSD2sdb2WINDOWS7_OS175GBNTFSC:\
SSD3sdb3LINUX62GBext4/ for Linux
HD1sda1SWAP32GBLinux Swapswap for Linux
HD2sda2VAR20GBext4/var for Linux
HD3sda3HOME40GBext4/home for Linux
HD4sda4DATA375GBNTFSData partition shared

Base install

References

USB boot

On Lenovo's BIOS you have to press [Enter] to boot from a different device.
:!: If you do add a mSata and want to use it for OS(es), go to the BIOS to change boot order

First install

Boot on the USB stick (I created mine using unetbootin ~ lazy :D - the isos are taken from here → https://www.archlinux.org/download/ take the mirror closest to you and select the netinstall ISO)

Basic

Remote access

Let's launch the network + sshd so we can copy paste some nice commands right from an already installed machine

ip addr show

Start sshd

systemctl start sshd

I hate systemd right from this line … !
Set a root password

passwd

Partitionning

Done with Clonezilla (again lazyness ;-) ) - you can use cfdisk to do the job

Formatting

Let's format all these partitions in ext4 format.

mkfs.ext4 -E discard -L LINUX /dev/sdb3
mkfs.ext4 -L VAR /dev/sda2
mkfs.ext4 -L HOME /dev/sda3
mkswap -L SWAP /dev/sda1

The option -E discard is because /dev/sdb is an SSD!

Mount them

Mounting and creating mount points:

mount /dev/sdb3 /mnt
mkdir /mnt/{home,var}
mount /dev/sda2 /mnt/var
mount /dev/sda3 /mnt/home
swapon /dev/sda1

Check

mount

Base system

I'll then install base packages plus base-devel packages

pacstrap /mnt base base-devel

Fstab

For SSD tweaks and to make it shine: SSD

  • generate fstab
genfstab -L -p /mnt >> /mnt/etc/fstab

Yes I use Labels, UUID sucks

  • edit fstab

Before:

#
# /etc/fstab: static file system information
#
# <file system> <dir>   <type>  <options>       <dump>  <pass>
# /dev/sdb3 UUID=34cedc78-e156-4dbb-a428-4d594d6b34a8
LABEL=LINUX             /               ext4            rw,relatime,data=ordered        0 1

# /dev/sda2 UUID=f8a1e862-64b7-41d7-ac7d-4b75b346ceb5
LABEL=VAR               /var            ext4            rw,relatime,data=ordered        0 2

# /dev/sda3 UUID=57552366-9356-43bf-8bd2-bb0b25a1d318
LABEL=HOME              /home           ext4            rw,relatime,data=ordered        0 2

# /dev/sda1 UUID=dcba8ead-fb4b-4e06-a9e5-1a55f1c353e0
LABEL=SWAP              none            swap            defaults        0 0

They love UUIDs …
Anyway, let's modify the line of / on SSD
After:

#
# /etc/fstab: static file system information
#
# <file system> <dir>   <type>  <options>       <dump>  <pass>
# /dev/sdb3 UUID=34cedc78-e156-4dbb-a428-4d594d6b34a8
LABEL=LINUX             /               ext4            defaults,noatime,discard        0 1

# /dev/sda2 UUID=f8a1e862-64b7-41d7-ac7d-4b75b346ceb5
LABEL=VAR               /var            ext4            rw,relatime,data=ordered        0 2

# /dev/sda3 UUID=57552366-9356-43bf-8bd2-bb0b25a1d318
LABEL=HOME              /home           ext4            rw,relatime,data=ordered        0 2

# /dev/sda1 UUID=dcba8ead-fb4b-4e06-a9e5-1a55f1c353e0
LABEL=SWAP              none            swap            defaults        0 0

Bootloader

I use Syslinux since it does its job well! Syslinux

pacstrap /mnt syslinux

Configuration

Environment

Let's go to our new system!

arch-chroot /mnt 
  • /etc/hostname
 echo 30L3 > /etc/hostname 
  • /etc/locale.gen

I'll use en_US.utf-8/iso8859 so uncomment:

en_US.UTF-8 UTF-8
en_US ISO-8859-1

The generate locales

 locale-gen 
LANG="en_US.UTF-8"
 
# Keep the default sort order (e.g. files starting with a '.'
# should appear at the start of a directory listing.)
LC_COLLATE="C"
  • /etc/vconsole.conf

Default keyboard in console (US variant international … with a different mapping than on X11! Well done)

echo "KEYMAP=us-acentos" > /etc/vconsole.conf
  • /etc/localtime
ln -s /usr/share/zoneinfo/Europe/Paris /etc/localtime
  • /etc/mkinitcpio.conf

No touch just regenerate it in case …

mkinitcpio -p linux
  • /boot/syslinux/syslinux.cfg

I left it by default (for now ;-) ) just uncommenting Windows© part
:!: Check that Linux start from /dev/sdb3 not sda … Then the magic:

 /usr/sbin/syslinux-install_update -i -a -m
  • root password
passwd

Reboot

Umount stuff cleanly

First use Ctrl+D to escape from the chroot
then:

umount /mnt/var /mnt/home /mnt

Now is the time to light a candle and type

reboot

Pimping up shit created by systemd

So, happily you used to refer to your network card as eth0? Forget it! Now huge brains have decided for you, even if you don't have any issue that the notation will change! Great … so my eth0 is called … wait for it: enp0s25 perfect. So let's remove that shit! (wlan0 is called wlp3s0 by the way - unfortunately, so far they didn't change the lo interface \o/ it's called … lo … what a lack of imagination!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)

ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules

Reboot! Yeah you know just like on Windows©

Network

Dhcpcd for eth 0

Once you have back a proper name for you interfaces …

 systemctl enable dhcpcd@eth0 

And then it slows down your boot! Isn't that nice? Well coded.
Reference: Network

Netctl for wifi

Reference: https://wiki.archlinux.org/index.php/Netctl

pacman -S netctl wpa_supplicant
cd /etc/netctl/examples/

Copy on of the example regarding the type of network you want to access:

cp wireless-wpa-configsection ../university

Edit the file with proper settings (SSID / user … )

cd /etc/netctl
vi university

I don't use auto-wifi service I start it when needed:

netctl start university

SSHd

Access remotely:

 pacman -Sy openssh 

Enable it at boot

User

useradd -g users -m -s /bin/bash warnaud
passwd warnaud

Fix VI/VIM

# ls -altrh `which vi`
lrwxrwxrwx 1 root root 2 Nov 16 18:34 /usr/bin/vi -> ex

Prefer vim?

pacman -S vim
rm /usr/bin/vi &&  ln -s /usr/bin/vim /usr/bin/vi

GPM

Since gpm is a dependency of vim let's use it!

systemctl enable gpm
systemctl start gpm

Xorg / XDM

Xorg

Reference: Xorg & Intel Install all those packages …

# pacman -S xorg-server xorg-apps xorg-fonts xorg-fonts-100dpi xorg-fonts-75dpi xorg-twm xorg-xclock xorg-xinit xorg-xdm xterm xf86-video-intel xorg-xmessage xorg-xcalc xorg-xfontsel xorg-utils

Reply to questions:

:: There are 37 members in group xorg-apps:
:: Repository extra
   1) xorg-bdftopcf  2) xorg-iceauth  3) xorg-luit  4) xorg-mkfontdir  5) xorg-mkfontscale  6) xorg-sessreg  7) xorg-setxkbmap  8) xorg-smproxy
   9) xorg-x11perf  10) xorg-xauth  11) xorg-xbacklight  12) xorg-xcmsdb  13) xorg-xcursorgen  14) xorg-xdpyinfo  15) xorg-xdriinfo  16) xorg-xev
   17) xorg-xgamma  18) xorg-xhost  19) xorg-xinput  20) xorg-xkbcomp  21) xorg-xkbevd  22) xorg-xkbutils  23) xorg-xkill  24) xorg-xlsatoms
   25) xorg-xlsclients  26) xorg-xmodmap  27) xorg-xpr  28) xorg-xprop  29) xorg-xrandr  30) xorg-xrdb  31) xorg-xrefresh  32) xorg-xset  33) xorg-xsetroot
   34) xorg-xvinfo  35) xorg-xwd  36) xorg-xwininfo  37) xorg-xwud
 
Enter a selection (default=all):
:: There are 2 members in group xorg-fonts:
:: Repository extra
   1) xorg-font-util  2) xorg-fonts-encodings
 
Enter a selection (default=all): 1
resolving dependencies...
:: There are 4 providers available for libgl:
:: Repository extra
   1) mesa-libgl  2) nvidia-304xx-utils  3) nvidia-libgl
:: Repository community
   4) catalyst-utils
 
Enter a number (default=1): 1

Add some modules at boot for KMS

vi /etc/mkinitcpio.conf
...
MODULES="i915"
...

Acceleration method

vi /etc/X11/xorg.conf.d/20-intel.conf
Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "AccelMethod"  "sna"
EndSection
 vi /etc/X11/xorg.conf.d/10-evdev.conf 
Section "InputClass"
        Identifier "evdev keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
        Option "XkbLayout" "us"
        Option "XkbVariant" "intl"
EndSection

XDM

Reference: https://wiki.archlinux.org/index.php/XDM

pacman -S xorg-xdm

Enable systemd service

systemctl enable xdm.service

Optional, if you made a customize version

vi /usr/lib/systemd/system/xdm.service
[Unit]
Description=X-Window Display Manager
After=systemd-user-sessions.service
 
[Service]
ExecStart=/usr/bin/xdm -c /etc/X11/xdm/lcars-xdm/xdm-config -nodaemon
Type=notify
NotifyAccess=all
 
[Install]
Alias=display-manager.service

Copy the necessary files from /etc/skel

cp /etc/skel/.xsession ~/.

make sure its permission are 774

Fvwm

pacman -S fvwm

Import my configuration:

mkdir ~/.fvwm && cd .fvwm && svn co https://fvwm.svn.beanstalkapp.com/fvwm/trunk/bazooka . 

Alsa

Reference: https://wiki.archlinux.org/index.php/Alsa

pacman -S alsa-utils

Set volume levels:

alsamixer

Test:

speaker-test -c 2

Laptop / powersaving (doesn't work ... )

ACPID

To have access to buttons + power settings, first install acpi and acpid

pacman -S acpi acpid

Reference:https://wiki.archlinux.org/index.php/Acpi and https://wiki.archlinux.org/index.php/Acpid and https://wiki.archlinux.org/index.php/ACPI_hotkeys Start the deamon and enable it:

systemctl enable acpid
systemctl start acpid

TPB

For other nice osd display install tpb FIXME:

yaourt -S tpb

Reference:https://wiki.archlinux.org/index.php/ThinkPad_OSD Configure it:

vi /etc/tpbrc
OSDCOLOR    Green
OSDVERTICAL 0
OSDHORIZONTAL 0
OSDPOS      MIDDLE
OSDALIGN    CENTER

Udev

Create a special rule to suspend everything if battery is at 2%

vi /etc/udev/rules.d/lowbat.rules
## SLEEP IF BATTERY IS LOW
SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="2", RUN+="/usr/bin/systemctl suspend"

i915

Power consumption for Intel Graphics:

vi /etc/modprobe.d/modprobe.conf
options i915 i915_enable_rc6=1 i915_enable_fbc=1 lvds_downclock=1

Rebuild the kernel:

mkinitcpio -p linux && mkinitcpio -p linux-ck

TLP

Reference:https://wiki.archlinux.org/index.php/TLP Install required packages:

yaourt -S tlp tp_smapi tp_smapi-ck dkms-acpi_call-git smartmontools

FIXME tp_smapi doesn't seems to launch … Enable the service:

systemctl enable tlp

Sysctl

Reference: https://wiki.archlinux.org/index.php/Sysctl FIXME add in /etc/sysctl.conf

vm.dirty_writeback_centisecs=1500
vm.laptop_mode=5 

Syslinux

After those tweaks, here's Syslinux cfg file

DEFAULT arch-ck
PROMPT 0        # Set to 1 if you always want to display the boot: prompt 
TIMEOUT 50
 
UI vesamenu.c32
 
MENU RESOLUTION 1366 768
MENU CLEAR
 
MENU TITLE ~ 30L3 - Select OS ~
MENU COLOR border       30;44   #40ffffff #a0000000 std
MENU COLOR title        1;36;44 #9033ccff #a0000000 std
MENU COLOR sel          7;37;40 #e0ffffff #20ffffff all
MENU COLOR unsel        37;44   #50ffffff #a0000000 std
MENU COLOR help         37;40   #c0ffffff #a0000000 std
MENU COLOR timeout_msg  37;40   #80ffffff #00000000 std
MENU COLOR timeout      1;37;40 #c0ffffff #00000000 std
MENU COLOR msg07        37;40   #90ffffff #a0000000 std
MENU COLOR tabmsg       31;40   #30ffffff #00000000 std
 
 
LABEL arch
	MENU LABEL Arch Linux
	LINUX ../vmlinuz-linux
	APPEND root=/dev/sdb3 ro
	INITRD ../initramfs-linux.img quiet vga=current ipv6.disable=1 pcie_aspm=force acpi_backlight=vendor
 
LABEL archfallback
	MENU LABEL Arch Linux Fallback
	LINUX ../vmlinuz-linux
	APPEND root=/dev/sdb3 ro
	INITRD ../initramfs-linux-fallback.img
 
LABEL arch-ck
        MENU LABEL Arch Linux CK
        LINUX ../vmlinuz-linux-ck
        APPEND root=/dev/sdb3 ro
        INITRD ../initramfs-linux-ck.img quiet vga=current ipv6.disable=1 elevator=bfq pcie_aspm=force acpi_backlight=vendor
 
LABEL arch-ck-fallback
        MENU LABEL Arch Linux CK Fallback
        LINUX ../vmlinuz-linux-ck
        APPEND root=/dev/sdb3 ro
        INITRD ../initramfs-linux-ck-fallback.img
 
LABEL windows
        MENU LABEL Windows 7 Professional 64bits
        COM32 chain.c32
        APPEND hd0 1
 
LABEL hdt
        MENU LABEL HDT (Hardware Detection Tool)
        COM32 hdt.c32
 
LABEL reboot
        MENU LABEL Reboot
        COM32 reboot.c32
 
LABEL off
        MENU LABEL Power Off
        COMBOOT poweroff.com

Thinkpad

Wacom

Reference: https://wiki.archlinux.org/index.php/Wacom Install the driver:

pacman -S xf86-input-wacom

FIXME la suite …

Disable Touchpad

Deactivate the useless touchpad:

 vi /etc/X11/xorg.conf.d/10-evdev.conf 
Section "InputClass"
        Identifier "evdev touchpad catchall"
        MatchIsTouchpad "off"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
EndSection

FIXME Check alternate solution:https://wiki.archlinux.org/index.php/Synaptics_Touchpad

TrackNav enhancement

This hack will enable scrolling using the middle button + the TrackPoint™®©

vi /etc/X11/xorg.conf.d/20-thinkpad.conf
Section "InputClass"
    Identifier	"Trackpoint Wheel Emulation"
    MatchProduct	    "TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|USB Trackpoint pointing device"
    MatchDevicePath	    "/dev/input/event*"
    Option		    "EmulateWheel"        "true"
    Option		    "EmulateWheelButton"  "2"
    Option		    "Emulate3Buttons"	  "false"
    Option		    "XAxisMapping"	  "6 7"
    Option		    "YAxisMapping"        "4 5"
EndSection

Fingerprint reader

Reference: https://wiki.archlinux.org/index.php/Fingerprint-gui Unfortunately no free software for my fingerprint reader I have to use fingerprint-gui, anyhow it works!

yaourt -S fingerprint-gui

Sadly it depends on tons of crap like Qt …
Add you user(s) to the plugdev group

sudo gpasswd -a USERNAME plugdev

Configure applications to recognize fingerprints:

  • sudo
vi /etc/pam.d/sudo
#%PAM-1.0
auth            sufficient      pam_fingerprint-gui.so
auth            required        pam_unix.so
auth            required        pam_nologin.so
  • su (doesn't work for me … FIXME)
vi  /etc/pam.d/su
#%PAM-1.0
auth            sufficient      pam_rootok.so
auth            sufficient      pam_fingerprint-gui.so
# Uncomment the following line to implicitly trust users in the "wheel" group.
#auth           sufficient      pam_wheel.so trust use_uid
# Uncomment the following line to require a user to be in the "wheel" group.
#auth           required        pam_wheel.so use_uid
auth            required        pam_unix.so
account         required        pam_unix.so
session         required        pam_unix.so
  • xscreensaver
vi /etc/pam.d/xscreensaver
auth            sufficient      pam_fingerprint-gui.so
auth            required        pam_unix_auth.so

:!: Update, I have to use the following trick to make it works again:

export XAUTHORITY=~/.Xauthority

Add it in your ~/.bashrc and it should do the trick!
Reference: http://home.ullrich-online.cc/fingerprint/Forum/topic.php?TopicId=53

  • xdm
vi /etc/pam.d/xdm
#%PAM-1.0
auth            sufficient      pam_fingerprint-gui.so
auth            required        pam_unix.so
auth            required        pam_nologin.so
auth            required        pam_env.so
account         required        pam_unix.so
password        required        pam_unix.so
session         required        pam_unix.so
session         required        pam_limits.so
session         required        pam_loginuid.so
-session        optional        pam_systemd.so

Register your fingerprints
:!: In an X environment :!:
:!: Might need a reboot to load the appropriate modules … :!:

fingerprint-gui

The interface is pretty self explanatory. You have to select the device first then scan the fingers you want.
If in the drop down menu you have Unknown device, reboot (or find the nice corresponding module)

Bluetooth

Reference: https://wiki.archlinux.org/index.php/Bluetooth

pacman -S bluez

FIXME Any of this required?

Optional dependencies for bluez
    gstreamer0.10-base: bluetooth GStreamer support
    alsa-lib: Audio bluetooth devices support [installed]
    dbus-python: to run bluez-simple-agent
    pygobject: to run bluez-simple-agent
    libusb-compat: USB adapters support
    cups: CUPS backend

I kind of never use bluetooth so I start it when necessary

systemctl start bluetooth.service

FIXME .. have some fun with it

Multimedia Keys

Mute/Volume up and Down are recognized by default in xev, so with xbindkeys let's map them

pacman -S xbindkeys

Create a file that contain the definition of the buttons + the action(s)

vi ~/.xbindkeysrc.scm

Here I'll map Mute / Volume up / Volume Down

(xbindkey '("XF86AudioMute") "amixer set Master toggle")
(xbindkey '("XF86AudioRaiseVolume") "amixer set Master 2dB+ unmute")
(xbindkey '("XF86AudioLowerVolume") "amixer set Master 2dB- unmute")

Last but not least, add

xbindkeys &

To your ~/.xinitrc or whatever file launched at login

Systemd journal

It's always nice to see some logs even if they are in binary format ……

Hint: You are currently not seeing messages from other users and the system.
      Users in the 'systemd-journal' group can see all messages. Pass -q to
      turn off this notice.

Fix:

sudo gpasswd -a USERNAME systemd-journal

Other software

Archlinuxfr repository

vi /etc/pacman.conf
...
[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$arch

\o/ No signature

Yaourt

Reference: http://archlinux.fr/yaourt-en

pacman -Sy yaourt

Sudo

pacman -S sudo
visudo
...
root ALL=(ALL) ALL
someuser ALL=(ALL) ALL

Just add the 'someuser' line

Compilation options

:!: just for fun not really mandatory Reference: https://wiki.archlinux.org/index.php/Makepkg.conf

vi /etc/makepkg.conf

Modify CFLAGS/CXXFLAGS:

# -march=native also sets the correct -mtune=
CFLAGS="-march=native -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
CXXFLAGS="${CFLAGS}"

Modify MAKEFLAGS (4 = output of nproc)

MAKEFLAGS="-j4"

Mandatory packages - for terminal users

List of software I use and abuse

yaourt -S screen bash-completion wavemon glances htop bmon irssi lftp rsync wget curl bc figlet toilet pmount dfc git rdesktop

I use yaourt since some of them are not in repositories and then built from aur

Cups

Reference: https://wiki.archlinux.org/index.php/Cups

pacman -S libcups cups cups-filters ghostscript gsfonts

CK Kernel

For more aggressive scheduling, you can use the ck patchset
References:

:!: Super up-to-date :!:

vi /etc/pacman.conf

Add at the end:

[repo-ck]
SigLevel = PackageRequired
Server = http://repo-ck.com/$arch

Add keys for signing shit …

pacman-key -r 5EE46C4C
pacman-key --lsign-key 5EE46C4C

Refresh pacman's database:

pacman -Sy

Install kernel-ck matching your architecture (see Repo-ck page for reference)

pacman -S linux-ck-ivybridge linux-ck-ivybridge-headers

Add a nice entry in syslinux

vi /boot/syslinux/syslinux.cfg
...
DEFAULT arch-ck
...
LABEL arch-ck
        MENU LABEL Arch Linux CK
        LINUX ../vmlinuz-linux-ck
        APPEND root=/dev/sdb3 ro
        INITRD ../initramfs-linux-ck.img quiet ipv6.disable=1 elevator=bfq
 
LABEL arch-ck-fallback
        MENU LABEL Arch Linux CK Fallback
        LINUX ../vmlinuz-linux-ck
        APPEND root=/dev/sdb3 ro
        INITRD ../initramfs-linux-ck-fallback.img
...

Bye bye IPv6 and change the schedule to Con Kolivas' bfq

URxvt

pacman -S rxvt-unicode urxvt-perls

(Not yet implemented : )

 URxvt.perl-ext-common:      default,clipboard,url-select,keyboard-select
 URxvt.url-select.launcher:  chromium
 URxvt.url-select.underline: true
 URxvt.keysym.M-u:           perl:url-select:select_next
 URxvt.keysym.M-Escape:      perl:keyboard-select:activate
 URxvt.keysym.M-s:           perl:keyboard-select:search

X11 software

yaourt -S chromium hsetroot imagemagick vlc emelfm2 flashplugin xosd

For acrobat reader/skype, there's a need for the multilib repository … well coded too!

vi /etc/pacman.conf

Uncomment:

[multilib]
Include = /etc/pacman.d/mirrorlist

Then:

yaourt -Sy acroread skype

:!: tons of 32bits libraries …. FIXME acroread libre-office* fonts skype…

Final stuff

Ntfs share

Reference: https://wiki.archlinux.org/index.php/Ntfs

pacman -S ntfs-3g
vi /etc/fstab
# 
# /etc/fstab: static file system information
#
# <file system> <dir>   <type>  <options>       <dump>  <pass>
# /dev/sdb3 UUID=34cedc78-e156-4dbb-a428-4d594d6b34a8
LABEL=LINUX             /               ext4            defaults,noatime,discard        0 1
 
# /dev/sda2 UUID=f8a1e862-64b7-41d7-ac7d-4b75b346ceb5
LABEL=VAR               /var            ext4            rw,relatime,data=ordered        0 2
 
# /dev/sda3 UUID=57552366-9356-43bf-8bd2-bb0b25a1d318
LABEL=HOME              /home           ext4            rw,relatime,data=ordered        0 2
 
# /dev/sda1 UUID=dcba8ead-fb4b-4e06-a9e5-1a55f1c353e0
LABEL=SWAP              none            swap            defaults                        0 0
 
# /dev/sda4 Windows
LABEL=DATA              /media/data     ntfs-3g         uid=warnaud,gid=users           0 0

LibreOffice

Imagine Office in Java? There you go …
Reference: https://wiki.archlinux.org/index.php/LibreOffice

yaourt -S ttf-dejavu artwiz-fonts libreoffice libreoffice-en-US libreoffice-fr

Free to install ~70 pkgs \o/

NTP

Reference: https://wiki.archlinux.org/index.php/Ntp

pacman -S ntp
vi /etc/ntp.conf
server 0.fr.pool.ntp.org iburst
server 1.fr.pool.ntp.org iburst
server 2.fr.pool.ntp.org iburst
server 3.fr.pool.ntp.org iburst
systemctl start ntpd

Well I don't enable it since … I mostely have no connection at boot on a laptop ;-)

os/archlinux/30l3.txt · Last modified: 2021/12/29 20:01 by warnaud