特殊:Badtitle/NS100:BuildYourOwnNvidiaGlx
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/BuildYourOwnNvidiaGlx }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/af | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|Afrikaans| [[::BuildYourOwnNvidiaGlx/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/ar | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|العربية| [[::BuildYourOwnNvidiaGlx/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/az | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|azərbaycanca| [[::BuildYourOwnNvidiaGlx/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/bcc | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|جهلسری بلوچی| [[::BuildYourOwnNvidiaGlx/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/bg | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|български| [[::BuildYourOwnNvidiaGlx/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/br | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|brezhoneg| [[::BuildYourOwnNvidiaGlx/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/ca | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|català| [[::BuildYourOwnNvidiaGlx/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/cs | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|čeština| [[::BuildYourOwnNvidiaGlx/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/de | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|Deutsch| [[::BuildYourOwnNvidiaGlx/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/el | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|Ελληνικά| [[::BuildYourOwnNvidiaGlx/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/es | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|español| [[::BuildYourOwnNvidiaGlx/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/fa | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|فارسی| [[::BuildYourOwnNvidiaGlx/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/fi | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|suomi| [[::BuildYourOwnNvidiaGlx/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/fr | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|français| [[::BuildYourOwnNvidiaGlx/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/gu | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|ગુજરાતી| [[::BuildYourOwnNvidiaGlx/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/he | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|עברית| [[::BuildYourOwnNvidiaGlx/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/hu | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|magyar| [[::BuildYourOwnNvidiaGlx/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/id | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|Bahasa Indonesia| [[::BuildYourOwnNvidiaGlx/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/it | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|italiano| [[::BuildYourOwnNvidiaGlx/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/ja | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|日本語| [[::BuildYourOwnNvidiaGlx/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/ko | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|한국어| [[::BuildYourOwnNvidiaGlx/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/ksh | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|Ripoarisch| [[::BuildYourOwnNvidiaGlx/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/mr | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|मराठी| [[::BuildYourOwnNvidiaGlx/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/ms | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|Bahasa Melayu| [[::BuildYourOwnNvidiaGlx/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/nl | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|Nederlands| [[::BuildYourOwnNvidiaGlx/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/no | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|norsk| [[::BuildYourOwnNvidiaGlx/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/oc | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|occitan| [[::BuildYourOwnNvidiaGlx/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/pl | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|polski| [[::BuildYourOwnNvidiaGlx/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/pt | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|português| [[::BuildYourOwnNvidiaGlx/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/ro | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|română| [[::BuildYourOwnNvidiaGlx/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/ru | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|русский| [[::BuildYourOwnNvidiaGlx/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/si | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|සිංහල| [[::BuildYourOwnNvidiaGlx/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/sq | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|shqip| [[::BuildYourOwnNvidiaGlx/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/sr | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|српски / srpski| [[::BuildYourOwnNvidiaGlx/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/sv | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|svenska| [[::BuildYourOwnNvidiaGlx/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/th | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|ไทย| [[::BuildYourOwnNvidiaGlx/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/tr | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|Türkçe| [[::BuildYourOwnNvidiaGlx/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/vi | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|Tiếng Việt| [[::BuildYourOwnNvidiaGlx/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/yue | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|粵語| [[::BuildYourOwnNvidiaGlx/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/zh | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|中文| [[::BuildYourOwnNvidiaGlx/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/zh-hans | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|中文(简体)| [[::BuildYourOwnNvidiaGlx/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx | UbuntuHelp:BuildYourOwnNvidiaGlx | {{#if: | :}}BuildYourOwnNvidiaGlx}}/zh-hant | • {{#if: UbuntuHelp:BuildYourOwnNvidiaGlx|中文(繁體)| [[::BuildYourOwnNvidiaGlx/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:BuildYourOwnNvidiaGlx|:BuildYourOwnNvidiaGlx|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :BuildYourOwnNvidiaGlx/zh | | {{#ifexist: BuildYourOwnNvidiaGlx/zh | | {{#ifeq: {{#titleparts:BuildYourOwnNvidiaGlx|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:BuildYourOwnNvidiaGlx|1|-1|}} | zh | | }}
Introduction
Note: The 9755 driver was included with Ubuntu 7.04 and is called nvidia-glx-new. Later versions of Ubuntu may come with more recent drivers. Please see BinaryDriverHowto/Nvidia for further details. This page details how to make your own nvidia-glx with the latest NVIDIA drivers integrated to the linux-restricted-modules package. Why do you want this you could ask? Well, people who have an NVIDIA 8800-series card need the latest driver (97.42) to get working 3D-acceleration. The card is not supported by the driver included in linux-restricted-modules (l-r-m) at the moment. The more popular reason would be that the 9x.xx drivers support the TFP (texture from pixmap) extension, which allows you to run Compiz/Beryl without XGL.
Setting up repositories
Add this source entry into your /etc/apt/sources.list:
deb-src http://archive.ubuntu.com/ubuntu edgy-security main restricted universe multiverse
The l-r-m was updated because of a security vulnerability found in the NVIDIA 8774 driver, this is why the source is located on the edgy-security repository.
Getting the source
Then change to a directory where you want do to the compiling and get the source by issuing this command:
apt-get source nvidia-glx
Now let's satisfy the build dependencies (If you're building with pbuilder you can skip this step):
sudo apt-get build-dep nvidia-glx
Download the driver packages
You need both of these packages for the linux-restricted-modules: NVIDIA-Linux-x86-1.0-9742-pkg1.run NVIDIA-Linux-x86_64-1.0-9742-pkg2.run
Replacing files in the archive
Open linux-restricted-modules-2.6.17_2.6.17.6.orig.tar.gz in e.g. file-roller. Go to /linux-restricted-modules-2.6.17-2.6.17.6.orig/nvidia/ (in fileroller) and delete the old (8776) driver, which you want to replace, still leaving the nvidia legacy drivers intact. After this, add the files you downloaded [ NVIDIA-Linux-x86-1.0-9742-pkg1.run NVIDIA-Linux-x86_64-1.0-9742-pkg2.run ] to the archive.
Editing the .diff file
Extract linux-restricted-modules-2.6.17_2.6.17.6-1.diff.gz and open the .diff file in your favorite text editor. 1. Find and replace all instances of 8776 with 9742 (The 8776 in the changelog section you can leave unchanged.) 2. Find and replace:
$(nv_dirname)/usr/X11R6/lib/modules/drivers/nvidia_drv.o
with
$(nv_dirname)/usr/X11R6/lib/modules/drivers/nvidia_drv.so
3. Find:
+linux-restricted-modules-2.6.17 (2.6.17.6-1) edgy-security; urgency=low
Add this section above that line (to bump the version number and update the changelog):
+linux-restricted-modules-2.6.17 (2.6.17.6-2) edgy-security; urgency=low + + * Updated the NVIDIA driver to version 9742. + + -- Christoffer Karvonen <[email protected]> Mon, 20 Nov 2006 02:46:43 +0200 +
4. As we have added six (6) lines to the file, the above line must be altered from:
@@ -0,0 +1,1319 @@
to
@@ -0,0 +1,1325 @@
You can of course replace my name and email with your own. Save the file. Then rename the file to linux-restricted-modules-2.6.17_2.6.17.6-2.diff and gzip it.
Making some final changes (the .dsc file)
Edit linux-restricted-modules-2.6.17_2.6.17.6-1.dsc, again, open it with your favorite text editor. 1. Find and replace:
Version: 2.6.17.6-1.1
with
Version: 2.6.17.6-1.2
2. Replace:
linux-restricted-modules-2.6.17_2.6.17.6-1.1.diff.gz
with
linux-restricted-modules-2.6.17_2.6.17.6-1.2.diff.gz
Remove the old GnuPG signature header:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
and footer:
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQFFP6N5H/9LqRcGPm0RAh+nAJ0Qb7TzsP0s2REbLfFE7E5kA72cSACgmJas tU/3xuWQZKqSaPzNYhNeccU= =JWsr -----END PGP SIGNATURE-----
Now we need to replace the MD5SUM's and sizes in the .dsc with new one's. Commands to do this are:
md5sum <filename> ls -l <filename>
Be sure you get the MD5SUM's (and sizes) of the correct files; linux-restricted-modules-2.6.17_2.6.17.6.orig.tar.gz and linux-restricted-modules-2.6.17_2.6.17.6-2.diff.gz Rename the .dsc file
mv linux-restricted-modules-2.6.17_2.6.17.6-1.dsc linux-restricted-modules-2.6.17_2.6.17.6-2.dsc
Sign it the package with debsign:
debsign -kYOURKEY linux-restricted-modules-2.6.17_2.6.17.6-1.dsc
If you don't have a GnuPG key, you can generate one with:
gpg --gen-key
Building it
To build with pbuilder:
sudo pbuilder build linux-restricted-modules-2.6.17_2.6.17.6-2.dsc
To build without it:
Extract the source with
dpkg-source -x <filename>.dsc
Change to the directory it was extracted to and run
dpkg-buildpackage -rfakeroot
It takes a while to compile, but hopefully finishes. You can install the packages with dpkg as usual.
Related pages
UbuntuHelp:BinaryDriverHowto/Nvidia NvidiaTroubleshooting PbuilderHowto
Discussions
Personally, I find this method is very hacky. Wouldn't be simpler to extract the package and do the changes directly inside its directory, instead of modifying a diff file? What happens if a new version of linux-restricted-modules is released? - AlexandreVassalotti