个人工具

“UbuntuHelp:ViaEpiaDriHowto”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(新页面: {{From|https://help.ubuntu.com/community/ViaEpiaDriHowto}} {{Languages|UbuntuHelp:ViaEpiaDriHowto}} == Via Epia DRI Howto == === Introduction === Users who have any of the EPIA M, EPIA ...)
 
 
(未显示同一用户的4个中间版本)
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/ViaEpiaDriHowto}}
 
{{From|https://help.ubuntu.com/community/ViaEpiaDriHowto}}
 
{{Languages|UbuntuHelp:ViaEpiaDriHowto}}
 
{{Languages|UbuntuHelp:ViaEpiaDriHowto}}
 +
<<Include(Tag/Unsupported)>>
 
== Via Epia DRI Howto ==
 
== Via Epia DRI Howto ==
 
 
=== Introduction ===
 
=== Introduction ===
 
 
Users who have any of the EPIA M, EPIA MII or EPIA CL motherboards will probably be interested in this wiki.
 
Users who have any of the EPIA M, EPIA MII or EPIA CL motherboards will probably be interested in this wiki.
 
After discovering that the via driver for X only work for 2d and not accellerated 3d/OpenGL I searched for a solution. I found that the driver does actually support it, but that the DRI enabled CLE266 graphics driver is not enabled in the kernel. Actually, neither of the kernels provided in the repositories have the option at all.  
 
After discovering that the via driver for X only work for 2d and not accellerated 3d/OpenGL I searched for a solution. I found that the driver does actually support it, but that the DRI enabled CLE266 graphics driver is not enabled in the kernel. Actually, neither of the kernels provided in the repositories have the option at all.  
 
After you have completed this wiki you should have a fully working DRI accellerated desktop and will be able to play Armagetron, Quake2 or whatever...
 
After you have completed this wiki you should have a fully working DRI accellerated desktop and will be able to play Armagetron, Quake2 or whatever...
 
 
Most of the information that I have provided here and the patch itself are covered in much more detail at http://www.epialinux.org
 
Most of the information that I have provided here and the patch itself are covered in much more detail at http://www.epialinux.org
 
 
(!) DRI is a short for "Direct Rendering Infrastructure" and is often used by OpenGL applications to provide hardware accellerated 3D graphics.
 
(!) DRI is a short for "Direct Rendering Infrastructure" and is often used by OpenGL applications to provide hardware accellerated 3D graphics.
 
 
(!) This wiki uses the 2.6.12 kernel. Other versions have not worked for me.
 
(!) This wiki uses the 2.6.12 kernel. Other versions have not worked for me.
 
 
(!) Breezy was used during this testing. If you use any other version, some commands may be different.
 
(!) Breezy was used during this testing. If you use any other version, some commands may be different.
 
 
/!\ This Wiki includes a brief guide of how to compile and install a custom 2.6.12 kernel. This can possibly render your system unbootable. You have been warned!
 
/!\ This Wiki includes a brief guide of how to compile and install a custom 2.6.12 kernel. This can possibly render your system unbootable. You have been warned!
 
 
=== Requirements ===
 
=== Requirements ===
 
 
This wiki has been fully tested on a fresh Breezy (5.10) install.  
 
This wiki has been fully tested on a fresh Breezy (5.10) install.  
 
 
Ubuntu should already be able to boot xorg and use the "via" driver to display 2D graphics without issues. If you have problems with the via driver before following this wiki, please see section Troubleshooting at the end of this page.
 
Ubuntu should already be able to boot xorg and use the "via" driver to display 2D graphics without issues. If you have problems with the via driver before following this wiki, please see section Troubleshooting at the end of this page.
 
 
All packages that is required for building a kernel. "build-essential" and "bin86" at least.
 
All packages that is required for building a kernel. "build-essential" and "bin86" at least.
 
You will also need extra packages for the frontend when you build the kernel. Example "libncurses5-dev" is needed for "make menuconfig".
 
You will also need extra packages for the frontend when you build the kernel. Example "libncurses5-dev" is needed for "make menuconfig".
 
 
Sudo/Root access to the system.
 
Sudo/Root access to the system.
 
Time. This will take you an hour or two.
 
Time. This will take you an hour or two.
 
 
=== Let us begin ===
 
=== Let us begin ===
 
 
As previously mentioned, the kernels provided in the repositories is not suitable for what we want to do. Therefore we must download another one and patch it.
 
As previously mentioned, the kernels provided in the repositories is not suitable for what we want to do. Therefore we must download another one and patch it.
 
 
Download and extract the kernel (it is approx. 30-40 Mb):
 
Download and extract the kernel (it is approx. 30-40 Mb):
 
<pre><nowiki>
 
<pre><nowiki>
第42行: 第28行:
 
$ tar jxvf linux-2.6.12.tar.bz2
 
$ tar jxvf linux-2.6.12.tar.bz2
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Download and extract the patch from epialinux.org:
 
Download and extract the patch from epialinux.org:
 
<pre><nowiki>
 
<pre><nowiki>
第48行: 第33行:
 
$ bunzip2 patch-2.6.12.3-epia.bz2
 
$ bunzip2 patch-2.6.12.3-epia.bz2
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Patch the kernel:
 
Patch the kernel:
 
<pre><nowiki>
 
<pre><nowiki>
第54行: 第38行:
 
$ patch -p1 < ../patch-2.6.12.3-epia  
 
$ patch -p1 < ../patch-2.6.12.3-epia  
 
</nowiki></pre>
 
</nowiki></pre>
 
 
 
=== Configuring the kernel ===
 
=== Configuring the kernel ===
 
 
Now you have several options of how you want to configure your kernel. My favourite is by using gconfig since it give you a nice overview but it is cumbersome.  
 
Now you have several options of how you want to configure your kernel. My favourite is by using gconfig since it give you a nice overview but it is cumbersome.  
 
 
<pre><nowiki>
 
<pre><nowiki>
 
gnome-interface:
 
gnome-interface:
第71行: 第51行:
 
</nowiki></pre>
 
</nowiki></pre>
 
You will probably get a whole bunch of warnings that can be ignored for now.
 
You will probably get a whole bunch of warnings that can be ignored for now.
 
 
Configure it:
 
Configure it:
 
Options with (?) are optional. Options with (Y) to be compiled in. Options with (M) as Module.
 
Options with (?) are optional. Options with (Y) to be compiled in. Options with (M) as Module.
 
If you are unsure about some of the options, check the provided help for it. Usually there is a "If you are unsure say Y" or "If you are unsure say N".  
 
If you are unsure about some of the options, check the provided help for it. Usually there is a "If you are unsure say Y" or "If you are unsure say N".  
 
 
'''Loadable module support'''
 
'''Loadable module support'''
 
* (Y) Enable loadable module support (for getting a mouse to work)
 
* (Y) Enable loadable module support (for getting a mouse to work)
第88行: 第66行:
 
* (Y) Power Management support
 
* (Y) Power Management support
 
* (Y) ACPI -> ACPI support
 
* (Y) ACPI -> ACPI support
** (Y) Button
+
* (Y) Button
** (Y) Fan
+
* (Y) Fan
** (Y) Processor
+
* (Y) Processor
*** (Y) Thermalzone
+
* (Y) Thermalzone
 
'''Bus options'''
 
'''Bus options'''
 
* (?) PCCARD (If you have that on your board (My M doesn't have it, but some MII do)
 
* (?) PCCARD (If you have that on your board (My M doesn't have it, but some MII do)
第97行: 第75行:
 
* (?) Paralell port support (optional, I removed it since I have not used it for years)
 
* (?) Paralell port support (optional, I removed it since I have not used it for years)
 
* (Y) SCSI device support
 
* (Y) SCSI device support
** (Y) SCSI disk support (for use with USB Storage devices (usb cameras, mp3 players etc)
+
* (Y) SCSI disk support (for use with USB Storage devices (usb cameras, mp3 players etc)
 
+
 
ATA/ATAPI/MFM/RLL support -> ATA/ATAPI/MFM/RLL -> Enhanced IDE/MFM/RLL -> PCI IDE chipset support -> Generic PCI bus-master DMA:
 
ATA/ATAPI/MFM/RLL support -> ATA/ATAPI/MFM/RLL -> Enhanced IDE/MFM/RLL -> PCI IDE chipset support -> Generic PCI bus-master DMA:
** (Y) VIA82CXXX  
+
* (Y) VIA82CXXX  
 
(The other chipsets can be safely removed but make sure that "Use PCI DMA by default when available" is enabled.)
 
(The other chipsets can be safely removed but make sure that "Use PCI DMA by default when available" is enabled.)
 
 
'''Networking support'''
 
'''Networking support'''
 
Network device support -> Ethernet (10 or 100Mbit) -> EISA, VLB, PCI and on board controllers:  
 
Network device support -> Ethernet (10 or 100Mbit) -> EISA, VLB, PCI and on board controllers:  
 
* (Y) VIA Rhine support
 
* (Y) VIA Rhine support
** (Y) Use MMIO instead of PIO
+
* (Y) Use MMIO instead of PIO
 
* (?) PPP / SLIP if you use that kind of connection
 
* (?) PPP / SLIP if you use that kind of connection
 
'''Input device support'''
 
'''Input device support'''
 
* (Y) Generic input layer
 
* (Y) Generic input layer
** (Y) Mouse interface
+
* (Y) Mouse interface
*** (?) Provide legacy /dev/psaux
+
* (?) Provide legacy /dev/psaux
** (Y) Keyboards
+
* (Y) Keyboards
** (Y) Mouse
+
* (Y) Mouse
*** (M) PS/2 Mouse (Must be module, not Y)
+
* (M) PS/2 Mouse (Must be module, not Y)
*** (M) Serial Mouse (Must be module, not Y)
+
* (M) Serial Mouse (Must be module, not Y)
** (Y) Miscellaneous devices
+
* (Y) Miscellaneous devices
*** (M/Y/?) PC Speaker support  
+
* (M/Y/?) PC Speaker support  
 
* (Y) Hardware I/O ports  
 
* (Y) Hardware I/O ports  
** (Y) Serial I/O support ( /!\ For standard keyboard and mouse support )
+
* (Y) Serial I/O support ( /!\ For standard keyboard and mouse support )
 
'''Character devices'''
 
'''Character devices'''
 
* (Y) /dev/agpgart (AGP Support)
 
* (Y) /dev/agpgart (AGP Support)
** (Y) VIA chipset support
+
* (Y) VIA chipset support
 
* (Y) Direct Rendering Manager
 
* (Y) Direct Rendering Manager
** (Y) Via unichrome video cards  
+
* (Y) Via unichrome video cards  
 
'''I2C support'''
 
'''I2C support'''
 
* (Y) I2C support
 
* (Y) I2C support
** (Y) I2C device interface
+
* (Y) I2C device interface
** (Y) I2C Algorithms  
+
* (Y) I2C Algorithms  
*** (Y) I2C bit-banging interfaces
+
* (Y) I2C bit-banging interfaces
*** (M/Y/?) I2C PCF 8584
+
* (M/Y/?) I2C PCF 8584
*** (M/Y/?) I2C PCF 9564
+
* (M/Y/?) I2C PCF 9564
 
I2C Hardware Bus support  
 
I2C Hardware Bus support  
*** (Y/M) VIA 82C586B (if you have this hardware)
+
* (Y/M) VIA 82C586B (if you have this hardware)
*** (Y/M) VIA 82C596/82C686/823x (if you have this hardware)
+
* (Y/M) VIA 82C596/82C686/823x (if you have this hardware)
 
Hardware Sensors Chip support  
 
Hardware Sensors Chip support  
*** (Y) VIA686A (if you have this hardware)
+
* (Y) VIA686A (if you have this hardware)
*** (Y) Via VT1211 SuperIO and HW monitoring chip (if you have this hardware, my M-10000 has it at least)
+
* (Y) Via VT1211 SuperIO and HW monitoring chip (if you have this hardware, my M-10000 has it at least)
 
'''Multimedia devices'''
 
'''Multimedia devices'''
 
* (Y/M) Video For Linux
 
* (Y/M) Video For Linux
第145行: 第121行:
 
* (Y) Sound card support
 
* (Y) Sound card support
 
Advanced Linux Sound Architecture  
 
Advanced Linux Sound Architecture  
** (Y) Advanced Linux Sound Architecture
+
* (Y) Advanced Linux Sound Architecture
** (Y) Sequencer support
+
* (Y) Sequencer support
** (Y) OSS Mixer API
+
* (Y) OSS Mixer API
** (Y) OSS PCM
+
* (Y) OSS PCM
** (Y) OSS Sequencer
+
* (Y) OSS Sequencer
 
Generic devices  
 
Generic devices  
*** (Y) Generic MPU-401 UART driver
+
* (Y) Generic MPU-401 UART driver
 
PCI devices  
 
PCI devices  
*** (Y) VIA 82C686A/B, 8233/8235 AC97 Controller
+
* (Y) VIA 82C686A/B, 8233/8235 AC97 Controller
 
'''USB support'''  
 
'''USB support'''  
 
* (Y) Support for Host-side USB
 
* (Y) Support for Host-side USB
** (Y) USB device filesystem
+
* (Y) USB device filesystem
** (Y) EHCI HCD (USB 2.0)
+
* (Y) EHCI HCD (USB 2.0)
** (Y) UHCI HCD
+
* (Y) UHCI HCD
** (Y) USB Mass Storage support
+
* (Y) USB Mass Storage support
** (Y) USB Human Interface Device (full HID) support
+
* (Y) USB Human Interface Device (full HID) support
*** (Y) HID input layer support
+
* (Y) HID input layer support
** (Y) USB Monitor
+
* (Y) USB Monitor
 
'''MMC/SD Card support'''
 
'''MMC/SD Card support'''
 
* (?/Y) MMC support (Multimedia card support, if you have the hardware)
 
* (?/Y) MMC support (Multimedia card support, if you have the hardware)
第168行: 第144行:
 
* (?) Cryptographic API, and then choose which you want.
 
* (?) Cryptographic API, and then choose which you want.
 
Hardware crypto devices  
 
Hardware crypto devices  
** (?) Support for VIA PadLock (if you have the hardware)
+
* (?) Support for VIA PadLock (if you have the hardware)
 
+
 
<pre><nowiki>
 
<pre><nowiki>
 
After you have selected what you need in the configuration utility, SAVE your changes and exit (do not use "save as...")!
 
After you have selected what you need in the configuration utility, SAVE your changes and exit (do not use "save as...")!
 
Your file has now been saved as .config
 
Your file has now been saved as .config
 
</nowiki></pre>
 
</nowiki></pre>
 
 
(!) All other kernel options depends on what you want. What I have provided for you is a checklist for the most common options so you get functional DRI, sound, usb, i2c etc.
 
(!) All other kernel options depends on what you want. What I have provided for you is a checklist for the most common options so you get functional DRI, sound, usb, i2c etc.
 
 
/!\ Important: Be sure to load the mouse drivers as MODULES! If you mark the psmouse (for example) as Y instead of M somehow the mouse will not be detected at all.
 
/!\ Important: Be sure to load the mouse drivers as MODULES! If you mark the psmouse (for example) as Y instead of M somehow the mouse will not be detected at all.
 
 
 
Now it's time to build the kernel. On my M-10000 1Ghz this took about 20 minutes.
 
Now it's time to build the kernel. On my M-10000 1Ghz this took about 20 minutes.
 
<pre><nowiki>
 
<pre><nowiki>
 
$ make
 
$ make
 
</nowiki></pre>
 
</nowiki></pre>
 
 
=== Back up important files ===
 
=== Back up important files ===
 
 
/!\ You are advised not to skip this step since if the new kernel fail, you will have alot of work ahead of you...
 
/!\ You are advised not to skip this step since if the new kernel fail, you will have alot of work ahead of you...
 
 
<pre><nowiki>
 
<pre><nowiki>
 
$ sudo cp /vmlinuz /vmlinuz.original
 
$ sudo cp /vmlinuz /vmlinuz.original
 
$ sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.original
 
$ sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.original
 
</nowiki></pre>
 
</nowiki></pre>
 
 
=== Installing the modules and kernel ===
 
=== Installing the modules and kernel ===
 
 
<pre><nowiki>
 
<pre><nowiki>
 
$ sudo make modules_install
 
$ sudo make modules_install
 
$ sudo cp arch/i386/boot/bzImage /vmlinuz
 
$ sudo cp arch/i386/boot/bzImage /vmlinuz
 
</nowiki></pre>
 
</nowiki></pre>
 
 
=== Editing Grub ===
 
=== Editing Grub ===
 
 
In order to boot our new kernel we must edit the grub boot menu. I use nano, but you can use whatever texteditor you want.
 
In order to boot our new kernel we must edit the grub boot menu. I use nano, but you can use whatever texteditor you want.
 
 
<pre><nowiki>
 
<pre><nowiki>
 
$ sudo nano /boot/grub/menu.lst
 
$ sudo nano /boot/grub/menu.lst
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Copy the first boot option that look something like this:
 
Copy the first boot option that look something like this:
 
<pre><nowiki>
 
<pre><nowiki>
第218行: 第180行:
 
boot
 
boot
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Now you have two copies of the first entry.  
 
Now you have two copies of the first entry.  
 
Edit the second copy to this:
 
Edit the second copy to this:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
title          Ubuntu, kernel 2.6.12 EPIA
 
title          Ubuntu, kernel 2.6.12 EPIA
第229行: 第189行:
 
boot
 
boot
 
</nowiki></pre>
 
</nowiki></pre>
 
 
(!) Note that the initrd line should be removed
 
(!) Note that the initrd line should be removed
 
 
Save the file and exit (in nano you use Ctrl+x, press "Y" and the Return/Enter key to save)
 
Save the file and exit (in nano you use Ctrl+x, press "Y" and the Return/Enter key to save)
 
 
=== Booting and testing ===
 
=== Booting and testing ===
 
 
Now it's time to boot the system and, if needed, make some final adjustments.  
 
Now it's time to boot the system and, if needed, make some final adjustments.  
 
Bookmark this page and cross your fingers. Reboot and select your new custom kernel.
 
Bookmark this page and cross your fingers. Reboot and select your new custom kernel.
 
 
Your system should start up without any errors into your graphical login screen. If not, see next section called Troubleshooting.
 
Your system should start up without any errors into your graphical login screen. If not, see next section called Troubleshooting.
 
Log in. Open a terminal and type:
 
Log in. Open a terminal and type:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
$ glxinfo | grep rendering
 
$ glxinfo | grep rendering
第247行: 第201行:
 
$
 
$
 
</nowiki></pre>
 
</nowiki></pre>
 
 
'''Congratulations, you're done with this guide'''
 
'''Congratulations, you're done with this guide'''
 
 
If "No" is displayed instead, well see the next section...
 
If "No" is displayed instead, well see the next section...
 
 
=== Troubleshooting ===
 
=== Troubleshooting ===
 
 
'''The monitor turn black/off either straight after boot or after a while but the gdm login sound is heard'''
 
'''The monitor turn black/off either straight after boot or after a while but the gdm login sound is heard'''
 
 
First try not to restart the PC. Wait for a minute or to to see if your monitor wake up.
 
First try not to restart the PC. Wait for a minute or to to see if your monitor wake up.
 
Please try to boot your computer with the BIOS option set to "CRT" only. The option "CRT+TV" does not work 100% well with the via driver. Not all people have this problem and it may be depending on BIOS version.
 
Please try to boot your computer with the BIOS option set to "CRT" only. The option "CRT+TV" does not work 100% well with the via driver. Not all people have this problem and it may be depending on BIOS version.
 
 
It might be the framebuffer that is buggy as well. You can try to turn off the framebuffer in either xorg or in grub boot menu.
 
It might be the framebuffer that is buggy as well. You can try to turn off the framebuffer in either xorg or in grub boot menu.
 
 
 
'''Computer does not initialise X'''
 
'''Computer does not initialise X'''
 
 
There can be several reasons for this. Best thing is to check the errors that X or gdm display.
 
There can be several reasons for this. Best thing is to check the errors that X or gdm display.
 
 
<u>X can not find the mouse</u>
 
<u>X can not find the mouse</u>
 
 
If you did not compile your mouse as a kernel module, even though I warned you about it previously, X will not be able to find it and will bail out. Change your kernel option again and recompile it, sudo make modules_install, copy the bzImage and reboot.
 
If you did not compile your mouse as a kernel module, even though I warned you about it previously, X will not be able to find it and will bail out. Change your kernel option again and recompile it, sudo make modules_install, copy the bzImage and reboot.
 
 
<u>Other X related issues</u>
 
<u>Other X related issues</u>
 
 
Kill gdm and reconfigure
 
Kill gdm and reconfigure
 
<pre><nowiki>
 
<pre><nowiki>
第281行: 第222行:
 
$ sudo gdm
 
$ sudo gdm
 
</nowiki></pre>
 
</nowiki></pre>
 
 
'''X initialise but LCD screen flickers in large resolutions'''
 
'''X initialise but LCD screen flickers in large resolutions'''
 
 
A bug I noticed. Most LCD work well in 60 Hz. In /etc/X11/xorg.conf edit Section "Monitor" and add VertRefresh like this:
 
A bug I noticed. Most LCD work well in 60 Hz. In /etc/X11/xorg.conf edit Section "Monitor" and add VertRefresh like this:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
Section "Monitor"
 
Section "Monitor"
Identifier      "Generic Monitor"
+
        Identifier      "Generic Monitor"
Option          "DPMS"
+
        Option          "DPMS"
VertRefresh    60
+
        VertRefresh    60
 
EndSection
 
EndSection
 
</nowiki></pre>
 
</nowiki></pre>
 
+
Save and restart X by logging out and back in, or typing <code><nowiki>sudo /etc/init.d/gdm restart</nowiki></code>. That should do it. Note that the tv-out function may not function after this. Many television sets operate at 50hz. One solution that work for me is to replace "VertRefresh 60" with "VertRefresh 50-60".
Save and restart X with Ctrl+Alt+Backspace. That should do it. Note that the tv-out function may not function after this. Many television sets operate at 50hz. One solution that work for me is to replace "VertRefresh 60" with "VertRefresh 50-60".
+
 
+
 
'''Note on first install of Ubuntu Breezy 5.10 and the Epia M'''
 
'''Note on first install of Ubuntu Breezy 5.10 and the Epia M'''
 
 
I do not use the framebuffer at all, so to minimize problems you can run the installer from the Ubuntu Breezy CD with this command instead of just pressing enter:
 
I do not use the framebuffer at all, so to minimize problems you can run the installer from the Ubuntu Breezy CD with this command instead of just pressing enter:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
linux debian-installer/framebuffer=false pci=noacpi
 
linux debian-installer/framebuffer=false pci=noacpi
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Note: This might apply to other boards as well, but I have only tested it with M 10000.
 
Note: This might apply to other boards as well, but I have only tested it with M 10000.
 
 
 
=== What made this wiki possible ===
 
=== What made this wiki possible ===
 
 
Almost everything in this wiki can be found at http://epialinux.org . Big thanks goes out to everyone there.
 
Almost everything in this wiki can be found at http://epialinux.org . Big thanks goes out to everyone there.
 
 
Email: <k4p0w3r at yahoo dot co dot uk>
 
Email: <k4p0w3r at yahoo dot co dot uk>
 
----
 
----
[[category:CategoryDocumentation]] [[category:CategoryCleanup]]
 
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2010年5月20日 (四) 00:44的最新版本

<<Include(Tag/Unsupported)>>

Via Epia DRI Howto

Introduction

Users who have any of the EPIA M, EPIA MII or EPIA CL motherboards will probably be interested in this wiki. After discovering that the via driver for X only work for 2d and not accellerated 3d/OpenGL I searched for a solution. I found that the driver does actually support it, but that the DRI enabled CLE266 graphics driver is not enabled in the kernel. Actually, neither of the kernels provided in the repositories have the option at all. After you have completed this wiki you should have a fully working DRI accellerated desktop and will be able to play Armagetron, Quake2 or whatever... Most of the information that I have provided here and the patch itself are covered in much more detail at http://www.epialinux.org (!) DRI is a short for "Direct Rendering Infrastructure" and is often used by OpenGL applications to provide hardware accellerated 3D graphics. (!) This wiki uses the 2.6.12 kernel. Other versions have not worked for me. (!) Breezy was used during this testing. If you use any other version, some commands may be different. /!\ This Wiki includes a brief guide of how to compile and install a custom 2.6.12 kernel. This can possibly render your system unbootable. You have been warned!

Requirements

This wiki has been fully tested on a fresh Breezy (5.10) install. Ubuntu should already be able to boot xorg and use the "via" driver to display 2D graphics without issues. If you have problems with the via driver before following this wiki, please see section Troubleshooting at the end of this page. All packages that is required for building a kernel. "build-essential" and "bin86" at least. You will also need extra packages for the frontend when you build the kernel. Example "libncurses5-dev" is needed for "make menuconfig". Sudo/Root access to the system. Time. This will take you an hour or two.

Let us begin

As previously mentioned, the kernels provided in the repositories is not suitable for what we want to do. Therefore we must download another one and patch it. Download and extract the kernel (it is approx. 30-40 Mb):

$ mkdir epia-kernel
$ cd epia-kernel
$ wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.12.tar.bz2
$ tar jxvf linux-2.6.12.tar.bz2

Download and extract the patch from epialinux.org:

$ wget http://www.epialinux.org/files/patch-2.6.12.3-epia.bz2
$ bunzip2 patch-2.6.12.3-epia.bz2

Patch the kernel:

$ cd linux-2.6.12
$ patch -p1 < ../patch-2.6.12.3-epia 

Configuring the kernel

Now you have several options of how you want to configure your kernel. My favourite is by using gconfig since it give you a nice overview but it is cumbersome.

gnome-interface:
$ make gconfig

or curses-interface:
$ make menuconfig

or kde-interface:
$ make xconfig

You will probably get a whole bunch of warnings that can be ignored for now. Configure it: Options with (?) are optional. Options with (Y) to be compiled in. Options with (M) as Module. If you are unsure about some of the options, check the provided help for it. Usually there is a "If you are unsure say Y" or "If you are unsure say N". Loadable module support

  • (Y) Enable loadable module support (for getting a mouse to work)
  • (?) Module unloading
  • (Y) Automatic kernel module loading

Processor type and features

  • (Y) Subarchitecture Type -> PC-compatible
  • (Y) Processor family -> VIA C3-2 (Nehemiah) if you have that CPU otherwise CyrixIII/VIA-C3
  • (?) High Memory Support -> Off (<1GB RAM), 4GB (1-4GB RAM)
  • (Y) MTRR

Power management options (ACPI) (APM is not needed at all)

  • (Y) Power Management support
  • (Y) ACPI -> ACPI support
  • (Y) Button
  • (Y) Fan
  • (Y) Processor
  • (Y) Thermalzone

Bus options

  • (?) PCCARD (If you have that on your board (My M doesn't have it, but some MII do)

Device Drivers

  • (?) Paralell port support (optional, I removed it since I have not used it for years)
  • (Y) SCSI device support
  • (Y) SCSI disk support (for use with USB Storage devices (usb cameras, mp3 players etc)

ATA/ATAPI/MFM/RLL support -> ATA/ATAPI/MFM/RLL -> Enhanced IDE/MFM/RLL -> PCI IDE chipset support -> Generic PCI bus-master DMA:

  • (Y) VIA82CXXX

(The other chipsets can be safely removed but make sure that "Use PCI DMA by default when available" is enabled.) Networking support Network device support -> Ethernet (10 or 100Mbit) -> EISA, VLB, PCI and on board controllers:

  • (Y) VIA Rhine support
  • (Y) Use MMIO instead of PIO
  • (?) PPP / SLIP if you use that kind of connection

Input device support

  • (Y) Generic input layer
  • (Y) Mouse interface
  • (?) Provide legacy /dev/psaux
  • (Y) Keyboards
  • (Y) Mouse
  • (M) PS/2 Mouse (Must be module, not Y)
  • (M) Serial Mouse (Must be module, not Y)
  • (Y) Miscellaneous devices
  • (M/Y/?) PC Speaker support
  • (Y) Hardware I/O ports
  • (Y) Serial I/O support ( /!\ For standard keyboard and mouse support )

Character devices

  • (Y) /dev/agpgart (AGP Support)
  • (Y) VIA chipset support
  • (Y) Direct Rendering Manager
  • (Y) Via unichrome video cards

I2C support

  • (Y) I2C support
  • (Y) I2C device interface
  • (Y) I2C Algorithms
  • (Y) I2C bit-banging interfaces
  • (M/Y/?) I2C PCF 8584
  • (M/Y/?) I2C PCF 9564

I2C Hardware Bus support

  • (Y/M) VIA 82C586B (if you have this hardware)
  • (Y/M) VIA 82C596/82C686/823x (if you have this hardware)

Hardware Sensors Chip support

  • (Y) VIA686A (if you have this hardware)
  • (Y) Via VT1211 SuperIO and HW monitoring chip (if you have this hardware, my M-10000 has it at least)

Multimedia devices

  • (Y/M) Video For Linux

Graphics support

  • (Y) Console display driver support -> VGA text console -> Video mode selection support (very nice to have)

Sound

  • (Y) Sound card support

Advanced Linux Sound Architecture

  • (Y) Advanced Linux Sound Architecture
  • (Y) Sequencer support
  • (Y) OSS Mixer API
  • (Y) OSS PCM
  • (Y) OSS Sequencer

Generic devices

  • (Y) Generic MPU-401 UART driver

PCI devices

  • (Y) VIA 82C686A/B, 8233/8235 AC97 Controller

USB support

  • (Y) Support for Host-side USB
  • (Y) USB device filesystem
  • (Y) EHCI HCD (USB 2.0)
  • (Y) UHCI HCD
  • (Y) USB Mass Storage support
  • (Y) USB Human Interface Device (full HID) support
  • (Y) HID input layer support
  • (Y) USB Monitor

MMC/SD Card support

  • (?/Y) MMC support (Multimedia card support, if you have the hardware)

Cryptographic options

  • (?) Cryptographic API, and then choose which you want.

Hardware crypto devices

  • (?) Support for VIA PadLock (if you have the hardware)
After you have selected what you need in the configuration utility, SAVE your changes and exit (do not use "save as...")!
Your file has now been saved as .config

(!) All other kernel options depends on what you want. What I have provided for you is a checklist for the most common options so you get functional DRI, sound, usb, i2c etc. /!\ Important: Be sure to load the mouse drivers as MODULES! If you mark the psmouse (for example) as Y instead of M somehow the mouse will not be detected at all. Now it's time to build the kernel. On my M-10000 1Ghz this took about 20 minutes.

$ make

Back up important files

/!\ You are advised not to skip this step since if the new kernel fail, you will have alot of work ahead of you...

$ sudo cp /vmlinuz /vmlinuz.original
$ sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.original

Installing the modules and kernel

$ sudo make modules_install
$ sudo cp arch/i386/boot/bzImage /vmlinuz

Editing Grub

In order to boot our new kernel we must edit the grub boot menu. I use nano, but you can use whatever texteditor you want.

$ sudo nano /boot/grub/menu.lst

Copy the first boot option that look something like this:

title           Ubuntu, kernel 2.6.12-9-686
root            (hd0,4)
kernel          /boot/vmlinuz-2.6.12-9-686.bak root=/dev/hda5 ro pci=noacpi quiet splash
initrd          /boot/initrd.img-2.6.12-9-686.bak
savedefault
boot

Now you have two copies of the first entry. Edit the second copy to this:

title           Ubuntu, kernel 2.6.12 EPIA
root            (hd0,4)
kernel          /vmlinuz root=/dev/hda5 ro pci=noacpi quiet quiet splash
savedefault
boot

(!) Note that the initrd line should be removed Save the file and exit (in nano you use Ctrl+x, press "Y" and the Return/Enter key to save)

Booting and testing

Now it's time to boot the system and, if needed, make some final adjustments. Bookmark this page and cross your fingers. Reboot and select your new custom kernel. Your system should start up without any errors into your graphical login screen. If not, see next section called Troubleshooting. Log in. Open a terminal and type:

$ glxinfo | grep rendering
direct rendering: Yes
$

Congratulations, you're done with this guide If "No" is displayed instead, well see the next section...

Troubleshooting

The monitor turn black/off either straight after boot or after a while but the gdm login sound is heard First try not to restart the PC. Wait for a minute or to to see if your monitor wake up. Please try to boot your computer with the BIOS option set to "CRT" only. The option "CRT+TV" does not work 100% well with the via driver. Not all people have this problem and it may be depending on BIOS version. It might be the framebuffer that is buggy as well. You can try to turn off the framebuffer in either xorg or in grub boot menu. Computer does not initialise X There can be several reasons for this. Best thing is to check the errors that X or gdm display. X can not find the mouse If you did not compile your mouse as a kernel module, even though I warned you about it previously, X will not be able to find it and will bail out. Change your kernel option again and recompile it, sudo make modules_install, copy the bzImage and reboot. Other X related issues Kill gdm and reconfigure

$ sudo killall gdm
$ sudo dpkg-reconfigure xserver-xorg

Make sure you select "via" as a driver and answer "YES" when asked about DRI.

$ sudo gdm

X initialise but LCD screen flickers in large resolutions A bug I noticed. Most LCD work well in 60 Hz. In /etc/X11/xorg.conf edit Section "Monitor" and add VertRefresh like this:

Section "Monitor"
        Identifier      "Generic Monitor"
        Option          "DPMS"
        VertRefresh     60
EndSection

Save and restart X by logging out and back in, or typing sudo /etc/init.d/gdm restart. That should do it. Note that the tv-out function may not function after this. Many television sets operate at 50hz. One solution that work for me is to replace "VertRefresh 60" with "VertRefresh 50-60". Note on first install of Ubuntu Breezy 5.10 and the Epia M I do not use the framebuffer at all, so to minimize problems you can run the installer from the Ubuntu Breezy CD with this command instead of just pressing enter:

linux debian-installer/framebuffer=false pci=noacpi

Note: This might apply to other boards as well, but I have only tested it with M 10000.

What made this wiki possible

Almost everything in this wiki can be found at http://epialinux.org . Big thanks goes out to everyone there. Email: <k4p0w3r at yahoo dot co dot uk>