User Tools

Site Tools


os:archlinux:c3n0t4f

Overview

I “enhanced” my Dell Precision T3400 with an additional graphic card and setup a raid 0 on 2 disks

Here's the output of lspci

00:00.0 Host bridge: Intel Corporation 82X38/X48 Express DRAM Controller
00:01.0 PCI bridge: Intel Corporation 82X38/X48 Express Host-Primary PCI Express Bridge
00:06.0 PCI bridge: Intel Corporation 82X38/X48 Express Host-Secondary PCI Express Bridge
00:1a.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 02)
00:1a.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 02)
00:1a.2 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 02)
00:1a.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 02)
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 02)
00:1c.5 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 6 (rev 02)
00:1d.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 02)
00:1d.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92)
00:1f.0 ISA bridge: Intel Corporation 82801IR (ICH9R) LPC Interface Controller (rev 02)
00:1f.2 RAID bus controller: Intel Corporation 82801 SATA Controller [RAID mode] (rev 02)
00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 02)
01:00.0 VGA compatible controller: NVIDIA Corporation Device 11c0 (rev a1)
01:00.1 Audio device: NVIDIA Corporation Device 0e0b (rev a1)
02:00.0 VGA compatible controller: NVIDIA Corporation G80 [Quadro FX 4600] (rev a2)
04:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5754 Gigabit Ethernet PCI Express (rev 02)

Here's the output of lsusb

Bus 001 Device 003: ID 05e3:0607 Genesys Logic, Inc. Logitech G110 Hub
Bus 001 Device 004: ID 0718:0146 Imation Corp. 
Bus 003 Device 002: ID 06a3:0cd0 Saitek PLC 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 005: ID 046d:c228 Logitech, Inc. 
Bus 001 Device 006: ID 046d:c229 Logitech, Inc.

Here's the output of cpuinfo

 

Partition table

DiskPartitionNameLabelSizeFormatComment
raid0Volume1p0???NTFSC:\
raid0Volume1p1?LINUX?ext4/
raid0Volume1p2?????
raid0Volume1p3?????
raid0Volume1p4?????
raid0Volume1p5?SWAP?swapswap
raid0Volume1p6?HOME?ext4/home partition

Base install

References

First install

Boot on the USB stick / CD - the isos are taken from here → https://www.archlinux.org/download/ take the mirror closest to you and select the netinstall ISO

boot

On Dell's BIOS you have to press [F12] to boot from a different device.
:!: Since double wankers have time to spare to code drivers and oblige people to use it, you have to put “nomodeset” on the boot commandline otherwise nouveau will crash the boot! Sorry to have 2 graphic cards and 3 screens …

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

Raid

Reference: https://wiki.archlinux.org/index.php/Installing_with_Fake_RAID
And yet another enhancement … raid doesn't work by default anymore :-x

ls -al /dev/mapper
arch_root-image@  control

empty…
test

dmraid -r
/dev/sdb: isw, "isw_dbdeeiadjh", GROUP, ok, 976773165 sectors, data@ 0
/dev/sda: isw, "isw_dbdeeiadjh", GROUP, ok, 976773165 sectors, data@ 0

Recognized …
Try to start it:

dmraid -ay
RAID set "isw_dbdeeiadjh_Volume0" was not activated
RAID set "isw_dbdeeiadjh_Volume1" was not activated
ERROR: device "isw_dbdeeiadjh_Volume0" could not be found
ERROR: device "isw_dbdeeiadjh_Volume1" could not be found

Perfect …
Output of dmesg:

[  209.459439] device-mapper: table: 254:1: striped: Couldn't parse stripe destination
[  209.459525] device-mapper: ioctl: error adding target to table
[  209.459967] device-mapper: table: 254:1: striped: Couldn't parse stripe destination
[  209.460063] device-mapper: ioctl: error adding target to table

Impressive…
In order to make the raid work and be recognize:

