Installing Linux (Lubuntu) on a Sony Vaio P netbook

There is nothing to do, or rather, the desire to have a device that is slightly more functional than a tablet on Android'e decided to buy a used Sony Vaio P netbook , it really attracted me with its dimensions.

I got a model VGN-P39VRL with an "Atomic" processor with a speed of 2 GHz and a 128 GB SSD-drive. Below is my experience installing Linux (more precisely, Lubuntu) on this device:

1. The choice of distribution


Lubuntu. Everything else is heavy in my opinion - because we do not need checkers, but ride. Therefore, here: lubuntu.org

2. Installation


It was not possible to start from the standard image in graphical mode, X.Org did not start, I had to use alternate.
The installation is standard, a special moment: in order to use hibernate in the future, you need to create a swap-partition no less than the size of the RAM.

3. Update


After installation, the Update Manager starts automatically. Before starting the update check, it’s better to go into the Manager’s settings and connect all available repositories - it won’t be worse, anyway, in the course of the play you still have to connect a bunch of ppa.
Then - update.

4. Network setup.


During installation, the installer asked you to specify the network that will be used. I indicated my home WiFi (network name and WPA key). A side effect - this interface was registered in
/ etc / network / interfaces (and the key is in clear text!) And became inaccessible to Network Manager. To fix this drawback, you need to do the following things:

4.1.
Delete (or comment out with #) the interface description from the file / etc / network / interfaces

4.2.
In the Network Manager settings (file /etc/NetworkManager/NetworkManager.conf) specify: Reboot.
[ifupdown]
managed=true



5. CPU frequency control


For some reason, the processor frequency control module is not set by default, so it shuffles at the maximum frequency. To fix this, install:
sudo apt-get install cpufreqd cpufrequtils

6. Installing drivers for the video


Information here: ubuntuforums.org/showthread.php and here: wiki.ubuntu.com/HardwareSupportComponentsVideoCardsPoulsbo
For version 11.10, the best option is the EMGD driver. Since 12.04 is the new version of X.Org, I’ll have to use PCB-GFX instead of EMGD, which does not yet support 3D hardware acceleration and video, which depresses me.

6.1.
We put drivers
sudo add-apt-repository ppa:gma500/emgd110
sudo apt-get update
sudo apt-get install emgd-support


6.2.
Change the configuration file. Due to the exotic screen resolution (1600x768), the standard config is not suitable. Therefore, we take the config from here: paste.ubuntu.com/877399 , call 10-emgd.conf and copy it to /usr/share/X11/xorg.conf.d/ (with a replacement if there was something of the same name).

6.3.
Setting sleep mode.
We install the acpi-support package:
sudo apt-get install acpi-support
Download the file paste.ubuntu.com/878451 , call it acpi-support and replace the file in / etc / default

6.4.
Adjust the brightness control.
We check that the kernel module responsible for adjusting the brightness (emgdbl) is added to / etc / modules. If not, add.
In the /etc/modprobe.d/blacklist-emgd.conf add the poulsbo module, which bothers us:
blacklist poulsbo
We make changes to the bootloader config to pass the correct parameter to the kernel: the
file / etc / default / grub, write acpi_backlight = video in the line GRUB_CMDLINE_LINUX_DEFAULT. Accordingly, if something else was written, change.
Update the bootloader settings by running the
sudo update-grub
Setup of everything related to the video completed, you can try to reboot

7. Power Consumption



7.1.
Good site lesswats.org

7.2.
Powertop is a good utility that shows power consumption

8. Optimization for SSD



8.1.
Mount options for the file system. It is recommended to add noatime,nodiratime,discardto all ext4 partitions in / etc / fstab
. I really have to boot the system when adding discard to /, so here you need to be careful

8.2.
Set up a delayed entry. Add lines to /etc/sysctl.conf
vm.laptop_mode = 5
vm.dirty_writeback_centisecs = 6000


8.3.
Change the I / O scheduler to noop:
in / etc / default / grub in the line GRUB_CMDLINE_LINUX_DEFAULT add elevator = noop, and then run
sudo update-grub

8.4.
We transfer temporary file systems to memory. To do this, open / etc / fstab and add the lines there
tmpfs /var/lock tmpfs defaults 0 0
tmpfs /tmp tmpfs defaults 0 0
tmpfs /var/tmp tmpfs defaults 0 0


8.5.
We tell the system to use RAM more than swap: add the line to /etc/sysctl.conf
vm.swappiness = 10

8.6.
Almost all of these tips with a more detailed description are in the article: habrahabr.ru/post/129551 , from where I got them

9. Optimization



9.1.
Good article vasilisc.com/speedup_ubuntu

9.2.
Add options to partitions in ext4 in / etc / fstab commit=100,barrier=0

9.3.
Turn on zRam (compressed swap partition in memory):
sudo add-apt-repository ppa:shnatsel/zram
sudo apt-get update
sudo apt-get install zramswap-enabler


9.4.
Workaround for a kernel bug for increased power consumption:
In / etc / default / grub, add GRUB_CMDLINE_LINUX_DEFAULT in the line
pcie_aspm=force
Do not forget to do
sudo update-grub

9.5.
We put the core from Liquorix with useful patches: There is one feature. In kernel 3.2, the module parameter zram num_devices was renamed to zram_num_devices, so after updating zRam stopped working. It is repaired simply: in the /etc/init/zramswap.conf file we change the line to
echo "deb liquorix.net/debian sid main" | sudo tee /etc/apt/sources.list.d/liquorix.list
echo "deb-src liquorix.net/debian sid main" | sudo tee -a /etc/apt/sources.list.d/liquorix.list
sudo apt-get update
sudo apt-get install '^liquorix-([^-]+-)?keyring.?'
sudo apt-get install linux-image-liquorix-686 linux-headers-liquorix-686



modprobe zram num_devices=$num_cpus

modprobe zram zram_num_devices=$num_cpus
9.6.
Power optimization with laptop-mode-tools.
We
sudo apt-get install laptop-mode-tools
put the package itself . Oddly enough, the package from Ubuntu 11.10 does not support the 3.x kernel branches. We fix it by hand: in the file / usr / sbin / laptop_mode we look for lines and insert lines between the lines (to be sure). After that, you can dig into the configuration files in /etc/laptop-mode/laptop-mode.conf and /etc/laptop-mode/conf.d/*
case "$KLEVEL" in
"2.4" ) ;;
"2.6" ) ;;
*)
log "ERR" "Unhandled kernel version: $KLEVEL ('uname -r' = '$(uname -r)')" >&2
exit 1
;;


"2.6" ) ;;
*)


"3.0" ) ;;
"3.1" ) ;;
"3.2" ) ;;
"3.3" ) ;;




10. Anything different



10.1.
A bug with empty space in lxpanel
After a laptop wakes up in lxpanel, an empty space appears in the system tray. To remove it in /etc/pm/sleep.d we create a file with an arbitrary name (I named 10_lxpanel-restart) and paste it there: Just in case, we make the file executable: For now, that's all. I tried unsuccessfully to get the built-in GPS, but since I don’t really need it, I left it for now.
#!/bin/bash
case "$1" in
suspend|hibernate)
#do nothing
;;
resume|thaw)
export DISPLAY=:0
sleep 5 && lxpanelctl restart & #Delayed so the battery icon can finish wrecking shop.
;;
*)
exit 1
;;
esac
exit 0


sudo chmod a+x /etc/pm/sleep.d/10_lxpanel-restart


Also popular now: