Skip to content

Sony VAIO VGN-P70H

The Sony VAIO P series (2009) was an ultra-portable "lifestyle PC" with a distinctive pocket-sized form factor. I use a VGN-P70H (Japanese model) as a TTY-only Linux machine.

Specs

Spec Detail
Screen 8" LED, 1600x768
CPU Intel Atom Z520 (1 core, 2 threads, 1.33 GHz, 32-bit)
GPU Intel GMA 500 (PowerVR SGX535)
RAM 2 GB DDR2 (soldered)
Storage 60 GB HDD (original), mSATA SSD (modded)
Weight 589 g

Mods

SSD Swap

The original 1.8" ZIF/CE hard drive has been replaced with an mSATA SSD using an adapter board.

Required component:

The adapter board is secured in place with double-sided tape.

CMOS Battery

The original CMOS battery was dead. I replaced it with a CR1220 3V battery with a 2-pin PH connector, soldering the cable onto the original connector.

Power Supply

The original battery is dead and no longer holds a charge. Instead of sourcing a replacement VGP-BPS15, I power the laptop with a USB-C PD power bank and a USB-C PD trigger to 4.8x1.7mm DC jack (compact 90-degree right angle, 12V). The VAIO P expects 10.5V but runs fine on 12V.

Disassembly

Repairability: 0/10

Disassembly is a nightmare. Every plastic dent and clip will break when opening the case. When reassembling, I ended up gluing the bottom case shut. Do not open this machine unless you are prepared to accept cosmetic damage.

OS Setup

I installed Void Linux and use it exclusively as a TTY machine.

Initial Setup (chroot)

After installing the base system and entering the chroot:

Fix root filesystem permissions

Set correct ownership and permissions
chown root:root /
chmod 755 /

Set root password

passwd root

Set hostname

echo vaio-p > /etc/hostname

Configure locale

Set locale to en_US.UTF-8
echo "LANG=en_US.UTF-8" > /etc/locale.conf
echo "en_US.UTF-8 UTF-8" >> /etc/default/libc-locales
xbps-reconfigure -f glibc-locales

LUKS Encryption

The partition is encrypted with Serpent instead of AES, as the Atom Z520 lacks AES-NI and Serpent provides faster software encryption/decryption on this CPU:

Format the partition with LUKS1 + Serpent
cryptsetup luksFormat --type luks1 \
  --cipher serpent-xts-plain64 \
  --key-size 256 \
  --hash sha256 \
  --iter-time 1000 /dev/sda1

Tip

LUKS1 is used instead of LUKS2 because GRUB does not fully support LUKS2.

Key file

Add a key file to avoid typing the LUKS passphrase twice at boot (once for GRUB, once for the initramfs):

Generate a random key file

dd bs=1 count=64 if=/dev/urandom of=/boot/crypted.key

Add the key to the LUKS volume

cryptsetup luksAddKey /dev/sda1 /boot/crypted.key

Lock down /boot permissions

chmod 000 /boot/crypted.key
chmod -R g-rwx,o-rwx /boot/

Configure crypttab

Edit /etc/crypttab to reference the key file and partition UUID:

Get the partition UUID
blkid -o value -s UUID /dev/sda1
/etc/crypttab
cryptroot  UUID=<your-uuid>  /boot/crypted.key  luks

Configure dracut for LUKS

/etc/dracut.conf.d/10-crypt.conf
install_items+=" /boot/crypted.key /etc/crypttab "

Install GRUB and reconfigure

grub-install /dev/sda
xbps-reconfigure -fa

GRUB

Enable graphical GRUB with the Void Linux splash screen at native resolution:

/etc/default/grub (relevant lines)
GRUB_BACKGROUND=/usr/share/void-artwork/splash.png
GRUB_GFXMODE=1600x768x32

Then regenerate the GRUB config:

Apply GRUB changes
grub-mkconfig -o /boot/grub/grub.cfg

Slimming Down the Initramfs

By default, dracut builds a generic initramfs with modules for every possible hardware and filesystem. On a known machine like the VAIO P, most of these are unnecessary and waste both disk space and boot time on an already slow CPU.

Host-only mode

Build the initramfs for this machine only, including only the drivers and filesystems actually in use:

