Gentoo Wiki


This article is part of the Hardware series.
Laptops TV Tuner Cards Wireless Servers Storage Other Hardware Motherboards Related



The VIA EPIA MII is a Mini-ITX form factor mainboard with an integrated VIA C3 processor running at between 600MHz and 1.2GHz. The board is designed for low-power multimedia applications and is ideal for home media server roles.

Image:Epia m2.jpg

Hardware Spec

Processor Family: VIA C3 Nehemiah (i686)
Form Factor: Mini-ITX
Official Range: 600MHz (Fanless) - 1.2 GHz (Fan/Heatsink)
Speedstep: No
Chipset: VIA CLE266, VIA VT8235
Memory type: 1x DDR266 DIMM socket
Maximum: 1GB
Video: VIA Unichrome AGP, VT8623
Upgradable: Video is soldered to mainboard but a PCI graphics card can be used
Audio: VIA VT8233
Expansion: 1x PCI (2 if using PCI splitter), 1x PCMCIA, 1x Compact Flash
Cardbus: yenta
Supported OSes: Gentoo ;)
Other OSes: Probably


Make system

File: /etc/make.conf
# Please consult /etc/make.conf.example for a more detailed example
CFLAGS="-O2 -march=c3-2  -msse -mmmx -mfpmath=sse  -pipe -fomit-frame-pointer"

# MPLAYER use flags.
#aac - Enables support for MPEG-4 AAC Audio
#alsa - Adds support for media-libs/alsa-lib (Advanced Linux Sound Architecture)
#dga -Adds DGA Support (Xfree86) (DGA=Direct Graphic Access)
#dts -Enables libdts (DTS Coherent Acoustics decoder) support
#dvb -Adds support for DVB (Digital Video Broadcasting)
#dvd -Adds support for DVDs
#dvdread -Enables usage of Ogle's libdvdread for DVD playback
#esd -Adds support for media-sound/esound (Enlightened Sound Daemon)
#mad -Adds support for mad (high-quality mp3 decoder library and cli frontend)
#mmx -Adds support for optimizations for Pentium MMX and Athlon class processors
#vorbis -Adds support for the OggVorbis audio codec
#sse -fast floating point optimization for PentiumIII+ class chips
#v4l -Enables video4linux support
#win32codecs -use win32codecs package for dll avi decoding support (wmv and what not)
#xv -Adds in optional support for the Xvideo extension (an X API for video playback)
#xvid -Adds support for's open-source mpeg-4 codec

# HW decompress
# cle266    - used by xine
# xvmc      - used by xine, mplayer, mythtv
# unichrome - used by mesa, DirectFB, mythtv

USE="sse mmx -apache2 -arts -cups -gtk -kde -gnome -sdl -xmms dvd dvdread  cle266 v4l unichrome xvmc xv -gtk -jpeg -gif -png -mad -encode -esd"


# An attempt to get HW mpeg2 decompress.

Kernel Configuration

Linux Kernel Configuration: Via EPIA MII - kernel 2.6.19+
Processor type and features  --->
  [ ] Symmetric multi-processing support
      Subarchitecture Type (PC-compatible) --->
      Processor family (VIA C3-2 (Nehemiah))  --->
Power Management support --->
  ACPI (Advanced Configuration and Power Interface) Support --->
    [*] ACPI Support
    <*> Button
    <*> Fan
    <*> Processor
    <*>   Thermal Zone
Bus options (PCI, PCMCIA, EISA, MCA, ISA)  --->
  [*] PCI support
      PCCARD (PCMCIA/CardBus) support  --->
        <*> PCCard (PCMCIA/CardBus) support
        <*>   CardBus yenta-compatible bridge support
Device Drivers  --->
  ATA/ATAPI/MFM/RLL support  --->
    <*> Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support
    [*]   PCI IDE chipset support
    [*]     Generic PCI bus-master DMA support
    <*>       VIA82CXXX chipset support
  IEEE 1394 (Firewire) support --->
    <*> IEEE 1394 (Firewire) support
    <*> OHCI-1394 support
  Networking device support  --->
    [*] Network device support
        Ethernet (10 or 100Mbit)  --->
          [*] Ethernet (10 or 100Mbit)
          [*] EISA, VLB, PCI and on board controllers
          <*>   VIA Rhine support
          [*]     Use MMIO instead of PIO
          [*]     Use Rx Polling (NAPI)
  Character devices  ---> 
    [*] Hardware Random Number Generator Core support
    <*>   VIA HW Random Number Generator support
  I2C support  --->
    <*> I2C support
        I2C Algorithms  --->
          <*> I2C bit-banging interfaces
        I2C Hardware Bus support  ---> 
          <*> VIA 82C596/82C686/823x
  Hardware Monitoring support --->
    <*> Hardware Monitoring support
    <*> VIA VT1211
  Graphics support --->
    <*> Support for frame buffer devices
    <*>   VESA VGA graphics support
            VESA driver type (vesafb-tng) --->
  Sound --->
    <*> Sound card support
        Advanced Linux Sound Architecture  --->
          <*> Advanced Linux Sound Architecture
              PCI devices --->
                <*> VIA 82C686A/B, 8233/8235 AC97 Controller
  USB support --->
    <*> Support for Host-side USB
    <*>   EHCI HCD (USB 2.0) support
    <*>   UHCI HCD (Most Intel and VIA) support
Cryptographic options --->
  <*>   DES and Triple DES EDE cipher algorithms
  <*>   AES cipher algorithms
        Hardware crypto devices --->
          <*> Support for VIA PadLock ACE
          <*>   PadLock driver for AES algorithm
          < >   PadLock driver for SHA1 and SHA256 algorithms


