27 2月 2013

[好閒] HP mini 2133 Ubuntu 10.04 VGA 和音效修正

標題那個「」讀四聲!

到現在,我還是不知道我是吃錯了什麼藥…

幾年前在 HP mini 2133 (以下簡稱 mini) 上裝了 Ubuntu 8.04 版以後,也一直用得好好的,後來因為 2009 年時漏接了一個很重要的 MSN 訊息…便升級上 Ubuntu 9.04…只是,之後就再也沒什麼 MSN 訊息了…

[上一集: [游手] HP mini 2133 Ubuntu 9.04 VGA 設定]

最近一次在交大的 PyHUG (Python 新竹使用者聚會) 裡,因為和一位交大的學生聊到自己寫的東西時,就順手在手邊的 mini 上啟動了 DTLK (Droidtown LInguistic Field Research Toolkits,卓騰語言學田調工具組,一個我設計來專門用在語言學田調實驗的軟體) 給他看一下效果…

結果呢,因為 wx.lib.agw.peakmeter 這一個小小的東西沒有安裝,所以 DTLK 沒辦法正常地執行。那為什麼不安裝呢?嗯…因為今年已經是 2013 年,2009 年出品的 Ubuntu 9.04 已經停止官方維護了,找不到地方可以下載這個小東西。所以我就吃錯藥地想…「既然 Ubuntu 13.04 還沒出,而且 Ubuntu 12.04 又是三年長期支援版的,那我乾脆來升級到 Ubuntu 12.04 好了!」

於是…便開始了沒日沒夜的各種升級和相容測試…直到最後,我確定還是因為 VIA (威盛) 沒有推出 Ubuntu 12.04 版可用的 3D 晶片驅動程式,所以跑起來還是鳥鳥的 (很慢的那種鳥),於是,幾經測試後,我裝上了即將於今年四月停止官方更新支援的 Ubuntu 10.04 (之後還是可以手動裝新軟體啦),加上測試過後可以用的 VIA Chrome9 3D 晶片驅動程式,再加上之前改出來的 xorg.conf,就多了 VGA 的外接螢幕功能啦,哦耶~

一切都如此美好嗎?No...(絕望語調) 不知道為什麼,Ubuntu 10.04 的官方 ALSA 音效驅動程式版本太舊,所以會直接「無視」mini 主機板上的音效晶片,就像沒音效卡一樣。

裝到這裡,我還把臉別過去,一邊當做沒看到,一邊心想:「沒關係…沒關係…可以工作就好,不能聽音樂沒關係…反正我也很少聽音樂了…沒關係…什麼?Youtube?誰需要 Youtube 嘛…沒關係…別怕別怕…」

不對!等等…我的工作有 1/3 都和錄音及人聲的分析有關,我拿一個沒有音效卡的電腦幹嘛?寫 Blog 嗎?(咦?)

於是,又開始在吃飯時配 Google 做搜尋,究~竟要怎麼調整,才能升級 10.04 的 ALSA 版本呢?(Ubuntu 10.04 的 ALSA 是 1.0.21 版,但這種音效卡無法驅動的問題,要到 1.0.23 版以後才獲得解決。)