/etc/dracut.conf.d/00-hostonly.conf
hostonly="yes"
hostonly_cmdline="yes"

Omit unnecessary modules

Remove modules that are irrelevant for a bare-metal VAIO P:

/etc/dracut.conf.d/01-omit.conf
omit_dracutmodules+=" btrfs nvdimm qemu virtiofs lunmask resume hwdb "
Module Why omit
btrfs Not using Btrfs
nvdimm No NVDIMM hardware
qemu, virtiofs Not a virtual machine
lunmask No SAN/fibre channel
resume No working battery, no suspend
hwdb Not needed in initramfs

Disable AMD microcode

The VAIO P has an Intel Atom CPU, AMD microcode should not be included:

/etc/dracut.conf.d/02-no-amd-ucode.conf
early_microcode="yes"

Tip

With hostonly="yes", dracut will only include Intel microcode since it detects the actual CPU. If AMD microcode is still being bundled, you can force it off by setting early_microcode="no" and loading Intel microcode via the kernel command line or a separate mechanism.

No compression

Since the Atom Z520 CPU is extremely weak, skip compression entirely to speed up initrd creation and loading:

/etc/dracut.conf.d/20-compress.conf
compress="cat"

Rebuild

After configuring, rebuild the initramfs:

Reconfigure all packages (triggers dracut rebuild)
xbps-reconfigure -fa

KMSCon

The graphical console is provided by KMSCon, which gives a modern terminal experience with proper font rendering directly on the framebuffer, without needing a full display server.

KMSCon requires at least one TTF font installed on the system:

Install KMSCon and fonts
xbps-install -S kmscon dejavu-fonts-ttf noto-fonts-cjk noto-fonts-emoji

Tip

The noto-fonts-cjk package is needed for Japanese/Chinese/Korean character rendering, and noto-fonts-emoji for emoji. Without them, tools like w3m will display squares instead of glyphs.

Create the runit service

The kmscon package does not ship a runit service, it needs to be created manually:

Create the service directory with dbus dependency
mkdir -p /etc/sv/kmsconvt-tty1/dependencies
ln -s /etc/sv/dbus /etc/sv/kmsconvt-tty1/dependencies/
/etc/sv/kmsconvt-tty1/run
#!/bin/sh
exec kmscon --vt /dev/tty1 --seats seat0 --no-switchvt --login -- /bin/login -f benoit
Make it executable
chmod +x /etc/sv/kmsconvt-tty1/run

This starts KMSCon on tty1 with auto-login for the benoit user. Since the LUKS passphrase is already entered at GRUB, the system can be considered in the hands of its owner after decryption.

Create the user
useradd -m -s /bin/bash benoit

Enable KMSCon on tty1

Replace the default agetty on tty1 with the new KMSCon service:

Replace agetty-tty1 with kmsconvt
rm /var/service/agetty-tty1
ln -s /etc/sv/kmsconvt-tty1 /var/service/

Root login on KMSCon

To log in as root on a KMSCon terminal, you need to remove the pam_securetty.so check, as KMSCon virtual terminals are not listed as secure TTYs. Comment out or remove the relevant line in /etc/pam.d/login:

/etc/pam.d/login
# auth required pam_securetty.so

Framebuffer Access

By default /dev/fb0 is owned by root:video with mode 660. To allow a regular user to open it (required for framebuffer apps like Links2 in -g mode, timg, fbterm, etc.), add the user to the video group:

Grant benoit access to /dev/fb0
usermod -aG video benoit

Log out and back in (or reboot) for the group change to take effect.

KMSCon is incompatible with direct framebuffer access

KMSCon is a userspace terminal emulator that owns the framebuffer itself. Any app that tries to open /dev/fb0 directly (Links2 -g, timg, fbterm, etc.) will fail or produce a blank screen when run from inside KMSCon on tty1.

Use a raw agetty TTY instead, tty2 through tty6 are left untouched. Switch with Ctrl+Alt+F2, log in, and run framebuffer apps from there.

yazi + chafa (File Manager with Image Previews)

yazi is a terminal file manager with image preview support. Inside KMSCon, it uses chafa to render images as Unicode block characters, no Sixel or Kitty protocol needed. The result is surprisingly usable and fun on the VAIO P's 1600×768 display.

