Fedora 36 Nvidia as primary GPU

Hello i just upgraded F35 to F36 thinking it was out of beta without checking and since then i am unable to use my Nvidia GPU instead of the Hybrid Intel GPU, does someone have any idea of what i could do to fix that ?

We need more info to know what exactly has changed.

First, can you boot to the older F35 kernel and have the nvidia GPU work?

Second,
Please take the time to post the output of these commands
inxi -Fzx
lsmod | grep -iE 'nvidia|nouveau'
sudo dnf list installed *nvidia*
and
uname -a

With that info we can tell most of what is going on and may be able to form a reasonable suggestion for a fix.

Thank you, i tried so many things to make it work that it was a mess so i preferred to make a fresh F36 install but i didn’t have the time to try it yet.
It is a shame i forgot to try to boot back to F35 before erasing it all…

You didn’t have to delete your system,

For next time you may ask these questions to yourself,

First how did you set your Nvidia card as a primary bios or Xorg configs ? If it is xorg configs you should of “did you check Xorg configs” and there are documentation about how to set it as well.

When you upgrade your system It may replace some of your configs and revert back to Intel as well. I assume that both drivers are working (Intel/Nvidia)

https://docs.fedoraproject.org/en-US/quick-docs/how-to-set-nvidia-as-primary-gpu-on-optimus-based-laptops/

So i made a fresh install but still have the same problem after following this How to Set Nvidia as Primary GPU on Optimus-based Laptops :: Fedora Docs
and
Gaming on Fedora - Fedora Magazine
so i am still looking for a fix.

inxi -Fzx
System:
  Kernel: 5.17.3-302.fc36.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.37-24.fc36 Desktop: GNOME v: 42.0
    Distro: Fedora release 36 (Thirty Six)
Machine:
  Type: Laptop System: Dell product: G3 3500 v: N/A
    serial: <superuser required>
  Mobo: Dell model: 028HKV v: A02 serial: <superuser required> UEFI: Dell
    v: 1.14.3 date: 03/25/2022
Battery:
  ID-1: BAT0 charge: 30.8 Wh (88.0%) condition: 35.0/51.0 Wh (68.6%)
    volts: 12.9 min: 11.4 model: LGC-LGC4.474 DELL 415CG0C status: charging
CPU:
  Info: quad core model: Intel Core i5-10300H bits: 64 type: MT MCP
    arch: Comet Lake rev: 2 cache: L1: 256 KiB L2: 1024 KiB L3: 8 MiB
  Speed (MHz): avg: 2567 high: 3127 min/max: 800/4500 cores: 1: 2133
    2: 2361 3: 2404 4: 2985 5: 2411 6: 2872 7: 2243 8: 3127 bogomips: 39999
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel CometLake-H GT2 [UHD Graphics] vendor: Dell driver: i915
    v: kernel bus-ID: 00:02.0
  Device-2: NVIDIA TU117M vendor: Dell driver: nouveau v: kernel
    bus-ID: 01:00.0
  Device-3: Sunplus Innovation Integrated_Webcam_HD type: USB
    driver: uvcvideo bus-ID: 1-5:2
  Display: wayland server: X.Org v: 1.22.1.1 with: Xwayland v: 22.1.1
    compositor: gnome-shell driver: gpu: i915 resolution: 1920x1080~120Hz
  OpenGL: renderer: Mesa Intel UHD Graphics (CML GT2) v: 4.6 Mesa 22.0.1
    direct render: Yes
Audio:
  Device-1: Intel Comet Lake PCH cAVS vendor: Dell
    driver: sof-audio-pci-intel-cnl bus-ID: 00:1f.3
  Device-2: NVIDIA vendor: Dell driver: snd_hda_intel v: kernel
    bus-ID: 01:00.1
  Sound Server-1: ALSA v: k5.17.3-302.fc36.x86_64 running: yes
  Sound Server-2: PipeWire v: 0.3.49 running: yes
