- Die Fragen, die von Linux-Anfängern häufig gestellt werden, sind wahrscheinlich:
- Habe ich überhaupt eine Nvidia-GPU?
- Die Treiber sollten alle nach dem Einbinden von NON-FREE zugänglisch sein. Es besteht im normalfall kein Grund etwas von den Nvidia-Homepage herunter zu laden.
- Den Treiber installieren
- Wayland Probleme Lösen
- Deinstallation
Die Fragen, die von Linux-Anfängern häufig gestellt werden, sind wahrscheinlich:
- Welche Distribution ist für mich die richtige?
- Wie installiere ich einen Nvidia-Treiber? Und…
- Warum hat das bei dem Kerl auf YouTube funktioniert, aber bei mir nicht?
Frage Nr. 2 widmen wir uns heute, und zwar auf die einfachste und effektivste Art und Weise. Wenn man googelt, wird man mit drei Seiten langen Bash-Tutorials erschlagen, und das ist wirklich unmöglich. Nutz man Ubuntu und Derivate ist man aus dem Schneider... Debian ist da schon etwas komplizierter. Wer LMDE nutzt und nicht viel lesen will kann hier gucken:
Gaming Essentials [Teil 1] Steam
Ein normaler Mensch braucht einen PC für zwei Dinge: Textverarbeitung und Spielen! Naja, vielleicht auch drei Dinge, aber das wäre hier dann doch zu anstößig.
Im Jahr 2003 habe ich mit Linux angefangen, und ich besaß damals genau ein einziges Spiel, das auf Linux lief. Darüber kann ich leider nicht mehr erzählen, da es auf dem Index gelandet ist, weil irgend so eine Mutter damals die BPjM anrufen musste... naja. Das erste Spiel der Reihe "Unreal"…
Habe ich überhaupt eine Nvidia-GPU?
lspci | grep VGA
Das Ergebnis sollte ungefähr so aussehen
❯ lspci -nnk | grep -iA2 vga
26:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM206 [GeForce GTX 960] [10de:1401] (rev a1)
Subsystem: NVIDIA Corporation GM206 [GeForce GTX 960] [10de:1401]
Kernel driver in use: nvidia
Ist der Output Kernel driver in use: nouveau, so ist noch kein Nvidia Treiber installiert. Naja irgendwie doch schon. Nouveau ist ein reverse engineerter Treiber für Nvidia-GPUs. Durch die Teil-Öffnung des Nvidia-Source-Codes fließen hier jetzt immer mehr Verbesserungen ein. Zum zocken ist nouveau aber nicht geeignet.
Die Treiber sollten alle nach dem Einbinden von NON-FREE zugänglisch sein. Es besteht im normalfall kein Grund etwas von den Nvidia-Homepage herunter zu laden.
Entweder: Nach der Offiziellen Dokumentation
https://wiki.debian.org/NvidiaGraphics…_.22Bookworm.22 | Setzt voraus, dass Ihr wisst wie man mit sudo nano eine Datei bearbeitet.Wenn nicht zu "ODER:" springen
Debian 12 "Bookworm" Version 525.105.17 For support of GeForce 600 series and newer GPUs (supported devices). For older devices, you must use nouveau, which should be already installed and in use. Add "contrib", "non-free" and "non-free-firmware" components to /etc/apt/sources.list, for example: Code
Update the list of available packages, then we can install the nvidia-driver package, plus the necessary firmware: DKMS will build the nvidia module for your system, via the nvidia-kernel-dkms package. Note about Secureboot : if you have SecureBoot enabled, you need to sign the resulting modules. Detailed instructions are available here. Restart your system to load the new driver. |
Oder: Teilweise mit GUI
Sowohl Debian als auch Ubuntu nutzen standardmäßig Gnome hier ist sollte software-properties-gtk schon installiert sind. Solltet Ihr eine Desktop-Umgebung installiert haben die ein Fork von Gnome ist (Cinnamon, Mate, Pantheon...) könnt ihr erstmal mit sudo software-properties-gtk testen ob sich das Programm öffnet wenn nicht: sudo apt install software-properties-gtk. Nenutzt Ihr KDE,TDE oder LXQt könnt ihr genauso vorgehen aber mit software-properties-qt.
Das geöffnete Programm sollte so aussehen:
Setzt wie abgebildet die drei Haken und drück auf Schließen. Dadurch wird automatisch der Apt-Cache neu eingelesen.
Den Treiber installieren
Im Terminal geben wir dann sudo apt update && sudo apt install nvidia-detect ein. Da unser Terminal jetzt ziemlich voll geschrieben ist nutzen wir clear und das Terminal zu leeren. Jetzt können wir nvidia-detect starten.
❯ nvidia-detect
Detected NVIDIA GPUs:
26:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM206 [GeForce GTX 960] [10de:1401] (rev a1)
Checking card: NVIDIA Corporation GM206 [GeForce GTX 960] (rev a1)
Your card is supported by all driver versions.
Your card is also supported by the Tesla drivers series.
Your card is also supported by the Tesla 470 drivers series.
It is recommended to install the
nvidia-driver
package.
Wichtig sind die letzten drei Zeilen. Diese sagen euch welchen Treiber Ihr installieren sollt. Je nach alter der Grafikkarte kann dort auch etwas anderes als nvidia-driver stehen.
mit sudo apt install nvidia-driver stoßen wir die Installation an und warten bis alles durchgelaufen ist und starten neu.
Das war's mehr ist es nicht. Achso Neustarten und so... .
Wayland Probleme Lösen
NvidiaGraphicsDrivers - Debian Wiki
The NVIDIA driver supports Wayland, with caveats. The 495-series driver (or newer) is recommended for the best experience, as older versions only support Wayland through an NVIDIA-specific API which is not supported by all desktops, and is generally less reliable. The NVIDIA driver also lacks support for accelerated XWayland applications in current stable Debian versions. This means that if you run a Xorg-only application on your NVIDIA Wayland desktop (often proprietary video games), they will only be able to render on the CPU without taking advantage of GPU acceleration, leading to incredibly poor performance. Patches have been merged to resolve this, however this support will only be available in Debian 12/Bookworm. In terms of specific desktop support, GNOME supports NVIDIA Wayland sessions in both Debian 10 and Debian 11, though they call their support "preliminary". KDE Plasma supports NVIDIA Wayland sessions starting with Debian 11, though it requires some extra hoops to enable, and generally is not recommended. Refer to the Wayland section of the Debian KDE wiki page for up-to-date information: https://wiki.debian.org/KDE#Wayland.2C…ation.2C_hi-DPI In Debian 12/bookworm, almost all issues should be resolved and most Wayland sessions should "just work" with the 525-series driver. On GNOME desktops, although a proper version of the NVIDIA driver is used, the greeter (GDM3) may still not offer the option to start a Wayland session, either because kernel modesetting is not enabled, or because the hibernate/suspend/resume helper scripts have not been installed on the system. To enable kernel modesetting with the NVIDIA driver: Code
To install the hibernate/suspend/resume helper scripts: Code
Once these changes are made, reboot the system. The GNOME greeter should then start new sessions under Wayland by default. |
Je nachdem wann Ihr das lest könnte es relevant sein. Ich hatte durch die Installation des Treiber(535.113.01) das Problem, dass Wayland disabled wurde. Gemerkt habe ich das erst, als ich für ein Projekt echo $XDG_SESSION_TYPE im Terminal eingegeben habe und den Output x11 bekam. Wie gesagt das Problem könnte schon gefixed worden sein wenn Ihr das lest. Wenn nicht:
[gelöst] Wayland Auswahl nicht möglich mit Nvidia Treiber in Gnome - debianforum.de
Deinstallation
NvidiaGraphicsDrivers - Debian Wiki
Bonus Bonus