📜 ⬆️ ⬇️

Configure Archlinux on ASUS Eee 1201NL

After I got a job as an administrator of a single web project, it sometimes became necessary to do something while away from home / office. Since the main task in such situations was to log into the server via SSH and check the result of actions in the browser, I decided to stop the selection on the netbook. But I really didn’t want the vertical resolution of 600px. And yet I wanted to use a netbook not only for SSH, but also for other amenities, like watching movies. Naturally, it was planned to work under Linux, so the normal hardware support was required.

As a result, I stopped at the "incomprehensible misunderstanding» ASUS Eee PC 1201NL. This is such a kind of netbook. Very peculiar.
Firstly, it has a diagonal of as much as 12 ", which is indecent a lot for devices of this class.
Secondly, the screen resolution is 1366x768, which is very good, but small, if you do not configure a larger DPI value.
Thirdly, it is based on the nVidia ION platform, which gives good performance for such devices. The disadvantage is the short operating time - 4 hours with bluetooth / wi-fi on, if you run some demanding program (for example, Neverwinter Nights game), then the time will decrease even more.

It can be concluded that, in fact, this solution is a full-fledged low-cost small laptop. Although based on the Intel Atom processor.

It is worth noting that I consider the standard mouse-oriented interface of common DE (KDE, Gnome, XFCE, etc) to be completely uncomfortable, so I set up an awesome with the idea of ​​“one task per tag”, which, in my opinion, is optimal for a small screen.
')
Archlinux was chosen as the distribution. Why? - Because I like him. In addition, he has a good wiki (of course, something that was not there, but was discovered during setup, was added to the corresponding article).

First you need to burn the distribution kit on a flash drive, since the netbook, of course, does not have a drive that reads the disks. Since juniper hybrid discs, everything is done as simply as possible:

dd if=archlinux-2010.05-core-i686.iso of=/dev/sdb

Where archlinux-2010.05-core-i686 is a disk image (there is one caveat - installing from the netinstall image hung when downloading packages, so I chose an image with a core, later the problem with hangs when downloading large amounts of information was solved by setting MTU = 750)
/ dev / sdb - the name of our disk in the system (there is another nuance, you need to specify not / dev / sdb1, namely / dev / sdb). Attention! All information from this disc will disappear and it will have to be re-rapped later.

Breakdown and installation is pretty trivial. Three sections were created:
/ dev / sda1 - swap (3 gigabytes, for then I bought more memory, so far I don’t see any vital necessity in it)
/ dev / sda2 - / (23 gigabytes)
/ dev / sda3 - / home (everything else, 204 gigabytes)

After increasing the amount of RAM to three gigabytes, I decided to use the following folders in tmpfs (recording directly from / etc / fstab):

tmpfs /var/log tmpfs defaults,noexec,nosuid,nodev,mode=755 0 0
tmpfs /var/lock tmpfs defaults,noexec,nosuid,nodev,mode=755 0 0
tmpfs /var/run tmpfs defaults,noexec,nosuid,nodev,mode=755 0 0
tmpfs /tmp tmpfs defaults 0 0

It should be mentioned one nuance: in the WD screws of economical series (to which Scorpio Blue applies, which is installed in my model) there is such a feature: due to proprietary energy saving technology, the SMART Load_Cycle_Count value grows very quickly, disabling this technology did not help, so I turned it on, but I rendered the logs to tmpfs (the only effective solution was to disable APM, but this is not the best solution for a laptop).

In order to have full support for three-dimensional graphics and normal energy saving, you need to install the proprietary driver nVidia
By the way, this is my first time when the kernel normally picked up the native screen resolution. For what I registered the parameter vga = 0x034d to the kernel.

For normal ACPI support and hot keys, you need to load the eeepc_laptop module

modprobe eeepc_laptop

You may need to specify the kernel parameter acpi_osi = Linux. As a result, in /boot/grub/menu.lst I have the following entry for loading the kernel

kernel /boot/vmlinuz26 root=/dev/sda2 ro quiet acpi_osi=Linux vga=0x034d

For normal Wi-Fi operation, you need to install the rtl8192 module from the AUR and load the r8192se_pci module.

For the hot keys to work correctly, there is a special package in AUR called acpi-eeepc-generic , install acpid and set it in /etc/conf.d/acpi-eeepc-generic.conf

EEEPC_MODEL="1201N"

And uncomment, correcting the value to "yes"

#EEEPC_CONF_DONE="no"

Plus you need to register the following

WIFI_DRIVERS=("r8192se_pci")

Then you can run acpid.

Now we will think about energy saving. For a long time in the Linux kernel there is support for laptop mode, which allows you to use the hard disk more economically. To control this mode in Archa there is a laptop-mode-tools package. Subsequently, the LMT evolved into a centralized energy management complex. After installation, you need to add in the /etc/rc.conf file to the DAEMONS laptop-mode array.

DAEMONS=(...laptop-mode...)

Intel Atom processors support Super Hybrid Engine technology to reduce power consumption. To enable, you need to edit the following parameter in the file /etc/laptop-mode/conf.d/eee-superhe.conf

