特殊:Badtitle/NS100:ViaEpiaDriHowto:修订间差异

来自Ubuntu中文
跳到导航跳到搜索
Wikibot留言 | 贡献
无编辑摘要
Wikibot留言 | 贡献
无编辑摘要
第42行: 第42行:
gnome-interface:
gnome-interface:
$ make gconfig
$ make gconfig
or curses-interface:
or curses-interface:
$ make menuconfig
$ make menuconfig
or kde-interface:
or kde-interface:
$ make xconfig
$ make xconfig
第214行: 第216行:
$ sudo killall gdm
$ sudo killall gdm
$ sudo dpkg-reconfigure xserver-xorg
$ sudo dpkg-reconfigure xserver-xorg
Make sure you select "via" as a driver and answer "YES" when asked about DRI.
Make sure you select "via" as a driver and answer "YES" when asked about DRI.
$ sudo gdm
$ sudo gdm
</nowiki></pre>
</nowiki></pre>
第221行: 第225行:
<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>

2007年12月6日 (四) 10:59的版本

{{#ifexist: :ViaEpiaDriHowto/zh | | {{#ifexist: ViaEpiaDriHowto/zh | | {{#ifeq: {{#titleparts:ViaEpiaDriHowto|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:ViaEpiaDriHowto|1|-1|}} | zh | | }}

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 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 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>