The EPIA MII series has an AC97 sound controller built into the VT8235M southbridge. This is supported with the following kernel options:

Linux Kernel Configuration: Sound Configuration
Device Drivers  --->
  Sound --->
    <*> Sound card support
        Advanced Linux Sound Architecture  --->
          <*> Advanced Linux Sound Architecture
              PCI devices --->
                <*> VIA 82C686A/B, 8233/8235 AC97 Controller

After you have built the kernel and restarted you just need to enable ALSA in the same way as you would for normal soundcards:

# emerge alsa-utils
# /etc/init.d/alsasound start
 * Loading ALSA modules ...         [ ok ]
 * Restoring Mixer Levels ...       [ ok ]
# rc-update add alsasound boot
 * alsasound added to runlevel boot
# alsamixer

Note that if you choose to build the driver as a module it will be named snd-via82xx and you will need to add it to your list of modules.

Xorg and Hardware Decoding

The EPIA MII uses an integrated Via Unichrome CLE266 graphics chip which has basic 2D/3D acceleration plus full MPEG2 decoding. Using the correct versions of MPlayer and xine it is possible to get the CPU usage for DVD playback down to 2-3%.

Kernel Configuration

Before installing Xorg ensure that you have the following enabled in the kernel:

Linux Kernel Configuration: Graphics Configuration
  Character devices  ---> 
    <*> /dev/agpgart (AGP Support)
    <*>   VIA chipset support
    <*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)
    <*>   Via unichrome video cards

Installing and Configuring Xorg

The Unichrome CLE266 is supported by default from Xorg 7.0+. To install Xorg add the following line to /etc/make.conf and run emerge xorg-x11:


More information can be found on the VIA Unichrome page (note that the linked page needs updating).

PC Card

See this guide.

Compact Flash

See this guide.


With the above acpi support into kernel, we want to make use of it:

# emerge acpid

Then /etc/init.d/acpid start and try it by pressing the powerbutton! Of course to make it sticky rc-update add acpid boot.

Mainboard sensors

The mainboard sensors in the southbridge of the Epia MII boards are supported by the vt1211 driver which can be used by lm_sensors. This driver is included as standard in kernel versions 2.6.19+ and can also be patched into 2.6.18.

Kernel versions 2.6.19+

The new 2.6.19 kernel adds support for the VT1211 sensors for the 2.6 series. Add the following options to your kernel, rebuild & restart:

Linux Kernel Configuration: Mainboard Sensors
Device Drivers  --->
 I2C support --->
  <*> I2C support
  <M> I2C device interface
  I2C Hardware Bus Support --->
   <M> VIA 82C596/82C686/82xx
 Hardware Monitoring support  ---> 
  <M> Via VT1211 

Patching earlier Kernel versions

Where possible it is recommended to upgrade to the 2.6.19 kernel, if you can't then you can apply the following patch to get the vt1211 driver. Details of how to do this can be found at:

Installing & Configuring lm_sensors

Next install lm_sensors to make use of the hardware:

# emerge lm_sensors

Once lm_sensors has installed you will need to detect the sensors using sensors-detect. This will ask you a series of questions about probing various buses - accept the defaults for all questions and let it overwrite /etc/conf.d/lm_sensors.

The lm_sensors config should look something like (if you compiled the sensors into the kernel instead of as modules, change the LOADMODULES to no):

File: /etc/conf.d/lm_sensors
# Load modules at startup

# Initialize sensors at startup


Now you should start lm_sensors and add it to the default run level:

# /etc/init.d/lm_sensors start
 * Loading lm_sensors modules...
 *   Loading i2c-viapro ...         [ ok ]
 *   Loading vt1211 ...             [ ok ]
 * Initializing sensors ...         [ ok ]

# rc-update add lm_sensors default
 * lm_sensors added to runlevel default

If you get an error during the 'Initializing sensors' stage then you will need to upgrade lm_sensors to 2.10.1 or higher to fix an initialisation bug (at the time of writing this version is masked).

Now you should be able to check your mainboard sensors:

# sensors
Adapter: ISA adapter
+3.3V:     +3.26 V  (min =  +0.00 V, max =  +4.42 V)
+2.5V:     +2.43 V  (min =  +0.00 V, max =  +3.16 V)
VCore:     +1.36 V  (min =  +1.00 V, max =  +1.05 V)   ALARM
+5V:       +4.68 V  (min =  +4.63 V, max =  +5.11 V)
+12V:     +11.66 V  (min = +10.53 V, max = +12.79 V)
+3.3V:     +3.27 V  (min =  +3.13 V, max =  +3.46 V)
Case Fan: 4964 RPM  (min = 3006 RPM, div = 2)
CPU Fan:  7123 RPM  (min = 3006 RPM, div = 2)
CPU Temp:  +24.3 C  (high =  +190 C, hyst =   -78 C)
Int Temp:  +45.0 C  (high =  +184 C, hyst =  +176 C)
vid:      +1.750 V  (VRM Version 1.7)


Wake-On-Lan (WOL) will allow you to power up your computer remotely from a powered-off state. However, it won't work when you are in a S3 state (suspend to RAM). This is probably due to either a bug in the via-rhine driver, or in TuxOnIce. I'm not sure whether it will work in a S1 state or not since I don't use S1 very often.

On the Epia

ifconfig eth0   ( look for stuff on first line after HWaddr )
emerge -va ethtool
ethtool -s eth0 wol pg
ethtool eth0

On another computer (assuming the other is gentoo)

emerge -va wakeonlan  (if it's not already installed)
wakeonlan [hardware address - see first step]


Open issues



Retrieved from ""

Last modified: Sat, 30 Aug 2008 08:45:00 +0000 Hits: 22,348