I run Arch Linux on a Samsung R429. These are the fixes and tweaks I use to keep it working.
| Component | Specification |
|---|---|
| Model | Samsung R429 / NP-R429 |
| CPU | Intel Core i3 M 330 (2.13 GHz) |
| GPU | NVIDIA GeForce 310M (GT218M) |
| RAM | 4 GB DDR3 |
| Storage | 320 GB Mechanical HDD |
| OS | Arch Linux |
The lid switch on this board does not send correct SW_LID events:
kernel: ACPI: button: The lid device is not compliant to SW_LID.
systemd-logind needs SW_LID, so closing the lid does not suspend.
Add button.lid_init_state=open to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub, then update GRUB:
sudo grub-mkconfig -o /boot/grub/grub.cfgsudo pacman -S acpidCreate /etc/acpi/events/lid:
event=button/lid.*
action=/etc/acpi/handlers/lid.shCreate /etc/acpi/handlers/lid.sh:
#!/bin/bash
grep -q closed /proc/acpi/button/lid/LID0/state && /usr/bin/systemctl suspendMake it executable and start acpid:
sudo chmod +x /etc/acpi/handlers/lid.sh
sudo systemctl enable --now acpidThe built-in keyboard can stop responding after suspend. The PS/2 controller loses register state on resume.
Add i8042.reset=1 i8042.nomux=1 to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub, then update GRUB:
sudo grub-mkconfig -o /boot/grub/grub.cfgThe GeForce 310M defaults to power state 07 (405 MHz core). State 0f runs 625 MHz core / 1530 MHz shader / 790 MHz memory.
Create /etc/systemd/system/nouveau-pstate.service:
[Unit]
Description=Set Nouveau GPU to max pstate
After=sysinit.target
[Service]
Type=oneshot
ExecStart=/bin/sh -c 'echo 0f > /sys/kernel/debug/dri/0/pstate'
RemainAfterExit=yes
[Install]
WantedBy=multi-user.targetEnable the service:
sudo systemctl enable --now nouveau-pstate.serviceThis reclaims 10-20% CPU performance on this dual-core.
Add mitigations=off to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub, then update GRUB.
BFQ with smaller read-ahead prevents stutter during heavy reads on mechanical drives.
Create /etc/udev/rules.d/60-hdd-queue.rules:
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq", ATTR{queue/read_ahead_kb}="512", ATTR{queue/nr_requests}="256"
I use ZRAM with 4 GB RAM. Early swappiness and low writeback thresholds keep the UI responsive.
/etc/sysctl.d/99-zram.conf:
vm.swappiness = 150/etc/sysctl.d/99-hdd-dirty-ratio.conf:
vm.dirty_background_ratio = 3
vm.dirty_ratio = 6/etc/sysctl.d/99-writeback.conf:
vm.dirty_writeback_centisecs = 6000Edit /etc/fstab and add noatime and commit=60 to the root partition:
UUID=... / ext4 rw,noatime,commit=60 0 1
commit=60 applies to ext4 only. Do not add it to the VFAT /boot entry.
This symlinks browser profiles to tmpfs and syncs periodically. This cuts disk writes:
sudo pacman -S profile-sync-daemon
systemctl --user enable --now psd.serviceAdd threadirqs nouveau.config=NvBoost=2,NvPmEnableGating=1 to the GRUB command line.
Enable Mesa threading in /etc/environment:
mesa_glthread=trueSet DRI3 in /etc/X11/xorg.conf.d/20-nouveau.conf:
Section "Device"
Identifier "Nouveau GPU"
Driver "nouveau"
Option "DRI" "3"
Option "TearFree" "true"
EndSectionThis extracts the video engine firmware from the NVIDIA 340.108 driver. This enables H.264 hardware decode under Nouveau:
mkdir -p /tmp/nouveau-fw-build && cd /tmp/nouveau-fw-build
wget https://raw.githubusercontent.com/envytools/firmware/master/extract_firmware.py
wget https://us.download.nvidia.com/XFree86/Linux-x86_64/340.108/NVIDIA-Linux-x86_64-340.108.run
sh NVIDIA-Linux-x86_64-340.108.run --extract-only
python3 extract_firmware.py
sudo mkdir -p /usr/lib/firmware/nouveau
sudo cp -a nv* vuc-* /usr/lib/firmware/nouveau/
sudo mkinitcpio -P
rm -rf /tmp/nouveau-fw-buildRevert by removing /usr/lib/firmware/nouveau and running sudo mkinitcpio -P.
- Disable
NetworkManager-wait-online.serviceandbluetooth.service:sudo systemctl disable NetworkManager-wait-online.service bluetooth.service - Skip initramfs fsck: remove
fsckfromHOOKSin/etc/mkinitcpio.conf, then runsudo mkinitcpio -P. - Use a volatile journal: set
Storage=volatilein/etc/systemd/journald.conf.d/00-journal-limit.conf.
Copy the GTK theme system-wide, then set /etc/lightdm/lightdm-gtk-greeter.conf:
[greeter]
theme-name = TokyoNight
icon-theme-name = Papirus-Dark
background = #16161e
user-background = false
font-name = Sans 10
position = 50%,center 50%,center
indicators = ~clock;~spacer;~session;~power
clock-format = %a, %b %d %H:%M