Hybrid Nvidia laptop won't boot when I switch to Nvidia GPU

It is not full log. Upload journal file to a pastebin service, the file path at the end can be adjusted.

sudo journalctl -b >> ~/journal.txt

Hey, Iā€™m that Stepanzakā€™s friend. The journal.txt file is on this page: wormhole.app. I apologize for not posting this text on for example, Pastebin. It was very large.

1 Like

wormhole.app
new link

journal.txt shows:

kvě 16 17:31:59 frantaspc systemd-modules-load[179]: Failed to find module 'nvidia-uvm'

The laptop is rendering on the Intel

API: OpenGL v: 4.6 Mesa 23.0.3 renderer: Mesa Intel UHD Graphics (TGL GT1)
direct-render: Yes

It doesnā€™t show a driver loaded for the Nvidia

Device-2: NVIDIA GA107M [GeForce RTX 3050 Mobile] vendor: Hewlett-Packard
driver: N/A alternate: nouveau non-free: 530.xx+

Are the nvidia drivers installed?

nvidia-inst

Check if it shows the nvidia driver installed. The above command should install the latest nvidia drivers as that card supports it.

inxi -Ga

The output still may not show the drivers installed. Then try envycontrol as you may need to switch graphics before it will actually show in the output.

You donā€™t want bumble bee. The other option over envy control is using prime.

1 Like

Iā€™m sure we did that, but we will do again and post the result.

Iā€™m sorry, weā€™ve had some issues with steam that needed some 32 bit library and we fixed that by running nvidia-inst --32.
Hereā€™s the output of inxi -Ga:

Graphics:
  Device-1: Intel TigerLake-H GT1 [UHD Graphics] vendor: Hewlett-Packard
    driver: i915 v: kernel arch: Gen-12.1 process: Intel 10nm built: 2020-21
    ports: active: eDP-1 empty: DP-1 bus-ID: 0000:00:02.0 chip-ID: 8086:9a68
    class-ID: 0300
  Device-2: NVIDIA GA107M [GeForce RTX 3050 Mobile] vendor: Hewlett-Packard
    driver: N/A alternate: nouveau non-free: 530.xx+
    status: current (as of 2023-05) arch: Ampere code: GAxxx
    process: TSMC n7 (7nm) built: 2020-22 bus-ID: 0000:01:00.0
    chip-ID: 10de:25a2 class-ID: 0300
  Device-3: Quanta HP Wide Vision HD Camera driver: uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-6:3 chip-ID: 0408:5425
    class-ID: fe01 serial: 0001
  Display: x11 server: X.Org v: 21.1.8 compositor: kwin_x11 driver: X:
    loaded: modesetting failed: nvidia dri: iris gpu: i915 display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93")
  Monitor-1: eDP-1 model: BOE Display 0x0aad built: 2021 res: 1920x1080
    hz: 144 dpi: 137 gamma: 1.2 size: 355x200mm (13.98x7.87") diag: 407mm (16")
    ratio: 16:9 modes: 1920x1080
  API: OpenGL v: 4.6 Mesa 23.0.3 renderer: Mesa Intel UHD Graphics (TGL GT1)
    direct-render: Yes

As i posted above it sill doesnā€™t actually show the nvidia driver as loaded. But we do know that it is installed if you ran the installer and there werenā€™t any issues or errors with it. So currently it is using the Intel graphics. You now have to use either envycontrol, optimus-manager or prime in order to switch graphics to render on nvidia.

Edit: Which ever method works. I suggest envycontrol and or prime and possible optimus-manger. One of the three methods should work.

Edit2: I did go through this with another user that has a similar HP Victus laptop and optimus-manager did work on it with KDE.

The post is here: I fricked my system somehow by using nvidia-inst

So we should run paru -S optimus-manager-qt-kde, sudo systemctl enable optimus-manager --now and then reboot?

EDIT: Iā€™m asking just to be sure because I believe thatā€™s exactly what we did before.

1 Like

No there is no paru package on EndeavourOS unless you installed that? EndeavourOS uses the AUR helper yay.

yay -S optimus-manager-qt

reboot

systemctl status optimus-manager
sudo systemctl enable --now optimus-manager

Edit: There should be a tray icon after. You may need to reboot again. :thinking:

But shouldnā€™t I rather use the optimus-manager-qt-kde?
The EndeavourOS wiki says:

And if you want to use it under KDE/Plasma it is recommended to build with _plasma=true to set inside the PKGBUILD

That package seems to do exactly that.

Anyway, we are going to try optimus-manager in school within a few hours and Iā€™m posting results ASAP.

1 Like

it works better than before.

Wow, when we enabled optimus manager and rebooted, icon appeared in the system tray.
When I click it and select switch to Nvidia, it asks if I want to switch GPU. When I click Apply, this happens:
Screenshot_20230519_084239
This is the link in the alert window.
I click Ok and this message shows up:
Screenshot_20230519_084316
When I clicked Yes, it logged me out. I logged in and the tray icon is not present, even if I start the optimus manager app from app launcher.
When I run optimus-manager --switch integrated, it says this:

[frankieee@frantaspc ~]$ optimus-manager --switch integrated
ERROR: the latest GPU setup attempt failed at Xorg pre-start hook.
Log at /var/log/optimus-manager/switch/switch-20230519T084346.log
Cannot execute command because of previous errors.

