Presentation:
I have a new laptop and I try to configure it to have a dual boot (secure boot enable). I want to use this laptop on windows and all works fine actually with a good support for my nvidia. But I want to install fedora 34 Workstation next to windows. On fedora I don’t need nvidia capabilities all the time. I need it only when I work with UX tools like Blender 3D rendering. A important requirement I have for this installation is that I need to use HDMI screen. Not using the nvidia sound output isn’t very important all the time.
After many read and installation tries, I have some difficulties using fedora 34. Stange xorg-x11-drv-intel error notifications. Strange plymouth display bug during logo display on boot… So after many reads to learn what are Optimus ; Prime ; Bumblebee ; and many reads around how to switch under a nvidia/FOSS wayland sessions, my opinion is that technology isn’t implemented as well as windows (power optimization ; no needs to switch or manage bettween FOSS/nvidia…). But my opinion is just my opinion and possible I think wrong.
So I open this topic on this understanding and I choose to make my installation of my laptop like that:
An UEFI boot entry on windows throught its bootloader (already done)
An UEFI boot entry to fedora thought its shim64 bootloader with grub2.
A grub2 entry without nvidia and using the nouveau driver to work without nvidia at all (and without bug possibly due to the bad detection of my nvidia card) So No HDMI sound and no Nvidia driver when using this entry
A grub2 entry with nvidia to work with nvidia HDMI sound and 3D capabilities
Before I explain my problem with the installation of official nvidia drivers and sofwares, I think is better to ask you about this choosen solution.
Questions:
1°) Do you think is a good choice?
2°) Are you okay with me that power management and usage is not well supported/ not really user friendly?
3°) Do you think like me that I need to switch manually between FOSS/nvidia on linux and it is not user friendly like a graphical swich button or just disconnect/connect on wayland?
Laptop: Dell XPS 17 (9700) with GTX 1650 Ti
PC: RTX 2070
OS: Fedora 34
Kernel: 5.14.5-300
DE: Gnome 40.4
Windowing System: Wayland
Nvidia Drivers (installed from RPM Fusion): 470.63.01-1
Not sure if I understand your questions correctly but here are my 2 cents:
Never ever try to install driver right from Nvidia’s website unless you understand what you’re doing!
In Fedora specifically you should install driver from RPM Fussion repository only.
(optional) Don’t use secure boot if you don’t know how to / want to sign dirver kernel module manually each time you install / upgrade driver and linux kernel.
You don’t need third party tool to manage which GPU to use for rendering. In Ferdora 34/Gnome it just works. By default all 2D rendering is happening on you integrated GPU and all 3D is on your Nvidia GPU. If you want to make sure to run something on Nvidia GPU just right click on the application’s icon and choose Launch using Dedicated Grpahics Card. There are some Environmental Variables as well to manage that process.
GTK4 applications won’t render on Nvidia GPU on Wayland but you should be fine since in your case they will be rendered on your integrated GPU. This bug is fixed in GTK 4.4.* but that version is not available for Fedora 34.
Power management / suspend / resume work fine for me. But it could require installation of xorg-x11-drv-nvidia-power package and enabling nvidia-fallback.service, nvidia-resume.service, nvidia-hibernate.service and nvidia-suspend.service systemd services thereafter.
Other than that - everything works as a charm for me.
I’m not sure on all I need to do for the moment on this laptop to have a well configuration.
For information about my current laptop:
I’m not sure but it seem to be an Optimus one:
sudo dmesg | grep -E -i -e "optimus|DSM|PRIME"
[ 1.298183] ACPI Warning: \_SB.PC00.GFX0._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20201113/nsarguments-61)
[ 1.298209] ACPI Warning: \_SB.PC00.PEG1.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20201113/nsarguments-61)
[ 1.298283] pci 0000:01:00.0: optimus capabilities: enabled, status dynamic power, hda bios codec supported
[ 1.298286] VGA switcheroo: detected Optimus DSM method \_SB_.PC00.PEG1.PEGP handle
[ 1.298286] nouveau: detected PR support, will not use DSM
If I take a look on rpmfusion.org/Howto/NVIDIA there is a “special note” chapter about Optimus with a link to this Optimus Howto. But I don’t know if I have to do something special on this way
If someone can confirm if I have an Optimus system and if I have something to plan for PRIME
Okay. Thanks for that advises. Actually on fedora 34 bumblebee isn’t installed by default. But In my case I have tested to install the drivers from rpmfusion and from the nvidia installer with approximativly the same results.
Under wayland, if I take a look into parameters > about, there is no NVIDIA card for my display. Just the string “Mesa Intel® UHD Graphics (TGL GT1) / Mesa Intel® UHD Graphics (TGL GT1)” in place of the default “Mesa Intel® UHD Graphics (TGL GT1)”. Under X11 session I have “NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] / Mesa Intel® UHD Graphics (TGL GT1)”
NVIDIA Settings app never start from wayland and xorg
The difference when I start an xorg session instead of the wayland are a bit different when I try to install from the nvidia installer. In this case xorg just not work (system freeze after logging with a blue sceen and a frozen mouse pointer)
If I run the watch nvidia-smi command on wayland or on the working rmpfusion throught xorg. I have this same output (nvidia installer and rpmfusion installation):
$ lspci | grep -E -i -e "VGA|3D"
0000:00:02.0 VGA compatible controller: Intel Corporation TigerLake-H GT1 [UHD Graphics] (rev 01)
0000:01:00.0 VGA compatible controller: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] (rev a1)
$ watch nvidia-smi
Sat Sep 25 15:08:52 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.63.01 Driver Version: 470.63.01 CUDA Version: 11.4 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... Off | 00000000:01:00.0 Off | N/A |
| N/A 33C P0 15W / N/A | 1MiB / 5946MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
Actually the only thing I haven’t done is the configuration part from /usr/share/X11/xorg.conf.d/nvidia.conf that it seems to have to be ported in /etc/X11/xorg.conf.d/
Here is my bash history of this fresh installation of fedora 34 with just manually enable rpmfusion nvidia non-free repo:
cat /etc/gdm/custom.conf ## Wayland enabled
sudo nano /usr/lib/udev/rules.d/61-gdm.rules ## Comment DRIVER=="nvidia" line that disable wayland when using the proprietary nvidia driver
sudo dnf update
sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda xorg-x11-drv-nvidia-power
sudo systemctl enable nvidia-{suspend,resume,hibernate}
sudo dnf install vdpauinfo libva-vdpau-driver libva-utils
sudo dnf install screenfetch
watch nvidia-smi
screenfetch
For wayland and X11 session I have the same result for screenfetch:
I want to make some corrections to my previous post.
In case I use the X11 session, nvidia-settings start and the card seems working.
Sometime I have this differences too when I use x11 session
$ nvidia-smi
Sat Sep 25 17:45:00 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.63.01 Driver Version: 470.63.01 CUDA Version: 11.4 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... Off | 00000000:01:00.0 Off | N/A |
| N/A 42C P0 16W / N/A | 5MiB / 5946MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 13451 G /usr/libexec/Xorg 4MiB |
+-----------------------------------------------------------------------------+
So If you have solution to have a working driver using wayland and/or other advises to get a better configuration.
I don’t now If I have to search to add PRIME capabilities in my case. Or If I have to do something better instead of my current installation (see bash history in the previous post).
I am facing similar issue → i have followed all the steps mention in [fedora howTo], I have enables x11 by default, when I am using dGPU then nvidia-smi works fine, but when i switch to hybrid mode this error is shown during startup {nvidia kernel module missing falling back to nouveau}. Can someone help me with this.