Wysłano dnia 12-04-2003 o godz. 14:15:23 przez LiNiO
W artykule zostanie opisana instalacja akcelerowanych sterowników do kart NVIDIA oraz wykorzystanie wyjścia TV.
Zakładam, że kernelem jest 2.4.18-bf2.4
apt-get install nvidia-kernel-src nvidia-glx-src kernel-headers-2.4.18-bf2.4 xlibmesa3-glu kernel-package
Jeśli chcemy skompilować własny kernel:
apt-get install kernel-source-2.4.20 kernel-package libncurses-dev make-kpkg --config menuconfig make-kpkg dpkg -i ../kernel-image-2.4.20_10.00.Custom_i386.deb kernel_image kernel_headers dpkg -i ../kernel-headers-2.4.20_10.00.Custom_i386.deb
Po restarcie system będzie wykorzystywał nowe jądro. Jeśli wcześniejszą wersją jądra była wersja z instalacji - należy pamiętać o uruchomieniu modconf' i skonfigurowaniu np. karty sieciowej.
cd /usr/src
tar -zxf nvidia-kernel-src.tar.gz
export KVERS=$(uname -r)
export KSRC=/usr/src/kernel-headers-$KVERS
cd modules/nvidia-kernel-1.0.4349
debian/rules binary_modules
dpkg -i ../../nvidia-kernel-${KVERS}_1.0.4349-1+_i386.deb
cd /usr/src/nvidia-glx-1.0.4349/
dpkg-buildpackage -us -uc
dpkg -i ../nvidia-glx_1.0.4349*.deb
adduser linio video
Kopia pliku konfiguracyjnego:
cp /etc/X11/XF86Config-4 /etc/X11/XF86Config-4_$(date +%Y_%m_%d)
Wykonanie zmian w pliku konfiguracyjnym:
sed -e 's/nv/nvidia/' -e 's/(Load.*dri)/#1/' -e \ 's/(Load.*GLcore)/#1" Load "glx/' /etc/X11/XF86Config-4_$(date +%Y_%m_%d) \ >/etc/X11/XF86Config-4
Teoretycznie tyle.
W przypadku problemów można spróbować wygenerować nowy plik konfiguracyjny:
XFree86 -configure
Pojawi się coś takiego:
obelix:~# XFree86 -configure
This is a pre-release version of XFree86, and is not supported in any
way. Bugs may be reported to XFree86@XFree86.Org and patches submitted
to fixes@XFree86.Org. Before reporting bugs in pre-release versions,
please check the latest version in the XFree86 CVS repository
(http://www.XFree86.Org/cvs)
XFree86 Version 4.2.1.1 (Debian 4.2.1-6 20030225230350 branden@progeny.com) / X Window System
(protocol Version 11, revision 0, vendor release 6600)
Release Date: 18 October 2002
If the server is older than 6-12 months, or if your card is
newer than the above date, look for a newer version before
reporting problems. (See http://www.XFree86.Org/)
Build Operating System: Linux 2.4.20-586tsc i686 [ELF]
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/XFree86.0.log", Time: Sat Apr 12 14:07:17 2003
List of video drivers:
atimisc
r128
radeon
nvidia
mga
glint
nv
tga
s3
s3virge
sis
rendition
neomagic
i740
tdfx
savage
cirrus
vmware
tseng
trident
chips
apm
glide
fbdev
i128
ati
i810
imstt
newport
ark
cyrix
siliconmotion
vesa
vga
v4l
(EE) Glide driver:
Could not load the shared library file for Glide: "libglide2x.so"!
You need to have Glide installed to run the glide driver for XFree86.
Also, you need to tell XFree86 where the libglide2x.so file is placed
by making a soft link in the /usr/X11R6/lib/modules directory that points
to the libglide2x.so file. For example (if your libglide2x.so file is in
/usr/lib):
# ln -s /usr/lib/libglide2x.so /usr/X11R6/lib/modules
(EE) Failed to load module "glide" (a required submodule could not be loaded, 2)
(++) Using config file: "/root/XF86Config.new"
XFree86 is not able to detect your mouse.
Edit the file and correct the Device.
Your XF86Config file is /root/XF86Config.new
To test the server, run 'XFree86 -xf86config /root/XF86Config.new'
obelix:~#
Możemy teraz przetestować konfigurację:
XFree86 -xf86config /root/XF86Config.new
Po chwili powinien się pojawić ekran ze znajdującym się na środku w postaci 'X' wskaźnikiem myszy. Aby zakończyć pracę X-serwera można wykorzystać kombinację klawiszy CTRL-ALT+Backspace.
Aby sprawdzić czy X-serwer sygnalizował błędy można wydać polecenie:
grep '^(EE)' /var/log/XFree86.0.log
U mnie została zwrócona linia:
(EE) Mouse0: cannot determine the mouse protocol
Przystępujemy więc do edycji pliku /root/XF86Config.new
Odnajdujemy sekcję:
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/mouse"
EndSection
Sekcję tą zmieniłem u siebie na:
Section "InputDevice"
Identifier "Mysz_Logitech"
Driver "mouse"
Option "Protocol" "ImPS/2"
Option "Device" "/dev/psaux"
Option "ZAXismapping" "4 5"
EndSection
oraz w sekcji
Section "ServerLayout"
Identifier "XFree86 Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
zamieniłem
InputDevice "Mouse0" "CorePointer"
na
InputDevice "Mysz_Logitech" "CorePointer"
W sekcji Module należy zakomentować:
#Load "dri"
W sekcji Screen ustawiamy domyślną głębię kolorów:
DefaultDepth 16
oraz zmieniamy:
SubSection "Display"
Depth 16
EndSubSection
na:
SubSection "Display"
Depth 16
Modes "1024x768" "800x600" "640x480"
EndSubSection
Po ponownym wydaniu polecenia:
XFree86 -xf86config /root/XF86Config.new
mysz "ożyła".
grep '^(EE)' /var/log/XFree86.0.log
nie zwróciło żadnej linii - więc teoretycznie jest ok.
W przypadku gdy dalej występują problemy - możemy włączyć tryb diagnostyczny poprzez
XFree86 -xf86config /root/XF86Config.new -verbose 5 -logverbose 5
Teraz poprawiamy sekcję klawiatury:
Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
EndSection
zmieniamy na:
Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "XkbModel" "pc105"
Option "XkbLayout" "pl"
EndSection
Aby wykorzystać możliwości monitora należy wyedytować sekcję:
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection
i zmienić na np.:
Section "Monitor"
Identifier "Monitor"
VendorName "Samsung"
ModelName "SyncMaster 753DFX"
HorizSync 30-71
VertRefresh 50-120
Option "DPMS"
EndSection
Trzeba również ustawić w sekcji "Screen" odpowiedni Monitor: "Monitor" a nie "Monitor0"
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor"
SubSection "Display"
Depth 1
EndSubSection
SubSection "Display"
Depth 4
EndSubSection
SubSection "Display"
Depth 8
EndSubSection
SubSection "Display"
Depth 15
EndSubSection
SubSection "Display"
Depth 16
EndSubSection
SubSection "Display"
Depth 24
EndSubSection
EndSection
Teraz ustawimy domyślną głębię kolorów i rozdzielczość - sekcja Screen
Section "Screen"
Identifier "Monitor"
Device "Card0"
Monitor "Monitor"
DefaultDepth 16
SubSection "Display"
Depth 1
EndSubSection
SubSection "Display"
Depth 4
EndSubSection
SubSection "Display"
Depth 8
EndSubSection
SubSection "Display"
Depth 15
EndSubSection
SubSection "Display"
Depth 16
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1024x768" "800x600" "640x480"
EndSubSection
EndSection
Gotowy plik:
Section "ServerLayout"
Identifier "XFree86 Configured"
Screen 0 "Monitor" 0 0
InputDevice "Mysz_Logitech" "CorePointer"
InputDevice "Klawiatura" "CoreKeyboard"
EndSection
Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
ModulePath "/usr/X11R6/lib/modules"
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
FontPath "/usr/X11R6/lib/X11/fonts/CID/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
EndSection
Section "Module"
Load "glx"
Load "record"
Load "extmod"
Load "dbe"
#Load "dri"
Load "xtrap"
Load "type1"
Load "speedo"
EndSection
Section "InputDevice"
Identifier "Klawiatura"
Driver "keyboard"
Option "XkbModel" "pc105"
Option "XkbLayout" "pl"
EndSection
Section "InputDevice"
Identifier "Mysz_Logitech"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/mouse"
Option "ZAXismapping" "4 5"
EndSection
Section "Monitor"
Identifier "Monitor"
VendorName "Samsung"
ModelName "SyncMaster 753DFX"
HorizSync 30-71
VertRefresh 50-120
Option "DPMS"
EndSection
Section "Device"
### Available Driver options are:-
### Values: : integer, : float, : "True"/"False",
### : "String", : " Hz/kHz/MHz"
### [arg]: arg optional
#Option "DigitalVibrance" #
#Option "PageFlip" # []
#Option "Dac8Bit" # []
#Option "NoLogo" # []
#Option "Overlay" # []
#Option "UBB" # []
#Option "Stereo" #
#Option "WindowFlip" # []
#Option "SWcursor" # []
#Option "HWcursor" # []
#Option "VideoKey" #
#Option "NvAGP" #
#Option "IgnoreEDID" # []
#Option "NoDDC" # []
#Option "ConnectedMonitor" #
#Option "ConnectedMonitors" #
#Option "TVStandard" #
#Option "TVOutFormat" #
#Option "RenderAccel" # []
#Option "CursorShadow" # []
#Option "CursorShadowAlpha" #
#Option "CursorShadowXOffset" #
#Option "CursorShadowYOffset" #
#Option "UseEdidFreqs" # []
#Option "FlatPanelProperties" #
#Option "TwinView" # []
#Option "TwinViewOrientation" #
#Option "SecondMonitorHorizSync" #
#Option "SecondMonitorVertRefresh" #
#Option "MetaModes" #
#Option "UseInt10Module" # []
#Option "SwapReady" # []
#Option "NoTwinViewXineramaInfo" # []
#Option "NoRenderExtension" # []
#Option "UseClipIDs" # []
#Option "CIOverlay" # []
#Option "TransparentIndex" #
#Option "OverlayDefaultVisual" # []
#Option "NvEmulate" #
#Option "NoBandWidthTest" # []
#Option "CustomEDID-CRT-0" #
#Option "CustomEDID-CRT-1" #
#Option "CustomEDID-DFP-0" #
#Option "CustomEDID-DFP-1" #
#Option "CustomEDID-TV-0" #
#Option "CustomEDID-TV-1" #
#Option "TVOverScan" #
#Option "IgnoreDisplayDevices" #
Identifier "GeForce"
Driver "nvidia"
VendorName "NVidia"
BoardName "GeForce4 MX 440"
BusID "PCI:1:0:0"
EndSection
Section "Screen"
Identifier "Monitor"
Device "GeForce"
Monitor "Monitor"
DefaultDepth 16
SubSection "Display"
Depth 1
EndSubSection
SubSection "Display"
Depth 4
EndSubSection
SubSection "Display"
Depth 8
EndSubSection
SubSection "Display"
Depth 15
EndSubSection
SubSection "Display"
Depth 16
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1024x768" "800x600" "640x480"
EndSubSection
EndSection
Test:
XFree86 -xf86config /root/XF86Config.new
Jeśli jest ok - zabijamy X-y (Ctrl-Alt+BackSpace) i kopiujemy plik konfiguracyjny:
cp /root/XF86Config.new /etc/X11/XF86Config-4
Teraz spróbujemy uruchomić wyjście TV.
Sekcja "Device" powinna wyglądać następująco:
Section "Device"
Option "ConnectedMonitor" "CRT,TV"
Option "TVStandard" "PAL-B"
Option "RenderAccel" "True"
Option "TwinView" "True"
Option "TwinViewOrientation" "Clone"
Option "SecondMonitorHorizSync" "30-50"
Option "SecondMonitorVertRefresh" "60"
Option "MetaModes" "1024x768,1024x768;800x600,800x600;640x480,640x480;512x384,512x384;400x300,400x300;320x240,320x240"
Identifier "GeForce"
Driver "nvidia"
VendorName "NVidia"
BoardName "GeForce4 MX 440"
BusID "PCI:1:0:0"
EndSection
w sekcji "Screen":
Section "Screen"
Identifier "Monitor"
Device "GeForce"
Monitor "Monitor"
DefaultDepth 16
SubSection "Display"
Depth 1
EndSubSection
SubSection "Display"
Depth 4
EndSubSection
SubSection "Display"
Depth 8
EndSubSection
SubSection "Display"
Depth 15
EndSubSection
SubSection "Display"
Depth 16
Modes "1024x768" "800x600" "640x480" "512x384" "400x300" "320x240"
EndSubSection
SubSection "Display"
Depth 24
EndSubSection
EndSection
Po restarcie gdm powinien pojawić się obraz zarówno na monitorze jak i na telewizorze.
Autor: LiNiO.
Wersja 1.00 2003.04.12
Wersja 1.10 2003.04.19
|
![]() |
|