The log file is here:

[frankieee@frantaspc ~]$ less /var/log/optimus-manager/switch/switch-20230519T084346.log 
[frankieee@frantaspc ~]$ ^less^cat
cat /var/log/optimus-manager/switch/switch-20230519T084346.log 
[5] INFO: # Xorg pre-start hook
[5] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'nvidia', 'current_mode': 'integrated'}
[5] INFO: Requested mode is: nvidia
[28] INFO: Available modules: ['nouveau']
[28] INFO: Unloading modules ['nouveau'] (if loaded)
[31] INFO: switching=none, nothing to do
[564] INFO: Nvidia card not visible in PCI bus, rescanning
[564] INFO: Rescanning PCI bus
[1137] ERROR: Nvidia card not showing up in PCI bus after rescan. Continuing anyways.
[1145] INFO: Loading module nvidia
[1145] ERROR: Xorg pre-start setup error
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/optimus_manager/hooks/pre_xorg_start.py", line 51, in main
    setup_kernel_state(config, prev_state, requested_mode)
  File "/usr/lib/python3.11/site-packages/optimus_manager/kernel.py", line 22, in setup_kernel_state
    _nvidia_up(config, hybrid=(requested_mode == "hybrid"))
  File "/usr/lib/python3.11/site-packages/optimus_manager/kernel.py", line 95, in _nvidia_up
    _load_nvidia_modules(config, available_modules)
  File "/usr/lib/python3.11/site-packages/optimus_manager/kernel.py", line 164, in _load_nvidia_modules
    _load_module(available_modules, "nvidia", options=nvidia_options)
  File "/usr/lib/python3.11/site-packages/optimus_manager/kernel.py", line 241, in _load_module
    raise KernelSetupError(
optimus_manager.kernel.KernelSetupError: module nvidia is not available for current kernel. Is the corresponding package installed ?
[1146] INFO: Removing /etc/X11/xorg.conf.d/10-optimus-manager.conf (if present)
[1146] INFO: Writing state {'type': 'pre_xorg_start_failed', 'switch_id': '20230519T084346', 'requested_mode': 'nvidia'}
[frankieee@frantaspc ~]$ 

It still looks like Nvidia is not installed properly, but we did the nvidia-inst.

1 Like

Well this gives a good indication that it isnā€™t finding the nvidia. Iā€™m not sure if itā€™s not picking up the correct pci id or something? Did you try using prime also before?

Does the nvidia card show with this command?

sudo lspci | grep -E "VGA|3D controller"

Edit: If so it may require you to create a custom file like this adding the correct pci id info

/etc/X11/xorg.conf.d/10-nvidia.conf

Example:

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:1:0:0"
EndSection

Driver: N/A means that Nvidia driver is installed but failing to load. No application will be able to use Nvidia GPU even with software like optimus manager.
@stepanzak please send output of

journalctl -k -b -0 | eos-sendlog

It should be a URL. Wormhole doesnā€™t work for me.

https://termbin.com/h2hj
Sorry, eos-sendlog doesnā€™t work.

Output of that command is:

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 GA107M [GeForce RTX 3050 Mobile] (rev a1)

In nvidia-inst help is this:

ā€“conf Create also file /etc/X11/xorg.conf.d/20-nvidia.conf (might be needed on some systems).

Isnā€™t it what we need?

EDIT:
This is the output of nvidia-inst --conf -t (test mode shows the commands instead of running them if I understood that correctly):

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
COMMANDS TO RUN:
    pacman -Rs --noconfirm --noprogressbar --nodeps nvidia-prime
    echo 'Section "Device"'                       >> /etc/X11/xorg.conf.d/20-nvidia.conf
    echo '    Identifier "Nvidia Card"'           >> /etc/X11/xorg.conf.d/20-nvidia.conf
    echo '    Driver "nvidia"'                    >> /etc/X11/xorg.conf.d/20-nvidia.conf
    echo '    VendorName "NVIDIA Corporation"'    >> /etc/X11/xorg.conf.d/20-nvidia.conf
    echo '    Option "NoLogo" "true"'             >> /etc/X11/xorg.conf.d/20-nvidia.conf
    echo 'EndSection'                             >> /etc/X11/xorg.conf.d/20-nvidia.conf
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

So only BusId is missing

1 Like

looks like is common with the nvidia gpu of this model, some on ASUS TUF series had also this sort issueā€¦

https://www.nvidia.com/en-us/geforce/forums/geforce-graphics-cards/5/473005/nvidia-rtx-3050-missing-driver-issue-on-a-asus-ga/

i dont know how or what connected this, but can someine check for me this can be connected somehow ?
=-)

Option --conf was needed with some older systems, in your case it shouldnā€™t be needed. But some kernel parameter specific to your system might be needed.

Did you check the Arch wiki about Nvidia cards? Also Nvidia site forum might have some more insight regarding your specific hardware.

Disable secure boot if enabled.

@stepanzak
Does this command show the nvidia hardware? Post the url

inxi -Faz | eos-sendlog

Also are you using grub or systemd-boot? If you have the 12th gen Intel you may need ibt=offas a kernel parameter.

Output of inxi -Faz is HERE.
Itā€™s using systemd-boot and processor is IntelĀ® Coreā„¢ i5-11400H, which is 11th generation.

1 Like