Network:
  Device-1: Intel Comet Lake PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3
  IF: wlp0s20f3 state: up mac: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth type: USB driver: btusb v: 0.8
    bus-ID: 1-14:3
  Report: rfkill ID: hci0 rfk-id: 0 state: down bt-service: enabled,running
    rfk-block: hardware: no software: yes address: see --recommends
Drives:
  Local Storage: total: 1.14 TiB used: 8.58 GiB (0.7%)
  ID-1: /dev/nvme0n1 vendor: Toshiba model: KBG40ZNS256G NVMe KIOXIA 256GB
    size: 238.47 GiB temp: 44.9 C
  ID-2: /dev/sda vendor: Western Digital model: WD10SPCX-21KHST0
    size: 931.51 GiB
Partition:
  ID-1: / size: 236.89 GiB used: 8.42 GiB (3.6%) fs: btrfs
    dev: /dev/nvme0n1p3
  ID-2: /boot size: 973.4 MiB used: 152.9 MiB (15.7%) fs: ext4
    dev: /dev/nvme0n1p2
  ID-3: /boot/efi size: 598.8 MiB used: 13.9 MiB (2.3%) fs: vfat
    dev: /dev/nvme0n1p1
  ID-4: /home size: 236.89 GiB used: 8.42 GiB (3.6%) fs: btrfs
    dev: /dev/nvme0n1p3
Swap:
  ID-1: swap-1 type: zram size: 7.56 GiB used: 0 KiB (0.0%) dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 62.0 C pch: 56.0 C mobo: N/A gpu: nouveau
    temp: 54.0 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 668 Uptime: 2m Memory: 7.56 GiB used: 2.24 GiB (29.6%)
  Init: systemd runlevel: 5 Compilers: gcc: 12.0.1 Packages: N/A
  note: see --pkg Shell: Bash v: 5.1.16 inxi: 3.3.14
grep -iE 'nvidia|nouveau'
nouveau              2412544  0
drm_ttm_helper         16384  1 nouveau
mxm_wmi                16384  1 nouveau
ttm                    81920  3 drm_ttm_helper,i915,nouveau
wmi                    32768  9 dell_wmi_sysman,intel_wmi_thunderbolt,alienware_wmi,dell_wmi,wmi_bmof,dell_smbios,dell_wmi_descriptor,mxm_wmi,nouveau
video                  57344  4 dell_wmi,dell_laptop,i915,nouveau
sudo dnf list installed *nvidia*

Installed Packages
akmod-nvidia.x86_64                                   3:510.60.02-1.fc36              @rpmfusion-nonfree-nvidia-driver
kmod-nvidia-5.17.3-302.fc36.x86_64.x86_64             3:510.60.02-1.fc36              @@commandline                   
nvidia-settings.x86_64                                3:510.60.02-1.fc36              @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia.x86_64                            3:510.60.02-1.fc36              @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.x86_64                  3:510.60.02-1.fc36              @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-kmodsrc.x86_64                    3:510.60.02-1.fc36              @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.i686                         3:510.60.02-1.fc36              @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.x86_64                       3:510.60.02-1.fc36              @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-power.x86_64                      3:510.60.02-1.fc36              @rpmfusion-nonfree-nvidia-driver
uname -a
Linux fedora 5.17.3-302.fc36.x86_64 #1 SMP PREEMPT Sun Apr 17 13:22:18 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Note that I added the </> tags to your post to restore the formatting to what was seen on screen when you did those commands. Please use those tags in the future to keep the content formatted and more easily readable.

That output shows me that even though the nvidia drivers are installed the system did not load them.

Please post the output of dmesg | grep -iE 'secure|nvidia' and dnf list installed kernel-devel kernel-headers

dmesg | grep -iE 'secure|nvidia'

[    0.000000] secureboot: Secure boot disabled
[    0.016425] secureboot: Secure boot disabled
[    1.615997] nouveau 0000:01:00.0: NVIDIA TU117 (167000a1)
[    5.125084] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input19
[    5.154492] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input20
[    5.154587] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input21
[    5.154658] input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input22
[    5.180401] Bluetooth: hci0: Secure boot is enabled
[    6.798911] nvidia: loading out-of-tree module taints kernel.
[    6.798922] nvidia: module license 'NVIDIA' taints kernel.
[    6.806421] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[    6.817204] nvidia-nvlink: Nvlink Core is being initialized, major device number 508
[    6.817209] NVRM: The NVIDIA probe routine was not called for 1 device(s).
               NVRM: nouveau, rivafb, nvidiafb or rivatv 
               NVRM: was loaded and obtained ownership of the NVIDIA device(s).
               NVRM: driver(s)), then try loading the NVIDIA kernel module
[    6.817753] NVRM: No NVIDIA devices probed.
[    6.818374] nvidia-nvlink: Unregistered the Nvlink Core, major device number 508
[    7.702738] nvidia-nvlink: Nvlink Core is being initialized, major device number 508
[    7.702744] NVRM: The NVIDIA probe routine was not called for 1 device(s).
               NVRM: nouveau, rivafb, nvidiafb or rivatv 
               NVRM: was loaded and obtained ownership of the NVIDIA device(s).
               NVRM: driver(s)), then try loading the NVIDIA kernel module
[    7.703360] NVRM: No NVIDIA devices probed.
[    7.704314] nvidia-nvlink: Unregistered the Nvlink Core, major device number 508
[    8.220640] nvidia-nvlink: Nvlink Core is being initialized, major device number 508
[    8.220645] NVRM: The NVIDIA probe routine was not called for 1 device(s).
               NVRM: nouveau, rivafb, nvidiafb or rivatv 
               NVRM: was loaded and obtained ownership of the NVIDIA device(s).
               NVRM: driver(s)), then try loading the NVIDIA kernel module
[    8.221400] NVRM: No NVIDIA devices probed.
[    8.221563] nvidia-nvlink: Unregistered the Nvlink Core, major device number 508
[    9.008565] nvidia-nvlink: Nvlink Core is being initialized, major device number 508
[    9.008571] NVRM: The NVIDIA probe routine was not called for 1 device(s).
               NVRM: nouveau, rivafb, nvidiafb or rivatv 
               NVRM: was loaded and obtained ownership of the NVIDIA device(s).
               NVRM: driver(s)), then try loading the NVIDIA kernel module
[    9.009124] NVRM: No NVIDIA devices probed.
[    9.009258] nvidia-nvlink: Unregistered the Nvlink Core, major device number 508
[   13.853427] nvidia-nvlink: Nvlink Core is being initialized, major device number 508
[   13.853433] NVRM: The NVIDIA probe routine was not called for 1 device(s).
               NVRM: nouveau, rivafb, nvidiafb or rivatv 
               NVRM: was loaded and obtained ownership of the NVIDIA device(s).
               NVRM: driver(s)), then try loading the NVIDIA kernel module
[   13.854211] NVRM: No NVIDIA devices probed.
[   13.854314] nvidia-nvlink: Unregistered the Nvlink Core, major device number 508
[   16.741169] nvidia-nvlink: Nvlink Core is being initialized, major device number 508
[   16.741174] NVRM: The NVIDIA probe routine was not called for 1 device(s).
               NVRM: nouveau, rivafb, nvidiafb or rivatv 
               NVRM: was loaded and obtained ownership of the NVIDIA device(s).
               NVRM: driver(s)), then try loading the NVIDIA kernel module
[   16.741752] NVRM: No NVIDIA devices probed.
[   16.741928] nvidia-nvlink: Unregistered the Nvlink Core, major device number 508
[  101.524352] nvidia-nvlink: Nvlink Core is being initialized, major device number 508
[  101.524358] NVRM: The NVIDIA probe routine was not called for 1 device(s).
               NVRM: nouveau, rivafb, nvidiafb or rivatv 
               NVRM: was loaded and obtained ownership of the NVIDIA device(s).
               NVRM: driver(s)), then try loading the NVIDIA kernel module
[  101.524959] NVRM: No NVIDIA devices probed.
[  101.525056] nvidia-nvlink: Unregistered the Nvlink Core, major device number 508
[  106.419202] nvidia-nvlink: Nvlink Core is being initialized, major device number 508
[  106.419208] NVRM: The NVIDIA probe routine was not called for 1 device(s).
               NVRM: nouveau, rivafb, nvidiafb or rivatv 
               NVRM: was loaded and obtained ownership of the NVIDIA device(s).
               NVRM: driver(s)), then try loading the NVIDIA kernel module
[  106.419967] NVRM: No NVIDIA devices probed.
[  106.420148] nvidia-nvlink: Unregistered the Nvlink Core, major device number 508
[  107.807686] nvidia-nvlink: Nvlink Core is being initialized, major device number 508
[  107.807692] NVRM: The NVIDIA probe routine was not called for 1 device(s).
               NVRM: nouveau, rivafb, nvidiafb or rivatv 
               NVRM: was loaded and obtained ownership of the NVIDIA device(s).
               NVRM: driver(s)), then try loading the NVIDIA kernel module
[  107.808225] NVRM: No NVIDIA devices probed.
[  107.808340] nvidia-nvlink: Unregistered the Nvlink Core, major device number 508
[  124.242993] nvidia-nvlink: Nvlink Core is being initialized, major device number 508
[  124.242998] NVRM: The NVIDIA probe routine was not called for 1 device(s).
               NVRM: nouveau, rivafb, nvidiafb or rivatv 
               NVRM: was loaded and obtained ownership of the NVIDIA device(s).
               NVRM: driver(s)), then try loading the NVIDIA kernel module
[  124.243668] NVRM: No NVIDIA devices probed.
[  124.243809] nvidia-nvlink: Unregistered the Nvlink Core, major device number 508
[  127.094591] nvidia-nvlink: Nvlink Core is being initialized, major device number 508
[  127.094596] NVRM: The NVIDIA probe routine was not called for 1 device(s).
               NVRM: nouveau, rivafb, nvidiafb or rivatv 
               NVRM: was loaded and obtained ownership of the NVIDIA device(s).
               NVRM: driver(s)), then try loading the NVIDIA kernel module
[  127.095185] NVRM: No NVIDIA devices probed.
[  127.095339] nvidia-nvlink: Unregistered the Nvlink Core, major device number 508
[  129.939756] nvidia-nvlink: Nvlink Core is being initialized, major device number 508
[  129.939761] NVRM: The NVIDIA probe routine was not called for 1 device(s).
               NVRM: nouveau, rivafb, nvidiafb or rivatv 
               NVRM: was loaded and obtained ownership of the NVIDIA device(s).
               NVRM: driver(s)), then try loading the NVIDIA kernel module
[  129.940304] NVRM: No NVIDIA devices probed.
[  129.941321] nvidia-nvlink: Unregistered the Nvlink Core, major device number 508
[  206.398427] nvidia-nvlink: Nvlink Core is being initialized, major device number 508
[  206.398433] NVRM: The NVIDIA probe routine was not called for 1 device(s).
               NVRM: nouveau, rivafb, nvidiafb or rivatv 
               NVRM: was loaded and obtained ownership of the NVIDIA device(s).
               NVRM: driver(s)), then try loading the NVIDIA kernel module
[  206.398917] NVRM: No NVIDIA devices probed.
[  206.399018] nvidia-nvlink: Unregistered the Nvlink Core, major device number 508
[  259.987894] nvidia-nvlink: Nvlink Core is being initialized, major device number 508
[  259.987900] NVRM: The NVIDIA probe routine was not called for 1 device(s).
               NVRM: nouveau, rivafb, nvidiafb or rivatv 
               NVRM: was loaded and obtained ownership of the NVIDIA device(s).
               NVRM: driver(s)), then try loading the NVIDIA kernel module
[  259.988514] NVRM: No NVIDIA devices probed.
[  259.988608] nvidia-nvlink: Unregistered the Nvlink Core, major device number 508
[  678.944420] nvidia-nvlink: Nvlink Core is being initialized, major device number 508
[  678.944429] NVRM: The NVIDIA probe routine was not called for 1 device(s).
               NVRM: nouveau, rivafb, nvidiafb or rivatv 
               NVRM: was loaded and obtained ownership of the NVIDIA device(s).
               NVRM: driver(s)), then try loading the NVIDIA kernel module
[  678.945287] NVRM: No NVIDIA devices probed.
[  678.945451] nvidia-nvlink: Unregistered the Nvlink Core, major device number 508
[  759.512753] nvidia-nvlink: Nvlink Core is being initialized, major device number 508
[  759.512760] NVRM: The NVIDIA probe routine was not called for 1 device(s).
               NVRM: nouveau, rivafb, nvidiafb or rivatv 
               NVRM: was loaded and obtained ownership of the NVIDIA device(s).
               NVRM: driver(s)), then try loading the NVIDIA kernel module
[  759.513371] NVRM: No NVIDIA devices probed.
[  759.513474] nvidia-nvlink: Unregistered the Nvlink Core, major device number 508
[  760.808412] nvidia-nvlink: Nvlink Core is being initialized, major device number 508
[  760.808418] NVRM: The NVIDIA probe routine was not called for 1 device(s).
               NVRM: nouveau, rivafb, nvidiafb or rivatv 
               NVRM: was loaded and obtained ownership of the NVIDIA device(s).
               NVRM: driver(s)), then try loading the NVIDIA kernel module
[  760.808929] NVRM: No NVIDIA devices probed.
[  760.809083] nvidia-nvlink: Unregistered the Nvlink Core, major device number 508
[ 1391.253581] nvidia-nvlink: Nvlink Core is being initialized, major device number 508
[ 1391.253587] NVRM: The NVIDIA probe routine was not called for 1 device(s).
               NVRM: nouveau, rivafb, nvidiafb or rivatv 
               NVRM: was loaded and obtained ownership of the NVIDIA device(s).
               NVRM: driver(s)), then try loading the NVIDIA kernel module
[ 1391.254177] NVRM: No NVIDIA devices probed.
[ 1391.254287] nvidia-nvlink: Unregistered the Nvlink Core, major device number 508
[ 1890.804633] nvidia-nvlink: Nvlink Core is being initialized, major device number 508
[ 1890.804638] NVRM: The NVIDIA probe routine was not called for 1 device(s).
               NVRM: nouveau, rivafb, nvidiafb or rivatv 
               NVRM: was loaded and obtained ownership of the NVIDIA device(s).
               NVRM: driver(s)), then try loading the NVIDIA kernel module
[ 1890.805310] NVRM: No NVIDIA devices probed.
[ 1890.805416] nvidia-nvlink: Unregistered the Nvlink Core, major device number 508
[ 2306.073750] nvidia-nvlink: Nvlink Core is being initialized, major device number 508
[ 2306.073765] NVRM: The NVIDIA probe routine was not called for 1 device(s).
               NVRM: nouveau, rivafb, nvidiafb or rivatv 
               NVRM: was loaded and obtained ownership of the NVIDIA device(s).
               NVRM: driver(s)), then try loading the NVIDIA kernel module
[ 2306.075222] NVRM: No NVIDIA devices probed.
[ 2306.075519] nvidia-nvlink: Unregistered the Nvlink Core, major device number 508
[13647.049905] nvidia-nvlink: Nvlink Core is being initialized, major device number 508
[13647.049912] NVRM: The NVIDIA probe routine was not called for 1 device(s).
               NVRM: nouveau, rivafb, nvidiafb or rivatv 
               NVRM: was loaded and obtained ownership of the NVIDIA device(s).
               NVRM: driver(s)), then try loading the NVIDIA kernel module
[13647.050464] NVRM: No NVIDIA devices probed.
[13647.050636] nvidia-nvlink: Unregistered the Nvlink Core, major device number 508
[13904.746240] nvidia-nvlink: Nvlink Core is being initialized, major device number 508
[13904.746247] NVRM: The NVIDIA probe routine was not called for 1 device(s).
               NVRM: nouveau, rivafb, nvidiafb or rivatv 
               NVRM: was loaded and obtained ownership of the NVIDIA device(s).
               NVRM: driver(s)), then try loading the NVIDIA kernel module
[13904.746779] NVRM: No NVIDIA devices probed.
[13904.746912] nvidia-nvlink: Unregistered the Nvlink Core, major device number 508```

``


dnf list installed kernel-devel kernel-headers
Installed Packages
kernel-devel.x86_64 5.17.3-302.fc36 @fedora
kernel-headers.x86_64 5.17.4-300.fc36 @updates-testing

Ok, it seems the nvidia module is not properly built for the running kernel.
I see that you have the kernel-headers package for the 5.17.4 kernel. Is that kernel installed and not in use, or not installed? dnf list installed kernel will answer that.

If it is not installed then I suggest that you dnf remove kernel-headers before you continue.
Then do the following steps.

dnf remove *nvidia*
dnf upgrade kernel* --enablerepo=updates-testing

reboot to the newly installed kernel 5.17.4
then do

dnf install akmod-nvidia kernel-headers

wait at least 5 minutes then reboot again.
If everything works the system then should load the nvidia drivers properly.

To check that repeat lsmod | grep -iE 'nouveau|nvidia'
If it now returns a list of the nvidia modules then things are working as they should. If it still returns the nouveau modules then we have to dig a little deeper.

I have already done this process and nvidia is working properly on F36 with the 5.17.4 kernel on my laptop with dual GPU.

first for the kernel i get this which means if i am correct that it isn’t installed so i will follow your procedure

dnf list installed kernel
Installed Packages
kernel.x86_64                                        5.17.3-302.fc36  

so after waiting 5 minutes at the second reboot i get some message like Nvidia module missing, falling back to nouveau.

and i get

lsmod | grep -iE 'nouveau|nvidia'
nouveau              2412544  0
mxm_wmi                16384  1 nouveau
drm_ttm_helper         16384  1 nouveau
ttm                    81920  3 drm_ttm_helper,i915,nouveau
wmi                    32768  9 dell_wmi_sysman,intel_wmi_thunderbolt,alienware_wmi,dell_wmi,wmi_bmof,dell_smbios,dell_wmi_descriptor,mxm_wmi,nouveau
video                  57344  4 dell_wmi,dell_laptop,i915,nouveau

then if i do
dnf list installed kernel

Installed Packages
kernel.x86_64                                     5.17.3-302.fc36                                     @fedora         
kernel.x86_64                                     5.17.4-300.fc36                                     @updates-testing

please post the output of dmesg | grep -iE 'secure|nvidia'
Also if not already done, please do sudo dnf upgrade --refresh

dmesg | grep -iE 'secure|nvidia'
[    0.000000] Command line: BOOT_IMAGE=(hd1,gpt2)/vmlinuz-5.17.4-300.fc36.x86_64 root=UUID=f571f9a4-be29-4bcd-98b4-f1d06b72ca57 ro rootflags=subvol=root rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1
[    0.000000] secureboot: Secure boot disabled
[    0.016294] secureboot: Secure boot disabled
[    0.039944] Kernel command line: BOOT_IMAGE=(hd1,gpt2)/vmlinuz-5.17.4-300.fc36.x86_64 root=UUID=f571f9a4-be29-4bcd-98b4-f1d06b72ca57 ro rootflags=subvol=root rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1
[    4.931606] Bluetooth: hci0: Secure boot is enabled
[    5.057818] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input19
[    5.061164] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input20
[    5.063030] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input21
[    5.063118] input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input22
[    5.875868] nouveau 0000:01:00.0: NVIDIA TU117 (167000a1)

sudo dnf upgrade --refresh only updated Brave browser

That is frustrating. I wonder if the kernel-devel package is current. The first release of it for the 5.17.4 kernel had some issues.
dnf list installed kernel-*devel* kernel-headers
On my system I have

$ dnf list installed kernel-*devel* kernel-headers
Installed Packages
kernel-devel.x86_64                                         5.16.20-100.fc34                                        @updates        
kernel-devel.x86_64                                         5.17.3-302.fc36                                         @fedora         
kernel-devel.x86_64                                         5.17.4-300.fc36                                         @updates-testing
kernel-devel-matched.x86_64                                    5.17.4-300.fc36                                      @updates-testing
kernel-headers.x86_64                                       5.17.4-300.fc36                                         @updates-testing

one -devel package for each kernel still installed, plus only the newest -headers package. I think it was the kernel-devel-matched package that fixed the earlier issue with the nvidia driver for someone. If you do not have that one then you may need to do dnf install kernel-devel-matched --enablerepo=updates-testing to install it.

yes that is frustrating, i am glad i can get some help, thank you.
for this command i get

Installed Packages
kernel-devel.x86_64                                          5.17.3-302.fc36                                   @fedora
kernel-devel-matched.x86_64                                  5.17.3-302.fc36                                   @fedora
kernel-headers.x86_64                                        5.17.0-300.fc36                                   @fedora

So should i do “dnf install kernel-devel-matched --enablerepo=updates-testing” anyway ?

I don’t see the devel or headers files for the newest kernel you have installed.

I think you should do dnf upgrade kernel* --enablerepo=updates-testing then akmods --force followed by another reboot after waiting 5 minutes from the completion of these commands.

it didn’t work, now in the settings instead of nouveau and intel gpu i have intel gpu twice and no more nouveau but nvidia is still missing…
but the command above installed the 5.17.4 kernel and the akmod built succesfully some nvidia stuff.

Now lets once again see the output of
dnf list installed kernel*, dmesg | grep -iE 'secure|nvidia', lsmod | grep -iE 'nvidia|nouveau' and add inxi -SCGzxx

alright,
dnf list installed kernel*

Installed Packages
kernel.x86_64                                            5.17.3-302.fc36                              @fedora         
kernel.x86_64                                            5.17.4-300.fc36                              @updates-testing
kernel-core.x86_64                                       5.17.3-302.fc36                              @fedora         
kernel-core.x86_64                                       5.17.4-300.fc36                              @updates-testing
kernel-devel.x86_64                                      5.17.3-302.fc36                              @fedora         
kernel-devel.x86_64                                      5.17.4-300.fc36                              @updates-testing
kernel-devel-matched.x86_64                              5.17.4-300.fc36                              @updates-testing
kernel-headers.x86_64                                    5.17.4-300.fc36                              @updates-testing
kernel-modules.x86_64                                    5.17.3-302.fc36                              @fedora         
kernel-modules.x86_64                                    5.17.4-300.fc36                              @updates-testing
kernel-modules-extra.x86_64                              5.17.3-302.fc36                              @fedora         
kernel-modules-extra.x86_64                              5.17.4-300.fc36                              @updates-testing
kernel-srpm-macros.noarch                                1.0-14.fc36                                  @fedora      

dmesg | grep -iE ‘secure|nvidia’

[    0.000000] Command line: BOOT_IMAGE=(hd1,gpt2)/vmlinuz-5.17.4-300.fc36.x86_64 root=UUID=f571f9a4-be29-4bcd-98b4-f1d06b72ca57 ro rootflags=subvol=root rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1
[    0.000000] secureboot: Secure boot disabled
[    0.016370] secureboot: Secure boot disabled
[    0.039750] Kernel command line: BOOT_IMAGE=(hd1,gpt2)/vmlinuz-5.17.4-300.fc36.x86_64 root=UUID=f571f9a4-be29-4bcd-98b4-f1d06b72ca57 ro rootflags=subvol=root rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1
[    5.106274] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input19
[    5.106361] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input20
[    5.106410] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input21
[    5.114785] input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input22
[    5.159059] Bluetooth: hci0: Secure boot is enabled
[    8.584590] nvidia: loading out-of-tree module taints kernel.
[    8.584622] nvidia: module license 'NVIDIA' taints kernel.
[    8.602849] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[    8.637328] nvidia-nvlink: Nvlink Core is being initialized, major device number 508
[    8.638920] nvidia 0000:01:00.0: enabling device (0000 -> 0003)
[    8.639146] nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
[    8.690444] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  510.60.02  Wed Mar 16 11:24:05 UTC 2022
[   11.581752] nvidia_uvm: module uses symbols from proprietary module nvidia, inheriting taint.
[   11.597606] nvidia-uvm: Loaded the UVM driver, major device number 506.
[   11.786895] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  510.60.02  Wed Mar 16 11:17:28 UTC 2022
[   12.089423] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[   13.834392] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 0

lsmod | grep -iE ‘nvidia|nouveau’

nvidia_drm             69632  1
nvidia_modeset       1163264  2 nvidia_drm
nvidia_uvm           1204224  0
nvidia              39145472  112 nvidia_uvm,nvidia_modeset

inxi -SCGzxx

System:
  Kernel: 5.17.4-300.fc36.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.37-24.fc36 Desktop: GNOME v: 42.0 tk: GTK v: 3.24.31 wm: gnome-shell
    dm: GDM Distro: Fedora release 36 (Thirty Six)
CPU:
  Info: quad core model: Intel Core i5-10300H bits: 64 type: MT MCP
    arch: Comet Lake rev: 2 cache: L1: 256 KiB L2: 1024 KiB L3: 8 MiB
  Speed (MHz): avg: 800 min/max: 800/4500 cores: 1: 800 2: 800 3: 800
    4: 800 5: 800 6: 800 7: 800 8: 800 bogomips: 39999
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel CometLake-H GT2 [UHD Graphics] vendor: Dell driver: i915
    v: kernel ports: active: eDP-1 empty: DP-1, DP-2, HDMI-A-1, HDMI-A-2
    bus-ID: 00:02.0 chip-ID: 8086:9bc4
  Device-2: NVIDIA TU117M vendor: Dell driver: nvidia v: 510.60.02 pcie:
    speed: 2.5 GT/s lanes: 8 ports: active: none empty: HDMI-A-3
    bus-ID: 01:00.0 chip-ID: 10de:1f99
  Device-3: Sunplus Innovation Integrated_Webcam_HD type: USB
    driver: uvcvideo bus-ID: 1-5:2 chip-ID: 1bcf:2b99
  Display: wayland server: X.org v: 1.20.14 with: Xwayland v: 22.1.1
    compositor: gnome-shell driver: gpu: i915 display-ID: 0
  Monitor-1: eDP-1 model: AU Optronics 0xed8f res: 1920x1080 dpi: 142
    diag: 394mm (15.5")
  OpenGL: renderer: Mesa Intel UHD Graphics (CML GT2) v: 4.6 Mesa 22.0.1
    direct render: Yes

Those outputs show that you now have booted from the 5.17.4 kernel, that the nvidia drivers loaded and your current desktop is wayland.

Is everything working the way you expected now?

The only other step to ensure all is working the best I know how with the nvidia dGPU as primary is to verify that you have copied /usr/share/X11/xorg.conf.d/nvidia.conf to /etc/X11/xorg.conf.d/nvidia.conf and that you have edited the latter file and inserted Option "Primary" "yes" into both stanzas of that file.

i did that, it doesn’t work but i get a message after i login every time i reboot saying “software updates failed, an important operating system update failed to be installed” and if i click on it, it opens the software center and it says “failed to update, the update was cancelled” with no option to see or install whatever was cancelled.