最後,終於在這裡 (https://launchpad.net/~team-iquik/+archive/alsa) 找到了解法。三個指令下去後…HP mini 2133 的喇叭發出悅耳的登入音效…啊…我當初就是為了這款小筆電有超大的鍵盤和超棒的喇叭才買它的嘛…(好啦…其實是因為當初剛畢業開始工作沒多久,而它又是賣場裡最便宜的筆電…)

以上背景心得小劇場交待完畢,以下開始講操作步驟…

以下分成兩個部份,第一部份講如何在 HP mini 2133 上安裝 Chrome9 的 3D 驅動,並加上 VGA out 的功能。畢竟…要是一部「筆電」無法「接上投影機」那…不就像是交個女朋友,但是不能見面一樣雞肋嗎?

閒話休提:
1. 打開終端機,輸入…
sudo apt-get install linux-headers-generic
2. 把 Ubuntu 10.04 可以用的驅動程式抓回來…
wget http://www.viaarena.com/Driver/5.75.32.87a-u1004-55689.tar.gz
3. 解壓縮…
tar -xvvf 5.75.32.87a-u1004-55689.tar.gz
4. 切換到驅動程式的目錄裡… (注意,它的目錄和 Ubuntu 9.04 版的相比少了一層!)
cd 5.75.32.87a-u1004-55689/VIA_Chrome9_2.6.33/
5. 編譯驅動程式…
make
6. 把編好的驅動程式複製到正確的位置準備安裝…
cp via_chrome9.ko ../bin
7. 切換回安裝程式的目錄…
cd ../
8. 用 root 的管理者權限安裝驅動程式…
sudo ./vinstall
9. 先把預設的 xorg.conf 做個備份,以免玩壞了還有備份可以救…
(不過我大部份的經驗是…救不回來了啦~重裝比較快。)
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
10. 把下面這個我改好的 xorg.conf 檔抓回去,放在 5.75.32.87a-u1004-55689 的目錄下…
### VIA template edited by luvit with some modifications by Fr4gZ0n3###

Section "ServerFlags"
#    Option        "DefaultServerLayout"    "LCD-clone"
#    Option        "DefaultServerLayout"    "CRT-clone"
#    Option        "DefaultServerLayout"    "LCD-only"
#    Option        "DefaultServerLayout"    "CRT-only"

    Option        "AllowMouseOpenFail"    "on"
    Option        "Pixmap"        "32"
    EndSection

# Default locations of font files - change if required.

    Section "Files"
    FontPath    "/usr/share/fonts/X11/misc"
    FontPath    "/usr/share/fonts/X11/cyrillic"
    FontPath    "/usr/share/fonts/X11/100dpi/:unscaled"
    FontPath    "/usr/share/fonts/X11/75dpi/:unscaled"
    FontPath    "/usr/share/fonts/X11/Type1"
    FontPath    "/usr/share/fonts/X11/100dpi"
    FontPath    "/usr/share/fonts/X11/75dpi"
    FontPath    "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"

    ModulePath    "/usr/lib/xorg/modules"
    InputDevices    "/dev/gpmdata"
    InputDevices    "/dev/input/mice"
    EndSection

    Section "DRI"
    Group 0
    Mode 0666
    EndSection

    Section "InputDevice"
    Identifier    "Keyboard 0"
    Driver        "kbd"
    Option        "Protocol"        "Standard"
    Option        "XkbLayout"       "us"
    Option        "XkbModel"        "pc104"
    Option        "XkbRules"        "xfree86"
    EndSection

    Section "InputDevice"
    Identifier    "Mouse 0"
    Driver        "synaptics"
    Option        "Buttons"         "5"
    Option        "Device"          "/dev/input/mice"
    Option        "Emulate3Buttons" "on"
    Option        "InputFashion"    "Mouse"
    Option        "Name"            "Synaptics Touchpad"
    Option        "Protocol"        "explorerps/2"
    Option        "SHMConfig"       "on"  # GUI setting access
    Option        "ZAxisMapping"    "4 5"
    EndSection

    Section "InputDevice"
    Identifier    "Mouse 1"
    Driver        "mouse"
    Option        "CorePointer"
    Option        "Buttons"         "5"
    Option        "Device"          "/dev/input/mice"
    Option        "Emulate3Buttons" "on"
    Option        "Name"            "Generic Mouse"
    Option        "Protocol"        "Auto"
    Option        "Vendor"          "Sysp"
    Option        "ZAxisMapping"    "4 5"
    EndSection

    Section "Module"
    Load  "glx"
    Load  "dri"
    Load  "extmod"
    Load    "dbe"
    Load    "freetype"
    Load    "record"
    Load    "v4l"
    EndSection

# Device outputs not connected in the HP-2133

    Section "Monitor"
    Identifier "Monitor"
    ModeLine "720x480" 26.7 720 736 808 896 480 481 484 497
    ModeLine "720x576" 32.7 720 744 816 912 576 577 580 597
    ModeLine "800x480" 29.58 800 816 896 992 480 481 484 497
    ModeLine "848x480" 31.5 848 864 952 1056 480 481 484 497
    ModeLine "856x480" 31.7 856 872 960 1064 480 481 484 497
    ModeLine "960x600" 45.98 960 1000 1096 1232  600 601 604 622 -HSync +Vsync
    Modeline "1024x600" 48.96 1024 1064 1168 1312 600 601 604 622 -HSync +Vsync
    ModeLine "1000x600" 48.07 1000 1040 1144 1288 600 601 604 622 -HSync +Vsync
    ModeLine "1024x512" 41.3 1024 1056 1160 1296 512 513 516 531
    ModeLine "1088x612" 52.95 1088 1128 1240 1392 612 613 616 634 -HSync +Vsync
    ModeLine "1152x720" 67.32 1152 1208 1328 1504 720 721 724 746 -HSync +Vsync
    ModeLine "1200x720" 70.18 1200 1256 1384 1568 720 721 724 746 -HSync +Vsync
    ModeLine "1280x600" 61.50 1280 1336 1464 1648 600 601 604 622 -HSync +Vsync
    ModeLine "1280x720" 74.6 1280 1341 1474 1688 720 721 724 746
    ModeLine "1280x768" 80.1 1280 1344 1480 1680 768 769 772 795
    ModeLine "1360x768" 85.50 1360 1392 1712 1744 768 783 791 807 +HSync +Vsync
    ModeLine "1366x768" 85.86 1366 1440 1584 1800 768 769 772 795 -HSync +Vsync
    ModeLine "1440x900" 106.47 1440 1520 1672 1904 900 901 904 932 -HSync +Vsync
    ModeLine "1440x1050" 126.2 1440 1536 1688 1936 1050 1051 1054 1087
    ModeLine "1600x900" 119.00 1600 1696 1864 2128 900 901 904 932 -HSync +Vsync
    ModeLine "1600x1024" 136.36 1600 1704 1872 2144 1024 1025 1028 1060 -HSync +Vsync
    ModeLine "1792x1344" 202.97 1792 1920 2112 2432 1344 1345 1348 1391 -HSync +Vsync
    ModeLine "1856x1392" 218.57 1856 1992 2192 2528 1392 1393 1396 1441 -HSync +Vsync
    ModeLine "1920x1080" 172.9 1920 2043 2249 2578 1080 1081 1084 1118
    ModeLine "2048x1536" 266.95 2048 2200 2424 2800 1536 1537 1540 1589 -HSync +Vsync
    ModeLine "720x480" 34.9 720 752 824 928 480 481 484 502
    ModeLine "720x576" 42.6 720 760 832 944 576 577 580 602
    ModeLine "848x480" 41.0 848 880 968 1088 480 481 484 502
    ModeLine "856x480" 41.3 856 888 976 1096 480 481 484 502
    ModeLine "1024x512" 53.3 1024 1072 1176 1328 512 513 516 535
    ModeLine "1280x768" 103.0 1280 1360 1496 1712 768 769 772 802
    ModeLine "1440x1050" 160.0 1440 1536 1696 1952 1050 1051 1054 1096
    ModeLine "1280x768" 118.5 1280 1368 1504 1728 768 769 772 807
    ModeLine "1440x1050" 184.5 1440 1544 1704 1968 1050 1051 1054 1103
    ModeLine "848x480" 47.4 848 888 976 1104 480 481 484 505
    Option        "Ignore"    "true"
    EndSection

    Section "Monitor"
    Identifier "Monitor"
    ModeLine "720x480" 26.7 720 736 808 896 480 481 484 497
    ModeLine "720x576" 32.7 720 744 816 912 576 577 580 597
    ModeLine "800x480" 29.58 800 816 896 992 480 481 484 497
    ModeLine "848x480" 31.5 848 864 952 1056 480 481 484 497
    ModeLine "856x480" 31.7 856 872 960 1064 480 481 484 497
    ModeLine "960x600" 45.98 960 1000 1096 1232  600 601 604 622 -HSync +Vsync
    ModeLine "1000x600" 48.07 1000 1040 1144 1288 600 601 604 622 -HSync +Vsync
    ModeLine "1024x512" 41.3 1024 1056 1160 1296 512 513 516 531
    Modeline "1024x600" 48.96 1024 1064 1168 1312 600 601 604 622 -HSync +Vsync
    ModeLine "1088x612" 52.95 1088 1128 1240 1392 612 613 616 634 -HSync +Vsync
    ModeLine "1152x720" 67.32 1152 1208 1328 1504 720 721 724 746 -HSync +Vsync
    ModeLine "1200x720" 70.18 1200 1256 1384 1568 720 721 724 746 -HSync +Vsync
    ModeLine "1280x600" 61.50 1280 1336 1464 1648 600 601 604 622 -HSync +Vsync
    ModeLine "1280x720" 74.6 1280 1341 1474 1688 720 721 724 746
    ModeLine "1280x768" 80.1 1280 1344 1480 1680 768 769 772 795
    ModeLine "1360x768" 85.50 1360 1392 1712 1744 768 783 791 807 +HSync +Vsync
    ModeLine "1366x768" 85.86 1366 1440 1584 1800 768 769 772 795 -HSync +Vsync
    ModeLine "1440x900" 106.47 1440 1520 1672 1904 900 901 904 932 -HSync +Vsync
    ModeLine "1440x1050" 126.2 1440 1536 1688 1936 1050 1051 1054 1087
    ModeLine "1600x900" 119.00 1600 1696 1864 2128 900 901 904 932 -HSync +Vsync
    ModeLine "1600x1024" 136.36 1600 1704 1872 2144 1024 1025 1028 1060 -HSync +Vsync
    ModeLine "1792x1344" 202.97 1792 1920 2112 2432 1344 1345 1348 1391 -HSync +Vsync
    ModeLine "1856x1392" 218.57 1856 1992 2192 2528 1392 1393 1396 1441 -HSync +Vsync
    ModeLine "1920x1080" 172.9 1920 2043 2249 2578 1080 1081 1084 1118
    ModeLine "2048x1536" 266.95 2048 2200 2424 2800 1536 1537 1540 1589 -HSync +Vsync
    ModeLine "720x480" 34.9 720 752 824 928 480 481 484 502
    ModeLine "720x576" 42.6 720 760 832 944 576 577 580 602
    ModeLine "848x480" 41.0 848 880 968 1088 480 481 484 502
    ModeLine "856x480" 41.3 856 888 976 1096 480 481 484 502
    ModeLine "1024x512" 53.3 1024 1072 1176 1328 512 513 516 535
    ModeLine "1280x768" 103.0 1280 1360 1496 1712 768 769 772 802
    ModeLine "1440x1050" 160.0 1440 1536 1696 1952 1050 1051 1054 1096
    ModeLine "1280x768" 118.5 1280 1368 1504 1728 768 769 772 807
    ModeLine "1440x1050" 184.5 1440 1544 1704 1968 1050 1051 1054 1103
    ModeLine "848x480" 47.4 848 888 976 1104 480 481 484 505
    Option        "Ignore"    "true"
    EndSection

# Internal LCD does not return DDC information.
# Define first channel:

    Section "Modes"    # See also "HP-2133 Known Modes" at file end.
    Identifier    "HP-2133 LCD Modes"
    # Default mode "1280x768": 80.1 MHz, 47.7 kHz, 60.0 Hz
    Modeline "1024x600" 48.96 1024 1064 1168 1312 600 601 604 622 -HSync +Vsync
    # Default mode "1280x720": 74.6 MHz, 44.2 kHz, 59.2 Hz
    # Modeline "1280x720-59.2"   74.60  1280 1341 1474 1688  720 721 724 746 -hsync +vsync
    # Default mode "1024x768": 65.0 MHz, 48.4 kHz, 60.0 Hz
    #Modeline "1024x768-60.0"   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync
    EndSection

    Section "Monitor"
    Identifier "Monitor"
    ModeLine "720x480" 26.7 720 736 808 896 480 481 484 497
    ModeLine "720x576" 32.7 720 744 816 912 576 577 580 597
    ModeLine "800x480" 29.58 800 816 896 992 480 481 484 497
    ModeLine "848x480" 31.5 848 864 952 1056 480 481 484 497
    ModeLine "856x480" 31.7 856 872 960 1064 480 481 484 497
    ModeLine "960x600" 45.98 960 1000 1096 1232  600 601 604 622 -HSync +Vsync
    ModeLine "1000x600" 48.07 1000 1040 1144 1288 600 601 604 622 -HSync +Vsync
    ModeLine "1024x512" 41.3 1024 1056 1160 1296 512 513 516 531
    Modeline "1024x600" 48.96 1024 1064 1168 1312 600 601 604 622 -HSync +Vsync
    ModeLine "1088x612" 52.95 1088 1128 1240 1392 612 613 616 634 -HSync +Vsync
    ModeLine "1152x720" 67.32 1152 1208 1328 1504 720 721 724 746 -HSync +Vsync
    ModeLine "1200x720" 70.18 1200 1256 1384 1568 720 721 724 746 -HSync +Vsync
    ModeLine "1280x600" 61.50 1280 1336 1464 1648 600 601 604 622 -HSync +Vsync
    ModeLine "1280x720" 74.6 1280 1341 1474 1688 720 721 724 746
    ModeLine "1280x768" 80.1 1280 1344 1480 1680 768 769 772 795
    ModeLine "1360x768" 85.50 1360 1392 1712 1744 768 783 791 807 +HSync +Vsync
    ModeLine "1366x768" 85.86 1366 1440 1584 1800 768 769 772 795 -HSync +Vsync
    ModeLine "1440x900" 106.47 1440 1520 1672 1904 900 901 904 932 -HSync +Vsync
    ModeLine "1440x1050" 126.2 1440 1536 1688 1936 1050 1051 1054 1087
    ModeLine "1600x900" 119.00 1600 1696 1864 2128 900 901 904 932 -HSync +Vsync
    ModeLine "1600x1024" 136.36 1600 1704 1872 2144 1024 1025 1028 1060 -HSync +Vsync
    ModeLine "1792x1344" 202.97 1792 1920 2112 2432 1344 1345 1348 1391 -HSync +Vsync
    ModeLine "1856x1392" 218.57 1856 1992 2192 2528 1392 1393 1396 1441 -HSync +Vsync
    ModeLine "1920x1080" 172.9 1920 2043 2249 2578 1080 1081 1084 1118
    ModeLine "2048x1536" 266.95 2048 2200 2424 2800 1536 1537 1540 1589 -HSync +Vsync
    ModeLine "720x480" 34.9 720 752 824 928 480 481 484 502
    ModeLine "720x576" 42.6 720 760 832 944 576 577 580 602
    ModeLine "848x480" 41.0 848 880 968 1088 480 481 484 502
    ModeLine "856x480" 41.3 856 888 976 1096 480 481 484 502
    ModeLine "1024x512" 53.3 1024 1072 1176 1328 512 513 516 535
    ModeLine "1280x768" 103.0 1280 1360 1496 1712 768 769 772 802
    ModeLine "1440x1050" 160.0 1440 1536 1696 1952 1050 1051 1054 1096
    ModeLine "1280x768" 118.5 1280 1368 1504 1728 768 769 772 807
    ModeLine "1440x1050" 184.5 1440 1544 1704 1968 1050 1051 1054 1103
    ModeLine "848x480" 47.4 848 888 976 1104 480 481 484 505
    VertRefresh    50.00-100.00            # X11 discovery claim
    HorizSync    30.00-113.00            # X11 discovery claim
    # Dot clock range: 20.00-270.00MHz      # X11 discovery claim
    # Typical dot pitch is: .1515mm x .1515mm
    # Native resolution is: 1280x768
    DisplaySize    193 116                 # Actual: 193.9 116.4
    UseModes    "HP-2133 LCD Modes"
    Option        "PreferredMode"        "1024x600"
    Option        "DPMS"
    EndSection

    Section "Device"
    Driver "via"
    VendorName  "VIA Tech"
    BoardName   "via"
            #Option "PanelID" "0"    #640x480,    Single,    Dithering
    Identifier    "via-P4M900 Device 0"
    BusID        "PCI:1:0:0"
    Option        "Monitor-LCD"        "HP-2133 LCD"
#    Option        "PanelID"        "17"    # 1280x720 Single, Dithering
#    Option        "PanelID"           "12"    # 1280x768 Single, Non-Dithering
    Option        "NoDDCValue"
    EndSection

    Section "Screen"
    Monitor  "Monitor"
    SubSection "Display"
        Modes  "1024x600"
        #Virtual 1024 600
        Depth  24
    EndSubSection
    Identifier    "via-P4M900 Screen 0"
    Device        "via-P4M900 Device 0"
    Subsection    "Display"
        Depth    24             # Depth 16 broke
#        Modes    "1280x768-60.0" "1280x720-59.2" "1024x768-60.0"
            Modes    "1024x600"
#        Virtual    1024 600
    EndSubsection
    # Device section options:
    Option        "ForceLCD"        "true"    # BIOS setting over-ride
    Option        "ActiveDevice"        "LCD"
    Option        "VideoOnDevice"        "LCD"    # Broke ?
    Option        "SetMpegFBNumber"    "true"    # Unknown if required
    EndSection

# External device expected to return DDC information.
# Flying on full auto here, the smoke you smell may be your monitor:

    Section "Monitor"
    Identifier "Monitor"
    ModeLine "720x480" 26.7 720 736 808 896 480 481 484 497
    ModeLine "720x576" 32.7 720 744 816 912 576 577 580 597
    ModeLine "800x480" 29.58 800 816 896 992 480 481 484 497
    ModeLine "848x480" 31.5 848 864 952 1056 480 481 484 497
    ModeLine "856x480" 31.7 856 872 960 1064 480 481 484 497
    ModeLine "960x600" 45.98 960 1000 1096 1232  600 601 604 622 -HSync +Vsync
    ModeLine "1000x600" 48.07 1000 1040 1144 1288 600 601 604 622 -HSync +Vsync
    ModeLine "1024x512" 41.3 1024 1056 1160 1296 512 513 516 531
    Modeline "1024x600" 48.96 1024 1064 1168 1312 600 601 604 622 -HSync +Vsync
    ModeLine "1088x612" 52.95 1088 1128 1240 1392 612 613 616 634 -HSync +Vsync
    ModeLine "1152x720" 67.32 1152 1208 1328 1504 720 721 724 746 -HSync +Vsync
    ModeLine "1200x720" 70.18 1200 1256 1384 1568 720 721 724 746 -HSync +Vsync
    ModeLine "1280x600" 61.50 1280 1336 1464 1648 600 601 604 622 -HSync +Vsync
    ModeLine "1280x720" 74.6 1280 1341 1474 1688 720 721 724 746
    ModeLine "1280x768" 80.1 1280 1344 1480 1680 768 769 772 795
    ModeLine "1360x768" 85.50 1360 1392 1712 1744 768 783 791 807 +HSync +Vsync
    ModeLine "1366x768" 85.86 1366 1440 1584 1800 768 769 772 795 -HSync +Vsync
    ModeLine "1440x900" 106.47 1440 1520 1672 1904 900 901 904 932 -HSync +Vsync
    ModeLine "1440x1050" 126.2 1440 1536 1688 1936 1050 1051 1054 1087
    ModeLine "1600x900" 119.00 1600 1696 1864 2128 900 901 904 932 -HSync +Vsync
    ModeLine "1600x1024" 136.36 1600 1704 1872 2144 1024 1025 1028 1060 -HSync +Vsync
    ModeLine "1792x1344" 202.97 1792 1920 2112 2432 1344 1345 1348 1391 -HSync +Vsync
    ModeLine "1856x1392" 218.57 1856 1992 2192 2528 1392 1393 1396 1441 -HSync +Vsync
    ModeLine "1920x1080" 172.9 1920 2043 2249 2578 1080 1081 1084 1118
    ModeLine "2048x1536" 266.95 2048 2200 2424 2800 1536 1537 1540 1589 -HSync +Vsync
    ModeLine "720x480" 34.9 720 752 824 928 480 481 484 502
    ModeLine "720x576" 42.6 720 760 832 944 576 577 580 602
    ModeLine "848x480" 41.0 848 880 968 1088 480 481 484 502
    ModeLine "856x480" 41.3 856 888 976 1096 480 481 484 502
    ModeLine "1024x512" 53.3 1024 1072 1176 1328 512 513 516 535
    ModeLine "1280x768" 103.0 1280 1360 1496 1712 768 769 772 802
    ModeLine "1440x1050" 160.0 1440 1536 1696 1952 1050 1051 1054 1096
    ModeLine "1280x768" 118.5 1280 1368 1504 1728 768 769 772 807
    ModeLine "1440x1050" 184.5 1440 1544 1704 1968 1050 1051 1054 1103
    ModeLine "848x480" 47.4 848 888 976 1104 480 481 484 505
    Option        "DPMS"
    EndSection

    Section "Device"
    Driver "via"
    VendorName  "VIA Tech"
    BoardName   "via"
            #Option "PanelID" "0"    #640x480,    Single,    Dithering
    Identifier    "via-P4M900 Device 1"
    BusID        "PCI:1:0:0"
    Option        "Monitor-CRT"        "HP-2133 External"
    EndSection

    Section "Screen"
    Monitor  "Monitor"
    SubSection "Display"
        Modes  "1024x600"
        #Virtual 1024 600
        Depth  24
    EndSubSection
    Identifier    "via-P4M900 Screen 1"
    Device        "via-P4M900 Device 1"
    Subsection    "Display"
        Depth    24             # Depth 16 broke
#        Virtual    2048 1536
    EndSubsection
    # Device section options:
    Option        "ActiveDevice"        "CRT"
    Option        "VideoOnDevice"        "CRT"    # Broke ?
    Option        "SetMpegFBNumber"    "true"    # Unknown if required
    EndSection

# Single channel, dual outputs driven, screen descriptions

    Section "Screen"
    Monitor  "Monitor"
    SubSection "Display"
        Modes  "1024x768" #Changed by Peter
        #Virtual 1024 600
        Depth  24
    EndSubSection
    Identifier    "via-P4M900 Clone 0"
    Device        "via-P4M900 Device 0"
    Subsection    "Display"
        Depth    24            # Depth 16 broke
#        Modes    "1024x600" "1200x720" "1024x768"
            Modes    "1024x768" #Changed by Peter
#        Virtual    2048 1536
    EndSubsection
    # Device section options:
    Option        "ActiveDevice"        "LCD,CRT"
    Option        "ForceLCD"        "true"
    Option        "VideoOnDevice"        "LCD"    # Broke ?
    # Option true turned off mouse on LCD:
    Option        "Simultaneous"        "false"
    EndSection

    Section "Screen"
    Monitor  "Monitor"
    SubSection "Display"
        Modes  "1024x768" #Changed by Peter
        #Virtual 1024 600
        Depth  24
    EndSubSection
    Identifier    "via-P4M900 Clone 1"
    Device        "via-P4M900 Device 1"
    Subsection    "Display"
        Depth    24             # Depth 16 broke
#        Virtual    2048 1536
    EndSubsection
    # Device section options:
    Option        "ActiveDevice"        "CRT,LCD"
    Option        "ForceLCD"        "true"
    Option        "VideoOnDevice"        "CRT"    # Broke ?
    # Option true turned off mouse on LCD:
    Option        "Simultaneous"        "false"
    EndSection

# RandR is broken, in various places, for various reasons:
# The driver does not recognize the RandR naming conventions:
# (WW) VIA(0): Option "Monitor-LCD" is not used
# (WW) VIA(0): Option "Monitor-CRT" is not used
# (WW) VIA(0): Option "Monitor-DVI" is not used
# (WW) VIA(0): Option "Monitor-TV" is not used
# (==) RandR enabled
# And if you can't name them, xrandr can't select them.  Bummer.

# Old-school layouts

    Section "ServerLayout"
    Option "RandR" "False"
    Identifier    "LCD-clone"
    InputDevice    "Keyboard 0"    "CoreKeyBoard"
    InputDevice    "Mouse 0"    "SendCoreEvents"
    InputDevice    "Mouse 1"    "SendCoreEvents"
    Screen        "via-P4M900 Clone 0"
    EndSection

    Section "ServerLayout"
    Option "RandR" "False"
    Identifier    "CRT-clone"
    InputDevice    "Keyboard 0"    "CoreKeyBoard"
    InputDevice    "Mouse 0"    "SendCoreEvents"
    InputDevice    "Mouse 1"    "SendCoreEvents"
    Screen        "via-P4M900 Clone 1"
    EndSection

    Section "ServerLayout"
    Option "RandR" "False"
    Identifier    "LCD-only"
    InputDevice    "Keyboard 0"    "CoreKeyBoard"
    InputDevice    "Mouse 0"    "SendCoreEvents"
    InputDevice    "Mouse 1"    "SendCoreEvents"
    Screen        "via-P4M900 Screen 0"
    EndSection

    Section "ServerLayout"
    Option "RandR" "False"
    Identifier    "CRT-only"
    InputDevice    "Keyboard 0"    "CoreKeyBoard"
    InputDevice    "Mouse 0"    "SendCoreEvents"
    InputDevice    "Mouse 1"    "SendCoreEvents"
    Screen        "via-P4M900 Screen 1"
    EndSection

Section "Modes"
    Identifier  "HP-2133 Known Modes"
    ## X11 discovered modes are marked "Default mode";
    ## VIA reference file modes are marked "Extra mode" in this list.
    ## All have been renamed to include refresh rate and not conflict
    ## with the standard VESA names (most are VESA standard rates).

    ## Refresh rate 60Hz - The prefered LCD refresh rate.

    # Default mode "2048x1536": 266.9 MHz, 95.3 kHz, 60.0 Hz
    Modeline "2048x1536-60.0"  266.95  2048 2200 2424 2800  1536 1537 1540 1589 -hsync +vsync
    # Default mode "1920x1440": 234.0 MHz, 90.0 kHz, 60.0 Hz
    Modeline "1920x1440-60.0"  234.00  1920 2048 2256 2600  1440 1441 1444 1500 -hsync +vsync
    # Default mode "1920x1200": 193.2 MHz, 74.5 kHz, 60.0 Hz
    Modeline "1920x1200-60.0"  193.16  1920 2048 2256 2592  1200 1201 1204 1242

    ## 1080p (image 16:9, pixel 1:1)
    # Default mode "1920x1080": 172.9 MHz, 67.1 kHz, 60.0 Hz
    Modeline "1920x1080-60.0"  172.90  1920 2043 2249 2578  1080 1081 1084 1118 -hsync +vsync

    # Default mode "1856x1392": 218.3 MHz, 86.4 kHz, 60.0 Hz
    Modeline "1856x1392-60.0"  218.30  1856 1952 2176 2528  1392 1393 1396 1439 -hsync +vsync
    # Default mode "1856x1392": 218.6 MHz, 86.5 kHz, 60.0 Hz
    Modeline "1856x1392-60.0"  218.57  1856 1992 2192 2528  1392 1393 1396 1441 -hsync +vsync
    # Default mode "1792x1344": 204.8 MHz, 83.7 kHz, 60.0 Hz
    Modeline "1792x1344-60.0"  204.80  1792 1920 2120 2448  1344 1345 1348 1394 -hsync +vsync
    # Default mode "1792x1344": 203.0 MHz, 83.5 kHz, 60.0 Hz
    Modeline "1792x1344-60.0"  202.97  1792 1920 2112 2432  1344 1345 1348 1391 -hsync +vsync
    # Default mode "1680x1050": 147.1 MHz, 65.2 kHz, 60.0 Hz
    Modeline "1680x1050-60.0"  147.14  1680 1784 1968 2256  1050 1051 1054 1087
    # Default mode "1600x1200": 162.0 MHz, 75.0 kHz, 60.0 Hz
    Modeline "1600x1200-60.0"  162.00  1600 1664 1856 2160  1200 1201 1204 1250 +hsync +vsync
    # Default mode "1600x1024": 136.4 MHz, 63.6 kHz, 60.0 Hz
    Modeline "1600x1024-60.0"  136.36  1600 1704 1872 2144  1024 1025 1028 1060 -hsync +vsync
    # Default mode "1600x900": 119.0 MHz, 55.9 kHz, 60.0 Hz
    Modeline "1600x900-60.0"  119.00  1600 1696 1864 2128  900 901 904 932 -hsync +vsync
    # Default mode "1440x1050": 126.2 MHz, 65.2 kHz, 60.0 Hz
    Modeline "1440x1050-60.0"  126.20  1440 1536 1688 1936  1050 1051 1054 1087 -hsync +vsync
    # Default mode "1440x900": 108.8 MHz, 56.9 kHz, 60.2 Hz
    Modeline "1440x900-60.2"  108.84  1440 1472 1880 1912  900 918 927 946 +hsync +vsync
    # Default mode "1440x900": 106.5 MHz, 55.9 kHz, 60.0 Hz
    Modeline "1440x900-60.0"  106.47  1440 1520 1672 1904  900 901 904 932 -hsync +vsync
    # Default mode "1400x1050": 122.0 MHz, 64.9 kHz, 60.0 Hz
    Modeline "1400x1050-60.0"  122.00  1400 1488 1640 1880  1050 1052 1064 1082 +hsync +vsync

    ## Alternate version of 720p (image approx 16:9, pixel 1:1)
    # Default mode "1366x768": 85.9 MHz, 47.7 kHz, 60.0 Hz
    Modeline "1366x768-60.0"   85.86  1366 1440 1584 1800  768 769 772 795 -hsync +vsync

    # Default mode "1360x768": 85.5 MHz, 49.0 kHz, 60.7 Hz
    Modeline "1360x768-60.7"   85.50  1360 1392 1712 1744  768 783 791 807 +hsync +vsync
    Modeline "1024x600" 48.96 1024 1064 1168 1312 600 601 604 622 -HSync +Vsync
    # Default mode "1280x1024": 108.0 MHz, 64.0 kHz, 60.0 Hz
    Modeline "1280x1024-60.0"  108.00  1280 1328 1440 1688  1024 1025 1028 1066 +hsync +vsync
    # Default mode "1280x960": 108.0 MHz, 60.0 kHz, 60.0 Hz
    Modeline "1280x960-60.0"  108.00  1280 1376 1488 1800  960 961 964 1000 +hsync +vsync
    # Default mode "1280x800": 83.5 MHz, 49.7 kHz, 60.0 Hz
    Modeline "1280x800-60.0"   83.46  1280 1344 1480 1680  800 801 804 828
    # Default mode "1280x768": 80.1 MHz, 47.7 kHz, 60.0 Hz
    Modeline "1280x768-60.0"   80.14  1280 1344 1480 1680  768 769 772 795

    ## One version of 720p (image 16:9, pixel 1:1)
    # Default mode "1280x720": 74.6 MHz, 44.2 kHz, 59.2 Hz
    Modeline "1280x720-59.2"   74.60  1280 1341 1474 1688  720 721 724 746 -hsync +vsync

    # Default mode "1280x600": 61.5 MHz, 37.3 kHz, 60.0 Hz
    Modeline "1280x600-60.0"   61.50  1280 1336 1464 1648  600 601 604 622 -hsync +vsync
    # Default mode "1200x720": 70.2 MHz, 44.8 kHz, 60.0 Hz
    Modeline "1200x720-60.0"   70.18  1200 1256 1384 1568  720 721 724 746 -hsync +vsync
    # Default mode "1152x720": 67.3 MHz, 44.8 kHz, 60.0 Hz
    Modeline "1152x720-60.0"   67.32  1152 1208 1328 1504  720 721 724 746 -hsync +vsync
    # Default mode "1088x612": 53.0 MHz, 38.0 kHz, 60.0 Hz
    Modeline "1088x612-60.0"   52.95  1088 1128 1240 1392  612 613 616 634 -hsync +vsync
    # Default mode "1024x768": 65.0 MHz, 48.4 kHz, 60.0 Hz
    Modeline "1024x768-60.0"   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync
    # Default mode "1024x600": 49.0 MHz, 37.3 kHz, 60.0 Hz
    Modeline "1024x600-60.0"   48.96  1024 1064 1168 1312  600 601 604 622 -hsync +vsync
    # Default mode "1024x512": 41.3 MHz, 31.9 kHz, 60.0 Hz
    Modeline "1024x512-60.0"   41.30  1024 1056 1160 1296  512 513 516 531 -hsync +vsync
    # Default mode "1000x600": 48.1 MHz, 37.3 kHz, 60.0 Hz
    Modeline "1000x600-60.0"   48.07  1000 1040 1144 1288  600 601 604 622 -hsync +vsync
    # Default mode "960x600": 46.0 MHz, 37.3 kHz, 60.0 Hz
    Modeline "960x600-60.0"   45.98  960 1000 1096 1232  600 601 604 622 -hsync +vsync
    # Default mode "856x480": 31.7 MHz, 29.8 kHz, 59.9 Hz
    Modeline "856x480-59.9"   31.70  856 872 960 1064  480 481 484 497 -hsync +vsync
    # Default mode "848x480": 31.5 MHz, 29.8 kHz, 60.0 Hz
    Modeline "848x480-60.0"   31.50  848 864 952 1056  480 481 484 497 -hsync +vsync
    # Extra mode
    ModeLine "800x480-x" 29.58 800 816 896 992 480 481 484 497
    # Default mode "800x600": 40.0 MHz, 37.9 kHz, 60.3 Hz
    Modeline "800x600-60.3"   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync
    # Default mode "800x600": 36.0 MHz, 35.2 kHz, 56.2 Hz
    Modeline "800x600-56.2"   36.00  800 824 896 1024  600 601 603 625 +hsync +vsync
    # Default mode "800x480": 40.0 MHz, 37.9 kHz, 60.3 Hz
    Modeline "800x480-60.3"   40.00  800 832 960 1056  480 541 545 628 -hsync +vsync
    # Default mode "720x576": 32.7 MHz, 35.9 kHz, 60.1 Hz
    Modeline "720x576-60.1"   32.70  720 744 816 912  576 577 580 597 -hsync +vsync

    ## NTSC-M  (actually 710.9x486 active area)
    # Default mode "720x480": 26.7 MHz, 29.8 kHz, 60.0 Hz
    Modeline "720x480-60.0"   26.70  720 736 808 896  480 481 484 497 -hsync +vsync

    # Default mode "640x480": 25.2 MHz, 31.5 kHz, 59.9 Hz
    Modeline "640x480-59.9"   25.18  640 656 752 800  480 490 492 525 -hsync -vsync
    # Default mode "480x640": 24.8 MHz, 39.8 kHz, 60.0 Hz
    Modeline "480x640-60.0"   24.82  480 504 552 624  640 641 644 663 -hsync +vsync

    ## Refresh rate 65Hz

    # Default mode "1600x1200": 175.5 MHz, 81.2 kHz, 65.0 Hz
    Modeline "1600x1200-65.0"  175.50  1600 1664 1856 2160  1200 1201 1204 1250 +hsync +vsync

    ## Refresh rate 70Hz

    # Default mode "1600x1200": 189.0 MHz, 87.5 kHz, 70.0 Hz
    Modeline "1600x1200-70.0"  189.00  1600 1664 1856 2160  1200 1201 1204 1250 +hsync +vsync
    # Default mode "1400x1050": 151.0 MHz, 77.0 kHz, 70.0 Hz
    Modeline "1400x1050-70.0"  151.00  1400 1464 1656 1960  1050 1051 1054 1100 +hsync +vsync
    # Default mode "1024x768": 75.0 MHz, 56.5 kHz, 70.1 Hz
    Modeline "1024x768-70.1"   75.00  1024 1048 1184 1328  768 771 777 806 -hsync -vsync

    ## Refresh rate 72Hz

    # Default mode "1920x1200": 230.0 MHz, 91.0 kHz, 72.8 Hz
    Modeline "1920x1200-72.8"  230.00  1920 1936 2096 2528  1200 1201 1204 1250 -hsync -vsync
    # Default mode "800x600": 50.0 MHz, 48.1 kHz, 72.2 Hz
    Modeline "800x600-72.2"   50.00  800 856 976 1040  600 637 643 666 +hsync +vsync
    # Default mode "640x480": 31.5 MHz, 37.9 kHz, 72.8 Hz
    Modeline "640x480-72.8"   31.50  640 664 704 832  480 489 492 520 -hsync -vsync

    ## Refresh Rate 75Hz

    # Default mode "1792x1344": 261.0 MHz, 106.3 kHz, 75.0 Hz
    Modeline "1792x1344-75.0"  261.00  1792 1888 2104 2456  1344 1345 1348 1417 -hsync +vsync
    # Default mode "1600x1200": 202.5 MHz, 93.8 kHz, 75.0 Hz
    Modeline "1600x1200-75.0"  202.50  1600 1664 1856 2160  1200 1201 1204 1250 +hsync +vsync
    # Extra mode "1440x1050"
    ModeLine "1440x1050-x" 160.0 1440 1536 1696 1952 1050 1051 1054 1096
    # Default mode "1400x1050": 155.8 MHz, 81.5 kHz, 74.8 Hz
    Modeline "1400x1050-74.8"  155.80  1400 1464 1784 1912  1050 1052 1064 1090 +hsync +vsync
    # Default mode "1280x1024": 135.0 MHz, 80.0 kHz, 75.0 Hz
    Modeline "1280x1024-75.0"  135.00  1280 1296 1440 1688  1024 1025 1028 1066 +hsync +vsync
    # Extra mode "1280x768"
    ModeLine "1280x768-x" 103.0 1280 1360 1496 1712 768 769 772 802
    # Default mode "1152x864": 108.0 MHz, 67.5 kHz, 75.0 Hz
    Modeline "1152x864-75.0"  108.00  1152 1216 1344 1600  864 865 868 900 +hsync +vsync
    # Default mode "1024x768": 78.8 MHz, 60.0 kHz, 75.0 Hz
    Modeline "1024x768-75.0"   78.75  1024 1040 1136 1312  768 769 772 800 +hsync +vsync
    # Extra mode "1024x512"
    ModeLine "1024x512-x" 53.3 1024 1072 1176 1328 512 513 516 535
    # Default mode "800x600": 49.5 MHz, 46.9 kHz, 75.0 Hz
    Modeline "800x600-75.0"   49.50  800 816 896 1056  600 601 604 625 +hsync +vsync
    # Extra mode "856x480"
    ModeLine "856x480-x" 41.3 856 888 976 1096 480 481 484 502
    # Extra mode "848x480"
    ModeLine "848x480-x" 41.0 848 880 968 1088 480 481 484 502
    # Extra mode "720x576"
    ModeLine "720x576-x" 42.6 720 760 832 944 576 577 580 602
    # Extra mode "720x480"
    ModeLine "720x480-x" 34.9 720 752 824 928 480 481 484 502
    # Default mode "640x480": 31.5 MHz, 37.5 kHz, 75.0 Hz
    Modeline "640x480-75.0"   31.50  640 656 720 840  480 481 484 500 -hsync -vsync

    ## Refresh rate 85Hz

    # Default mode "1600x1200": 229.5 MHz, 106.2 kHz, 85.0 Hz
    Modeline "1600x1200-85.0"  229.50  1600 1664 1856 2160  1200 1201 1204 1250 +hsync +vsync
    # Default mode "1400x1050": 184.0 MHz, 93.9 kHz, 85.3 Hz
    Modeline "1400x1050-85.3"  184.00  1400 1464 1656 1960  1050 1051 1054 1100 +hsync +vsync
    # Extra mode "1440x1050"
    ModeLine "1440x1050-x" 184.5 1440 1544 1704 1968 1050 1051 1054 1103
    # Default mode "1280x1024": 157.5 MHz, 91.1 kHz, 85.0 Hz
    Modeline "1280x1024-85.0"  157.50  1280 1344 1504 1728  1024 1025 1028 1072 +hsync +vsync
    # Default mode "1280x960": 148.5 MHz, 85.9 kHz, 85.0 Hz
    Modeline "1280x960-85.0"  148.50  1280 1344 1504 1728  960 961 964 1011 +hsync +vsync
    # Extra mode "1280x768"
    ModeLine "1280x768-x" 118.5 1280 1368 1504 1728 768 769 772 807
    # Default mode "1152x864": 121.5 MHz, 77.5 kHz, 85.1 Hz
    Modeline "1152x864-85.1"  121.50  1152 1216 1344 1568  864 865 868 911 +hsync -vsync
    # Default mode "1024x768": 94.5 MHz, 68.7 kHz, 85.0 Hz
    Modeline "1024x768-85.0"   94.50  1024 1072 1168 1376  768 769 772 808 +hsync +vsync
    # Extra mode "848x480"
    ModeLine "848x480-x" 47.4 848 888 976 1104 480 481 484 505
    # Default mode "800x600": 56.3 MHz, 53.7 kHz, 85.1 Hz
    Modeline "800x600-85.1"   56.30  800 832 896 1048  600 601 604 631 +hsync +vsync
    # Default mode "640x480": 36.0 MHz, 43.3 kHz, 85.0 Hz
    Modeline "640x480-85.0"   36.00  640 696 752 832  480 481 484 509 -hsync -vsync
EndSection

然後另存成檔名為 xorg.conf.luvit 的檔案以後,讓它覆蓋系統的 xorg.conf
sudo cp ./xorg.conf.luvit /etc/X11/xorg.conf
以上 10 步都完成以後,重新啟動 HP mini 2133 以後,就有 3D 特效,也能做 VGA 輸出啦!

接下來,如果你也遇到了音效卡消失的問題,請接著做…

1. 把 iQuick 小組的 ppa 目錄加入更新伺服器列表裡…
(據說 iQuick 小組的這組 ppa 「不保證」永遠有效啊!要玩要快!)
sudo add-apt-repository ppa:team-iquik/alsa
2. 然後更新,並安裝更新…
sudo apt-get update && sudo apt-get upgrade
完成!

HP mini 2133 已經是五年前的機器了,但只要保養得好,再加上適當的 Linux 發行版,跑起來還是很威的啊!雖然說…在中文世界裡用 HP mini 2133 又安裝 Ubuntu Linux,還強求一定要有 3D 特效和 VGA 輸出的,大概剩下我一個了吧…