CONTROL_SUPERHE=1

As a result, it will be possible to switch manually with Fn + Space.

Then turn on Wi-Fi power management. To do this, the following parameter must be specified in the /etc/laptop-mode/conf.d/wireless-power.conf file.

CONTROL_WIRELESS_POWER_SAVING=1

Now we will configure the hard disk. Let's make it so that when it is powered from the mains, it always works, and when powered from the battery, it goes into the eco mode. To do this, in /etc/laptop-mode/laptop-mode.conf we write the following parameters:

#
# Should laptop mode tools control the hard drive power management settings?
#
# Set to 0 to disable
CONTROL_HD_POWERMGMT=1

#
# Power management for HD (hdparm -B values)
#
BATT_HD_POWERMGMT=64
LM_AC_HD_POWERMGMT=255
NOLM_AC_HD_POWERMGMT=255

Only one problem was discovered: hibernate does not work using the standard for archlinux pm-utils. To support suspend to disk, install uswsusp-git from AUR. Then you need to configure it: in the /etc/suspend.conf file you need to register the device from which to resume work. Since I have this / dev / sda1, the entry looks like this:

resume device = /dev/sda1

Now you need to add the uresume hook in /etc/mkinitcpio.conf before the filesystems and rebuild the initramfs:

mkinitcpio -p kernel26

Now the system can be sent to hibernate using the s2disk command, and, importantly, when it boots, it exits this mode. When the lid is closed, the system goes into suspend2ram, I tried s2disk, but it doesn’t make much sense, because suspend2ram requires very little energy (10-15 batches per day), and the laptop comes out of suspend2ram in a couple of seconds, which is very convenient.

As a result, we got a system that already works, but does not yet have a user friendly interface. Let's do it.

We’ll use slim as the login manager and awesome as wm. I used to start the X server from / etc / inittab, but after updating consolekit to version 0.4.3 and adding dbus to its dependencies, this method stopped working correctly. Therefore, we will use slim. To start automatically you need to add it to /etc/rc.conf in the DAEMONS array, and the following command login_cmd should be set to /etc/slim.conf

login_cmd exec ck-launch-session dbus-launch /bin/bash -login ~/.xinitrc %session> ~/.xsession-errors 2>&1

Since the login automatically executes the contents of ~ / .xinitrc, and I want to take advantage of the ssh-agent, we’ll add the following line to this file.

exec ssh-agent awesome

But there is a nuance. Since awesome requires cairo-xcb, which is not available in the official repositories, they have also thrown awesome. It can be installed from the AUR, but it is better to add the archlinuxfr repository. To do this, add the following entry to /etc/pacman.conf.

 [archlinuxfr]
 Server = http://repo.archlinux.fr/i686

And you can put awesome.

pacman -Sy awesome

If you need to install any additional libraries for awesome, they are also in AUR.

For fast network switching we will use NetworkManager. It is easy to install, use network-manager-applet to manage it, and install gnome-keyring for storing keys to wireless networks. To control bluetooth, use gnome-bluetooth. Since I use a 3G modem, modemmanager and usb_modeswitch are additionally required. After that, the DAEMONS array in /etc/rc.conf looks like this:

DAEMONS=(syslog-ng preload dbus networkmanager acpid @laptop-mode @alsa @bluetooth @ntpd slim)

Now a few words about setting up the user environment.

Awesome has a good wiki, so I'll only sign for the tuning details. The config itself can be obtained at github.com/Shtsh/awesome

I used to work with shify tags so that those tags that are not needed are not displayed. A library of vicious was used for monitoring. The strict theme is used. Accordingly, if all this is not installed, then the config will not work. Naturally, all this is available at AUR.

Tags were configured as follows:
1 - for XTerm
2 - Web browsers (main - chromium)
3 - Pidgin
4 - Skype
5 - Mail (thunderbird)
6 - Image Viewer (GQview)
7 - Music (deadbeef)
9 - LibreOffice

The only problem is thunderbird. On a weak atom, it feels clumsy. But in terms of functionality, it has not yet succeeded in selecting an alternative.

By tags you can switch by Win + number, launch programs through the menu or with Win + R. All windows are either maximized or tiling is used.

At the end of the config, pidgin, thunderbird, deadbeef, skype, quick launch of libreoffice, nm-applet, bluetooth-applet automatically start.

The file manager is mc. GTK + axis theme, Droid Sans fonts. Below you can see screenshots (clickable).



It is worth noting that in the above, there are no actions that are routinely performed with a normal installation. This text wanted to focus on the little things applicable to a particular laptop and which can be useful.

Useful links:
wiki.archlinux.org/index.php/Asus_Eee_PC_1201NL
wiki.archlinux.org/index.php/Laptop_mode
wiki.archlinux.org/index.php/NetworkManager
wiki.archlinux.org/index.php/Bluetooth
wiki.archlinux.org/index.php/Slim
awesome.naquadah.org/wiki/Main_Page

Source: https://habr.com/ru/post/114346/


All Articles