gnu/linux on the samsung nc20

ยป lo-tech | 16 April 2009, 17:58 | ::

Important: see here for updates

The NC20 is a neat cool machine, halfway between a netbook and a notebook, slim designed, weighting 1.5kg and priced as low as 425 Euroz/389 Pounds (apparently quite fashionable as well). It sports a 12” WXGA (1280×800) display, just like a regular notebook, and a Via Nano processor, meant to rival the Intel Atom in the netbook market. (Full specs here).
The Nano is so far the only 64bit processor for netbooks and has an impressive set of features, if compared to the Atom. You’ll find plenty of benchmarks out there telling that the nano outperforms the atom under every possible test. However, as it often happens with very recent products, to get all the goodness linux users have to struggle against poor manufacturers’ support and get their hands dirty with hacks and patches.
here it is

Processor


bash-3.2# cat /proc/cpuinfo 
processor	: 0
vendor_id	: CentaurHauls
cpu family	: 6
model	: 15
model name	: VIA Nano processor U2250@1300+MHz
stepping	: 2
cpu MHz	: 1596.112
cache size	: 1024 KB
fdiv_bug	: no
hlt_bug	: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep 
mtrr pge mca cmov pat clflush acpi mmx fxsr sse sse2 ss 
tm syscall nx fxsr_opt rdtscp lm pni monitor est tm2 ssse3 
cx16 xtpr rng rng_en ace ace_en ace2 phe phe_en lahf_lm
bogomips	: 3192.22
clflush size	: 64
power management:@

The Nano works fine with 32bit kernels with the Via C7 optimization. To enable full support for frequency scaling and power management in a 64bit kernel you need to apply the two patches in this archive: centaur-padlock-x86_64.tar.gz provided by one Ubuntu user for the 2.6.29-rc8 kernel. The patches work in the latest stable vanilla release (2.6.29.1 at time of writing), not in the release candidates (2.6.30-rc)
One of the patches doesn’t get applied so well so you will have to edit by hand linux-2.6.29.1/arch/x86/Kconfig.cpu and substitute this code (about line 460)


config CPU_SUP_CENTAUR_32
default y
bool "Support Centaur processors" if PROCESSOR_SELECT
depends on !64BIT
help
This enables detection, tunings and quirks for Centaur processors
You need this enabled if you want your kernel to run on aCentaur CPU. 
Disabling this option on other types of CPUs
makes the kernel a tiny bit smaller. Disabling it on a Centaur
CPU might render the kernel unbootable.
If unsure, say N.

config CPU_SUP_CENTAUR_64
default y
bool "Support Centaur processors" if PROCESSOR_SELECT
depends on 64BIT
help
This enables detection, tunings and quirks for Centaur processors
You need this enabled if you want your kernel to run on a
Centaur CPU. Disabling this option on other types of CPUs
makes the kernel a tiny bit smaller. Disabling it on a Centaur
CPU might render the kernel unbootable.
If unsure, say N.

with


config CPU_SUP_CENTAUR
default y
bool "Support Centaur processors" if PROCESSOR_SELECT
help
This enables detection, tunings and quirks for Centaur processors

The patches enable
CONFIG_E_POWERSAVER=m
CONFIG_CRYPTO_DEV_PADLOCK=y
CONFIG_CRYPTO_DEV_PADLOCK_AES=y
CONFIG_CRYPTO_DEV_PADLOCK_SHA=y

With e_powersaver loaded, suspend (aka suspend to ram) and hibernate (aka suspend to disk) will work out of the box with the s2ram (use s2ram -f -a 3) and hibernate scripts in 32-bit kernels, while with x86_64 there are issues getting the display to resuscitate after suspend/hibernate (at least i’m having issues, if you got this to work please let me know).

Graphics
The NC20 features a VX800 chipset with integrated graphics. Let me tell you, this is a HUGE pain in the ass. There are three different drivers for this gpu. Via provides a closed source, buggy, binary only driver that will work on certain distributions only (guess which ones) and an “open source” driver, buggy and outdated that won’t even compile against a recent xorg. (Sources are here for your masochist pleasure: xf86 driver | kernel module)
A truly libre driver is being developed by the Openchrome project, which is of course the preferred choice. It currently lacks 3d acceleration and one of the most interesting features of the chipset, the hardware MPEG4 acceleration. However the driver is fairly stable and works smoothly in Exa mode.

Here’s an [updated] xorg.conf using the openchrome module, with EXA acceleration enabled.

Padlock and RNG
Another interesting feature of Via’s platform is the hardware cryptographic support that makes the NC20 the perfect choice if you need a cheap machine with encrypted filesystem. The patches above will enable the support for the VIA Padlock in the x86_64 kernel. In order to use the Random number generator you need to copy the file via-rng.c into linux-2.6.29.1/drivers/char/hw_random and modify the file Kconfig in that directory removing the dependance from X86

Sound
Works with the Intel HDA module, however i haven’t tested the microphone and couldn’t shut the internal speaker with headphones plugged in. You need to enable

CONFIG_SND_HDA_INTEL=m
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_CODEC_INTELHDMI=y
CONFIG_SND_HDA_ELD=y
CONFIG_SND_HDA_GENERIC=y
CONFIG_SND_HDA_POWER_SAVE=y

Wlan
Hardware from Atheros, works fine with the ath5k module.
CONFIG_ATH5K=m

LAN
Works fine with the sky2 module.
CONFIG_SKY2=m

HDD
The hard disk is a 160Gb Samsung PATA drive working at 5400rpm. Just enable CONFIG_PATA_VIA=y

Webcam
Supported by the uvc module. Works fine with Skype and Ekiga.
CONFIG_USB_VIDEO_CLASS=m
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y

Bluetooth
I haven’t tested it but should work

.config files

So what do we do?
The Samsung NC20 has the potential to make for a cheap and relatively powerful mobile linux box. We should curse Via for its ridiculous support (despite claims of embracing the open source community) and wait for a better free graphic driver. In the meantime support for the Nano processor should enter the mainstream x86_64 kernel, which hopefully won’t take too long.

Further reading

  • This guy is trying to install gentoo on his nc20
  • A thread for the nc20 on SUSE forum
  • The thread for the nc20 on the ubuntu forum with the original kernel patches.

commenti

Name
Email
http://
Message