(→The alternative opensourced nvidia kernel modules) |
(→Elder Nvidia drivers: update; easier to achieve R390 linked | R340 linked info fetched into text.) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 170: | Line 170: | ||
* Driver: Latest Legacy -- nvidia470 -- R470 -- R470 was "nvidia-current" in Mageia 8. | * Driver: Latest Legacy -- nvidia470 -- R470 -- R470 was "nvidia-current" in Mageia 8. | ||
* Driver: Production -- nvidia-current -- R550 -- Intended for all recent Nvidia GPU | * Driver: Production -- nvidia-current -- R550 -- Intended for all recent Nvidia GPU | ||
− | * Driver: New Feature -- nvidia-newfeature -- | + | * Driver: New Feature -- nvidia-newfeature -- R565 -- *usually* a later version than nvidia-current, can be seen as experimental in beginning of a new Mageia release - try this when your card is not fully supported by nvidia-current. Note though that it may not be kept up to date as duly, i.e maybe not compatible with new kernel immediately, but usually is. CUDA and OpenCL support is only guaranteed for nvidia-current, but may work for newfeature. |
* GeForce 745 series and later --> same as Production | * GeForce 745 series and later --> same as Production | ||
* GeForce 635 to GeForce 920 --> same as Latest Legacy | * GeForce 635 to GeForce 920 --> same as Latest Legacy | ||
Line 187: | Line 187: | ||
==== Elder Nvidia drivers ==== | ==== Elder Nvidia drivers ==== | ||
− | Nvidia R390 driver series, available in Mageia 8, | + | Nvidia R390 driver series, available in Mageia 8, supporting older graphic cards like the GF1xx series, is EOL (end of life) since the end of 2022 so it no longer receive security and compatibility updates. |
In Mageia 9, because security and incompatibility with Kernel and X Server we had to drop R390. | In Mageia 9, because security and incompatibility with Kernel and X Server we had to drop R390. | ||
Line 193: | Line 193: | ||
The same applies to Nvidia R340 series, which we had in Mageia 7. | The same applies to Nvidia R340 series, which we had in Mageia 7. | ||
− | If you like | + | If you don't mind possible security problems, and like to compile yourself, below find some guidance. |
− | But first try if Xorg nouveau or modesetting works for your GPU, or even Nvidia R470. | + | '''Self compiling R390''' |
+ | |||
+ | See {{Bug|33549#c15}} ''(To be written out here when fully confirmed.)'' | ||
+ | |||
+ | '''Self compiling R340''' | ||
+ | |||
+ | R340 need more work, maybe you need also to compile a kernel to use it. You will find information on the Internet. 340.xx is also not compatibile with Xorg 21.1.8 ABI (which is ABI 25), it's at most ABI 24 compatible (xorg-1.20) however with adding "IgnoreABI" "true" to ServerFlags section in /etc/X11/xorg.conf it would ignore the ABI mismatch error and could allow newer Xorg to start with the older driver (even with some restriction or incompatibility). Of course some desktop (e.g. Plasma) might be more picky and having more incompatibilities than others (e.g. icewm). On the other hand it's still offering 50% speedup or more than modesetting/nouveau. It is still even possible to have the former modules compiling even on newer kernels, by including the Arch (and suse/deb) patches that are around - e.g. https://aur.archlinux.org/packages/nvidia-340xx, that are also collected in other places. <!-- collected from https://ml.mageia.org/l/arc/qa-discuss/2023-06/msg00008.html --> | ||
+ | |||
+ | ''But first try if Xorg nouveau or modesetting or nv works for your GPU, or even Nvidia R470 or 390.'' | ||
<br> | <br> |
Revision as of 18:16, 30 December 2024
Other languages Deutsch ; English ; Français ; Español |
Contents
[hide]Prerequisites
- In Release Notes: read section Graphic drivers.
- In Errata: read section Graphics.
- Have an Internet connection.
- Have a complete set of urpmi repositories (software sources).
- If you intend to install proprietary drivers from Nvidia or AMD/ATI make sure to activate Nonfree_Release and Nonfree_Updates repositories.
Please see Software management for the two latter points.
Free versus proprietary
There are two categories of drivers:
- proprietary drivers: such drivers are provided by the GPU designer as binary files. The source code is not accessible because of licenses rights.
- open drivers: such drivers are provided by X.org foundation and the code source is accessible. They are maintained by the community and are compiled with and included in the Mageia distribution.
Selecting drivers
- Start MCC (Mageia Control Center), click on the tab "Hardware" and on the icon "Set up the graphical server".
- Note: The button beside "Graphic Card" show the currently used driver.
- Click that button:
- In the new window a proposed driver will be preselected.
- If you want to change the selection, choose the manufacturer and then the model of your card.
- If there exist a proprietary driver for your card it will ask you if you want to install it. If you choose "No" the system will use the open driver - for nvidia it chose Xorg nouveau. Note that if you want Xorg modesetting, you need to select that manually:
- For free drivers you can browse to end of list, and open the Xorg section.
- amdgpu for AMD cards.
- ati for ATI's cards.
- Xorg modesetting for Intel, Nvidia, AMD
- Xorg nouveau for Nvidia's cards. Please try both nouveau and modesetting.
- After selecting the driver, up comes a dialogue about options.
- - Note that if you selected proprietary Nvidia, you may need to wait minutes here for the kernel module to be prepared -
- Depending of the characteristics of your card you may choose (per default):
- activate translucency (extension Composite).
- Use hardware acceleration for mouse pointer.
- Use acceleration RENDER for 3D effects.
- Graphical interface at startup.
- Normally, above options are recommended. The other options can be discarded.
- Choose "OK".
- You come back to the screen "Set up the graphical server".
- You can modify the resolution of your monitor, but if your hardware is well detected, it is already well set.
- Do NOT try the Test button! mga#20835 1.) it may give false negative. 2.) it may hang your system. 3.) it may cause you to be unable to log in to desktop beacuse user's .Xauthority file got set to owned by root - Fix: (for 3.) Set user and group on ~/.Xauthority to your normal user. (Ask in forum if you need help.)
- Exit the wizard, and reboot to use the selected driver.
The modesetting driver
The modesetting X11 driver is hardware-agnostic, works with Nvidia, Intel and AMD kernel drivers. The nouveau X11 driver only works with the nouveau kernel driver.
"modesetting" with Nvidia cards, though more stable, uses internally kernel's nouveau module too for 3D. "nouveau" in Xorg uses nouveau Xorg DDX driver plus kernel's nouveau module. For many recent NV cards the nouveau DDX can't even be used because they are unsupported (e.g. for NV RTX 3xxx and beyond, etc.).
AMD proprietary drivers
This section (should) also concern ATI GPUs (elder) - ATI was acquired by AMD in 2006.
AMD-GPU Radeon Pro , including ROCm. The proprietary AMDGPU-PRO driver currently only works with X.org 1.1xx, so it cannot be used in Mageia 9.
UPDATE: We have taken a step forward, by offering a way to easily download and install two packages for AMD graphics cards, which offer some advanced features such as the activation of opencl for performance improvement in processes such as rendering in Blender and other 3D tools like CAD and PCB tools,and processing modules in Darktable, Steam games, Gimp, Libreoffice and any other application that requires these advanced features.
You should consider:
– The package amdgpupro-opencl-orca (More information here!) downloads AMD libraries for ie. Grenada XT, Carrizo and Polaris.
– The package amdgpupro-opencl-pal (More information here!) downloads AMD libraries for i.e. Banded Kestrel, Picasso and Vega.
To install it you have two options:
– From the MCC -> “Install & Remove Software” window, you must change both drop-down filters on the left of “Find:” to “All” and then search for the “amdgpupro-opencl-pal” or “amdgpupro-opencl-orca” package and install it.
– From a terminal as “root” user by typing: “urpmi amdgpupro-opencl-pal” or “urpmi amdgpupro-opencl-orca”.
Thinking of all users who work in these areas or want to have a good gaming experience with Mageia, we offer with this implementation full support for the two main options in graphics performance at the moment.
We hope this will contribute to improve the user experience with our great open source operating system!
Tricks
mga#32060 - Missing support for H264/HEVC encoding/decoding in radeonsi vaapi driver. Forum post on Making your own.
Intel
If a driver have problems, try Xorg > modesetting.
Nvidia proprietary drivers
This chapter is created for Mageia 9.
For Mageia 8 note the following differences: 1) it have also Nvidia390 - also in 32 bit. 2) nvidia-current is R470 in updates, R460 at release. No later version available. 3) When switching between proprietary drivers you need to manually uninstall the dkms-nvidia-*. 4) CUDA and OpenCL is supported on at least R470.
Generally for Nvidia proprietary drivers:
- Only supported on 64 bit.
- To see the proprietary driver working and tweak it, launch
nvidia-settings
(from package x11-driver-video-nvidia*).
- Kernel module is prepared (this takes a few minutes depending on CPU) at install or change of proprietary driver, and also when a new kernel is installed. If you install Nvidia driver and then boot a kernel that had no Nvidia module prepared, it will be prepared during next boot with that kernel - note that it may look like the boot stalled, but just be patient!
- You can change between one proprietary and free drivers back and forth without the proprietary driver packages gets uninstalled nor wait for the kernel module being prepared.
The alternative opensourced nvidia kernel modules
News December 2024.
Nvidia 550: Starting from version nvidia-current-550.135, also 'dkms-nvidia-current-open' is provided as the alternative opensourced nvidia kernel module. Note that, while the nvidia-current package works for cards of series GTX 745 and beyond, these modules, as we already seen for nvidia-newfeature, works only for cards of series Turing and beyond.
Nvidia 565: Starting from version nvidia-newfeature-open-565.77, also 'dkms-nvidia-newfeature' is provided as the alternative opensourced nvidia kernel module. Note that only NVidia cards of arch Turing and beyond are supported by dkms-nvidia-newfeature-open. Older NVidia cards, e.g. in the Maxwell or Pascal arch are supported only by the standard dkms-nvidia-newfeature package. So for instance Quadro K620 car is in the Maxwell arch and IS not supported by the -open variant. GTX 1080 is in the Pascal arch and it's not supported. RTX 2070, GTX 1660 are in the Turing arch and are supported. Quadro RTX A6000 is in the Ampere arch and is supported, etc.
How to install:
- First, the cards must have already been configured as a nvidia card with proprietary driver using XFdrake/drakx11 (or if it was don at Mageia installation). This also include dkms having been installed, as well as kernel-devel for your kernel - but make sure to manually select to install corresponding kernel-devel for all your installed kernels see Known Nvidia issues below.
- Then install the dkms-nvidia-current-open (or dkms-nvidia-newfeature-open). This will uninstall the current dkms-nvidia-current (or dkms-nvidia-newfeature) kernel modules and install and rebuild the -open variant.
Further reading: More technical details for the -open variant here (For 565.77 - adjust numbers for other versions.)
Known Nvidia issues
mga#32352 - drakx11 do not for nvidia check whether kernel-devel is installed, nvidia-newfeature exist, nor if nvidia module really got built. Implication: If you install a nvidia card and switch to nvidia proprietry driver, you must install the corresponding kernel-devel package for the running kernel before using MCC to configure the driver ( = executing drakx11 ), so the nvidia kernel module can get built. And also make sure the -devel packages are installed for other installed kernels, so drivers can get automatically built when booting them.
mga#33452 - drakx11 in text mode crash on "too small screen" (in reality 4K) after preparing kernel module when installing Nvidia proprietary driver. This may make root filesystem unmountable and/or fail graphics mode. You may need to boot another system to work on it (one example see bug). When it boots but do not reach graphical login, switch to a text terminal (i.e Ctrl+Alt+F4) log in as root, run drakx11 and select nouveau or modesetting driver.
Virtual tty terminals are black
(i.e Ctrl-Alt-F4) - after booted to graphics mode (desktop).
Even worse: shifting back and forth between tty and desktop may lead to hard system lockup.
FIXED by kernel 6.5.13 and above mga#31994 - This issue was not at release in Mageia 8 but came with updates and was in Mageia 9 too, as well as in other Linux distributions.
Possible Workaround Make sure to set a well supported resolution in the kernel command line, i.e avoid the red numbers in this table. To see what got set on the kernel line on your system in last boot, issue journalctl -b|grep 'command line:'
and look at the number after "vga=". Look it up in the table what resolution it means. Note there is no wide standard for resolutions above 1280x1024. - To change it using Mageia Control Center
, Select Boot > Set up boot system > Next > Advanced > Video mode: 1280x1024 16bpp
, which will result in "vga=794", working on most computers. (If your screen have lower resolution, select that or next lower.)
Problems resuming
I have a system *) which depending on nvidia driver version have problems after suspend-resume. Some works perfectly, some versions system may hang hard, some can be brought down using REISUB, sometimes it is just that the screen only wakes up briefly with a message no signal and go back to sleep - but computer is running - for this case it may be enough to Power off/on the screen or disconnect/connect the cable so try that first, before REISUB, or I could get around this problem by using HDMI instead but that gives bad colours on sharp lines on this monitor. Workarounds: 1) Try another connection to monitor. 2) Try another nvidia driver (i.e for my system nvidia-current-550.90.07-1 have problem but not our two previous versions, and not nvidia470-470.256.02-1 released at the same time, but both versions from mga9 release do. 3) Use a free driver instead such as modesetting (slower) or nouveau (even slower here). 4) Using non-official kernels helped more or less in some cases, mga#33316. 5) Hibernating works, so to hibernate instead of suspend may also be a workaround. *) System: Mageia 9, Nvidia GTX 750 Ti, ASRock P55 Pro, Philips 436M6 screen on DisplayPort. /Morgano
Nvidia driver versions
This chapter is currently a quick mock up - can be improved in style (table?) , and also list alternate names of GPU, and variants... To update when needed!
- Listed as -- package name -- driver -- GPU range -- comment
- Driver: Latest Legacy -- nvidia470 -- R470 -- R470 was "nvidia-current" in Mageia 8.
- Driver: Production -- nvidia-current -- R550 -- Intended for all recent Nvidia GPU
- Driver: New Feature -- nvidia-newfeature -- R565 -- *usually* a later version than nvidia-current, can be seen as experimental in beginning of a new Mageia release - try this when your card is not fully supported by nvidia-current. Note though that it may not be kept up to date as duly, i.e maybe not compatible with new kernel immediately, but usually is. CUDA and OpenCL support is only guaranteed for nvidia-current, but may work for newfeature.
- GeForce 745 series and later --> same as Production
- GeForce 635 to GeForce 920 --> same as Latest Legacy
- We do not ship elder drivers, for security and compatibility reasons, as Nvidia do not update them.
- RIVA 128 --> installs free nv
- [FIXME] other choices: --> installs free nouveau (Or possibly keep from previous Mageia release)
Caution: a rare bug: mga#32579 - switching nvidia driver, next boot fail graphical mode for the kernel that was running
- If none suits your GPU, try Xorg nouveau, modesetting, or possibly nv.
- Driver versions noted for Mageia 9.
Nvidia list of current drivers
Elder Nvidia drivers
Nvidia R390 driver series, available in Mageia 8, supporting older graphic cards like the GF1xx series, is EOL (end of life) since the end of 2022 so it no longer receive security and compatibility updates.
In Mageia 9, because security and incompatibility with Kernel and X Server we had to drop R390.
The same applies to Nvidia R340 series, which we had in Mageia 7.
If you don't mind possible security problems, and like to compile yourself, below find some guidance.
Self compiling R390
See mga#33549#c15 (To be written out here when fully confirmed.)
Self compiling R340
R340 need more work, maybe you need also to compile a kernel to use it. You will find information on the Internet. 340.xx is also not compatibile with Xorg 21.1.8 ABI (which is ABI 25), it's at most ABI 24 compatible (xorg-1.20) however with adding "IgnoreABI" "true" to ServerFlags section in /etc/X11/xorg.conf it would ignore the ABI mismatch error and could allow newer Xorg to start with the older driver (even with some restriction or incompatibility). Of course some desktop (e.g. Plasma) might be more picky and having more incompatibilities than others (e.g. icewm). On the other hand it's still offering 50% speedup or more than modesetting/nouveau. It is still even possible to have the former modules compiling even on newer kernels, by including the Arch (and suse/deb) patches that are around - e.g. https://aur.archlinux.org/packages/nvidia-340xx, that are also collected in other places.
But first try if Xorg nouveau or modesetting or nv works for your GPU, or even Nvidia R470 or 390.
NVIDIA CUDA, OpenCL and more
- We support CUDA and OpenCL for "nvidia-current". Probably works on "New feature branch" too.
- For nvidia470 if you find it not working for you, see below.
- At minimum, install package corresponding to your driver; nvidia*-cuda-opencl, where * is "-current", "-newfeature" or "470". This is enough i.e for BOINC applications I have used.
- Some applications need more support, so install the corresponding nvidia*-all package. To do this you also have to have the 32-bit repositories core and nonfree both release and updates enabled.
- Changing between "-current", "-newfeature" or "470" graphic driver will uninstall the CUDA and nvidia*-all packages, so you need to install them again.
- To see if it works, install
cuda-z
and launch it: it will investigate and display capabilities - or report failure. In case of problems, best error messages are seen in a terminal from where you launch cuda-z. I.e at time of writing, for nvidia470 it say "CUDA Error: 00000023 CUDA driver version is insufficient for CUDA runtime version". (BOINC report no problem though, but I have no such work to try right now.) Note that cuda-z show same message also if Nvidia driver is installed but nouveau or modesetting is used.
- Different naming and versioning between Nvidia driver and CUDA etc makes things complicated... For more support ask in our forum.
Nvidia R470 CUDA
If you are familiar with repackaging, and are using an older Nvidia card supported only by nvidia470 driver and want to use CUDA, you might try to repackage locally and use an older cuda-toolkit release 11.8 or 10.2, using these commands: (also see note here.)
mgarepo co -r 1916712 svn://svn.mageia.org/packages/cauldron/nvidia-cuda-toolkit bm -l ./nvidia-cuda-toolkit/SPECS/nvidia-cuda-toolkit.spec urpmi ./nvidia-cuda-tookit/RPMS/x86_64/*rpm urpmi nvidia470-all
Forcing icd
From forum, forum, and mga#29563
A few applications may need Nvidia or Intel icd instead of mesa icd.
Such as some Steam games - a user experienced the problem for Warthunder (with Nvidia) and Deus Ex: Mankind Divided (with Intel).
You can launch the launcher with the vendor icd by the line:
For NVidia
export VK_ICD_FILENAMES=/etc/vulkan/icd.d/nvidia_icd.json launcher
For Intel
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel_icd.x86_64.json
Gamemode
Installing the package gamemode, you can launch games and similar applications so they are executed under various speed optimisations. Sometimes it gives just a little boost (especially on Intel and Nvidia), sometimes huge (e.g. on Radeon 780M), and sometimes even negative (e.g. if you are running on batteries).
Usage: gamemoderun <application>
See: Github
Hybrid Graphics
Some laptops comes with "Hybrid Graphics", meaning they have two GPU: one low power, and the other faster.
For configuration see Bumblebee and Mageia-prime for Optimus.
Logs
- The system journal, viewed by the command
journalctl
- Xorg log, viewed by i.e
less /var/log/Xorg.0.log
- But note that when using GDM, the location is$HOME/.local/share/xorg/Xorg.0.log
, and that content gets written to journal too.
Note that when using modesetting, journal still logs the name of the kernel driver, i.e "nouveau" for nvidia, because modesetting is the X11 (a.k.a DDX) driver that sits on top of a kernel device driver.
Suppress disturbing messages in terminal and logs
Sometimes you find inconvenient number of firewall messages "diluting" dmesg/journal, and they also are output in terminals and even right into i.e text mode applications such as drakx tools in console mode - very disturbing!
To avoid those messages: in /etc/sysctl.d/kernel.msg.conf, have the line "kernel.printk=3 4 1 3".
It may also suppress important error messages, so it is not the default. See more information on printk.
If problems
Some general tricks, to be extended...
- See tricks per vendor in chapters above.
- Search our bugzilla and forum, other Mageia forums and general internet - for your GPU and Linux.
- Try another driver. Sometimes several works with different result - Example: Nvidia GTX750 works on my system with proprietary R470 and R535 (both fastest, but occasionally fail resuming), nouveau (slow), and modesetting (decent, and most stable for resuming).
- Disable the 3D hardware acceleration and rely only on SIMD CPU acceleration (run drakx11, go in "Option" and select "Disable Hardware Acceleration"). This will use the llvmpipe 3D (software) driver for 3D, you won't be able to play 3D games mostly because too slow, but for most basic stuff can be reliable.
- Check whether the same crashes occurs also on other simpler desktop(s), e.g. IceWM, which won't use 3D for window compositing. IceWM is installed as backup per default.
- Change kernel
- Especially for elder computer: Try elder kernel base version. If downgrading within current Mageia release does not help, try latest kernel from previous Mageia release update or backport repository.
- If your computer is very new, maybe instead it need latest possible kernel, if regular update is not enough look in current Mageia release backport repository.
- Try our packaged linus kernel variant, which have least changes from upstream. Latest in updates, then earlier. (Known to have resolved some resume problem.)
- Note that it may happen some driver is incompatible with your chosen kernel version, so you may need to fetch a driver of similar age.
Software compatibility
From Mageia 8 Errata: mga#30103 - Video problems with Remote Desktop Tools (VNC, TeamViewer, AnyDesk, etc) Workaround: Firstly, at least TeamViewer and Anydesk are not Wayland compatible, so use Xorg. Problems can often be mitigated by on host computer selecting a lower resolution and/or switching off desktops effects (in for example Plasma: press Shift-Alt-F12), but better: in /etc/X11/xorg.conf
, under devices, add Option "LinearFramebuffer".
- One user report issue and workaround was still for his system regarding Anydesk in early Mageia 9, another user report Anydesk works as Flatpak.
If it fail to boot to desktop
See How to change a wrong graphic driver.
Connect to problematic system using SSH
Having the ability to login from another computer is invaluable, so you can check what is happening and even do a clean shutdown and reboot if needed even when your screen is frozen, black, or distorted. Of course you have to prepare before the hickup by the preparations below and test it is working.
For systems on a home LAN, enable inbound 22/tcp in the firewall, install openssh-server
, and as root issue systemctl start sshd.service
.
This will allow you to make an SSH connection between machines on your home LAN.