Install yazi and chafa
xbps-install -S yazi chafa
Start yazi
yazi

Tip

KMSCon does not support Sixel or the Kitty graphics protocol. chafa falls back to Unicode block characters (▀▄█) automatically, which still gives a recognisable image preview at terminal resolution. The denser the font size, the better the result.

fbv (Framebuffer Image Viewer)

fbv is a minimal image viewer that writes directly to /dev/fb0. No X11 or terminal emulator involved, it blits the image straight to the screen. Must be run from a raw agetty TTY (see Framebuffer Access).

Install fbv
xbps-install -S fbv

Switch to tty2 (Ctrl+Alt+F2) and view an image:

Display an image
fbv photo.jpg

mplayer (Framebuffer Video Player)

mplayer supports direct framebuffer output via the fbdev2 backend. mpv --vo=drm does not work on the GMA 500 (no DRM atomic support), making mplayer the practical choice for video playback without X11.

Install mplayer
xbps-install -S mplayer

Scale to native screen resolution and play:

Play video scaled to native resolution
mplayer -vo fbdev2 -vf scale=1600:768 video.mp4

Must be run from a raw agetty TTY (see Framebuffer Access).

Links2 (Graphical Framebuffer Browser)

Links2 can run in graphical mode directly on the Linux framebuffer, providing image rendering and proper page layout without needing X11. It runs on a raw agetty TTY (not KMSCon, which is a userspace terminal emulator incompatible with direct framebuffer access).

Install links
xbps-install -S links

Switch to a raw TTY (e.g., tty2 via Ctrl+Alt+F2) and launch:

Start links in graphical framebuffer mode
links -g -driver fb

Warning

Links2 has no JavaScript support. Most modern websites rely on JS to load content dynamically (including images), so expect a degraded experience on JS-heavy sites. It works well for static sites, wikis, and documentation.

Warning

Links2 uses its own internal bitmap font renderer in graphical mode, it does not use system fonts. CJK (Japanese, Chinese, Korean) characters are not supported and will not render. For CJK content, use w3m inside KMSCon instead, which uses system TTF fonts (Noto CJK).

Retro-friendly mirror

This site is also served at retro.benoit.jp.net over plain HTTP, specifically for console browsers and retro hardware. Works well with links, w3m, and other non-modern clients.

LXQt + qutebrowser (Graphical Desktop on tty2)

For a lightweight graphical desktop with a full browser (JavaScript support), LXQt with qutebrowser keeps everything on the Qt toolkit, minimizing RAM usage from duplicate libraries. X runs on tty2, leaving KMSCon on tty1.

Install Xorg, LXQt, and qutebrowser
xbps-install -S xorg-minimal xinit xf86-video-fbdev lxqt qutebrowser qt5-webengine

Tip

Void Linux only ships Qt5 WebEngine (qt5-webengine), not Qt6. qutebrowser may complain about a missing Qt6 environment, but it works fine with Qt5 WebEngine installed. Note that Qt5 WebEngine is based on Chromium 87 (2020), so some modern sites may break. A qt6-webengine package is needed for an up-to-date engine.

Tip

The GMA 500 (PowerVR SGX535) has no proper modesetting driver on Linux. The xf86-video-fbdev driver is the most reliable option for this GPU.

Create the xinitrc:

~/.xinitrc
exec startlxqt

From tty2, start the graphical session:

Start LXQt on tty2
startx -- vt2

Audio

ALSA channels are muted by default on Void Linux. Add the user to the audio group and unmute via alsamixer:

Grant benoit access to audio devices
usermod -aG audio benoit

Then open the mixer (re-login first for the group to take effect):

Open ALSA mixer
alsamixer

Navigate with arrow keys, press M to unmute a channel. Channels showing MM at the bottom are muted, at minimum unmute and raise Master and PCM.

Networking

The VAIO P doubles as a TTY debug machine to connect to anything on my Tailnet. I use Tailscale with its built-in SSH server, so there is no need to install a separate SSH server on the machine.

Create the Tailscale SSH user
useradd -m -s /bin/bash ts
Set up Tailscale
tailscale up --qr --ssh --accept-routes