The Arch Diaries: (2) Xorg, Network, Hardware Support

Even after installation (see part 1), the Arch system is still pretty basic. You can boot into text mode, connect to the internet with wifi-menu or even do some basic text browsing, but for a desktop system a very central part is still missing – the desktop. The 2nd part of my “Arch from Scratch” diary shows how to set up X and configure some hardware for my Asus 1215N (the process may be different on different hardware).

  1. The first step is of course to install X-Windows. If you don’t know exactly what hardware you have, you can just install the whole Xorg group with pacman -S xorg. This will install most drivers and allow Xorg to auto detect your hardware. To be able to do ANYTHING in X you will also need xorg-init and xterm, too. Now you should be able to ‘startx’ successfully from root into a naked XWindows with a couple of xterms.
  2. You shouldn’t work as root of course, so now’s the time to create a new user with adduser. Some recommendations for groups can be found in the wiki. For startx to work for the new user, I had to copy /etc/X11/xinit/xinitrc to ~/.xinitrc.
  3. While you’re at it, install sudo and enable it for your user (or the whole wheel group) – run EXPORT EDITOR=nano; visudo and uncomment the desired line in the config file
  4. Add Firefox or Chromium and you already have a very basic work environment, allowing you to read Arch wiki and access the forum
  5. For easy AUR access you want a tool like yaourt or packer - I used this blog post as a guide, but you can also check out the more general documentation in the Arch wiki. Once this is done, you can simply search and install packages by typing e.g. packer chrome and then picking the number from the list.
  6. To support my Nvidia Optimus graphics chip, I installed Bumblebee from the AUR by simply typing packer bumblebee. I didn’t have to change anything in the PKGBUILD files, but Arch wiki insists you should always have a look at them, to check if they really do what they seem (a malicious PKGBUILD could do serious harm to your computer). This will install nvidia-utils-bumblebee but not the Nvidia drivers and power management, so you have to install nvidia and dkms-bbswitch separately. After a reboot you should be able to run any program against your Nvidia chip with the optirun command.
  7. For the automatic dkms rebuild to work properly after a kernel update, you have to change /etc/bumblebee/bumblebee.conf from PMMETHOD=auto to PMMETHOD=bbswitch (as described by Samsagax in a comment on the AUR page) and enable the DKMS service with systemctl enable dkms (more details here)
  8. Even though wifi was working with the included Kernel drivers, I experienced frequent disconnects with my BCM4013 wireless chip. After some research I finally resolved the issue by switching to the proprietary dkms-broadcom-wl driver from the AUR. To make sure broadcom-wl is really used, you should enable the kernel module wl and blacklist b43, ssb and brcm80211 (as described in the wiki). Using broadcom-wl will switch the wireless device from wlan0 to eth0, so you have to change netcfg configurations accordingly and wifi-menu will not work anymore.
  9. So this a good moment to install a network administration tool like wicd (don’t forget to configure the wireless device, usually wlan0 or eth0 – the easiest way to do this is in the preferences of the wicd-client took from package wicd-gtk)
  10.  Of course you could just install a desktop environment like XFCE (pacman -S xfce) or KDE now and be done with it, or start to create your own desktop environment with a window manager (like Openbox, Fluxbox, JWM, …)

This concludes part 2 of my Arch diaries, in the next part I will describe how I created a simple, lightweight desktop environment based on the JWM window manager.

Comments are closed.