ls -l /dev/md                                                                     
total 0
lrwxrwxrwx 1 root root  8 May 29 10:39 imsm0 -> ../md127
lrwxrwxrwx 1 root root  8 May 29 10:39 Volume0_0 -> ../md125
lrwxrwxrwx 1 root root 10 May 29 10:39 Volume0_0p1 -> ../md125p1
lrwxrwxrwx 1 root root 10 May 29 10:39 Volume0_0p2 -> ../md125p2
lrwxrwxrwx 1 root root  8 May 29 10:39 Volume1_0 -> ../md126
lrwxrwxrwx 1 root root 10 May 29 10:39 Volume1_0p1 -> ../md126p1
lrwxrwxrwx 1 root root 10 May 29 10:39 Volume1_0p2 -> ../md126p2
lrwxrwxrwx 1 root root 10 May 29 10:39 Volume1_0p5 -> ../md126p5
lrwxrwxrwx 1 root root 10 May 29 10:39 Volume1_0p6 -> ../md126p6

You'll find all mdXXX device created by who knows what AND fucking up the fakeraid (why does my intuition turns to shit systemd???)
Stop this madness:

mdadm -S /dev/mdXXX

Replace XXX by the values … in this example: md126/125/127 …
Then suddenly

dmraid -ay
RAID set "isw_dbdeeiadjh_Volume0" was activated
RAID set "isw_dbdeeiadjh_Volume1" was activated
device "isw_dbdeeiadjh_Volume0" is now registered with dmeventd for monitoring
device "isw_dbdeeiadjh_Volume1" is now registered with dmeventd for monitoring
RAID set "isw_dbdeeiadjh_Volume0p1" was activated
RAID set "isw_dbdeeiadjh_Volume0p2" was activated
RAID set "isw_dbdeeiadjh_Volume1p1" was activated
RAID set "isw_dbdeeiadjh_Volume1p5" was activated
RAID set "isw_dbdeeiadjh_Volume1p6" was activated

Amazing! and GG!

Formatting

Let's format all these partitions in ext4 format.

mkfs.ext4 -L LINUX /dev/mapper/isw_dbdeeiadjh_Volume1p1
mkfs.ext4 -L HOME /dev/mapper/isw_dbdeeiadjh_Volume1p6
mkswap -L SWAP /dev/mapper/isw_dbdeeiadjh_Volume1p5

Mount them

Mounting and creating mount points:

mount /dev/mapper/isw_dbdeeiadjh_Volume1p1 /mnt
mkdir /mnt/home
mount /dev/mapper/isw_dbdeeiadjh_Volume1p6 /mnt/home
swapon /dev/mapper/isw_dbdeeiadjh_Volume1p5

Check

mount

Base system

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

pacstrap /mnt base base-devel

Fstab

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

Yes I use Labels, UUID sucks

  • check fstab
#                                         
# /etc/fstab: static file system information
#
# <file system> <dir>   <type>  <options>       <dump>  <pass>
# /dev/mapper/isw_dbdeeiadjh_Volume1p1 UUID=2141c0d6-1804-4cb0-ac76-661a6cad6f90
LABEL=LINUX             /               ext4            rw,relatime,stripe=64,data=ordered      0 1
[Fstab] 
# /dev/mapper/isw_dbdeeiadjh_Volume1p6 UUID=b8a60d67-40da-41e6-94e9-28af9e55a592
LABEL=HOME              /home           ext4            rw,relatime,data=ordered        0 2
       
# /dev/mapper/isw_dbdeeiadjh_Volume1p5 UUID=369d66b4-d45a-4ded-a29c-7817e2ece675
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 c3n0t4f > /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

Add:

[...]
MODULES="dm_mod"
[...]
HOOKS="base udev autodetect modconf block dmraid filesystems keyboard fsck"

reference: https://wiki.archlinux.org/index.php/Installing_with_Fake_RAID#Install_and_configure_Arch Build the images …

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

Changed sda3 by the almighty name of the raid … + uncommented windows part

Then the magic:

 /usr/sbin/syslinux-install_update -i -a -m

I get some funny nice message:

Syslinux install successful
Boot Flag Set - /dev/mapper/isw_dbdeeiadjh_Volume1p1
ABORT! MBR installation to partition (/dev/mapper/isw_dbdeeiadjh_Volume1)!

Successful and ABORT at the same time! GG again!

  • 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
  • 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 ====Level 3 Headline 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/c3n0t4f.txt · Last modified: 2021/12/29 20:00 by warnaud