Askannz / optimus-manager

A Linux program to handle GPU switching on Optimus laptops.
MIT License
2.27k stars 165 forks source link

Cannot load nvidia on Asus Vivobook #357

Closed kzoli429 closed 2 months ago

kzoli429 commented 3 years ago

I am running Arch Linux with nvidia 455.45.01-7 and nvidia-utils nvidia-settings xorg-server-devel opencl-nvidia optimus-manager nvidia-prime installed.

After having the Arch package 'optimus-manager' properly installed, Intel GPU runs as default all the time and switching to Nvidia is impossible.

At the first run: $ optimus-manager --status ERROR: the latest GPU setup attempt failed at Xorg pre-start hook.

At all the following runs a message "Log at /var/log/optimus-manager/switch/switch-<date,time>.log Cannot execute command because of previous errors." is added.

$ lspci -k | grep -A 2 -E "(VGA|3D)" 00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07) Subsystem: ASUSTeK Computer Inc. Device 18ce Kernel driver in use: i915 01:00.0 3D controller: NVIDIA Corporation GP108M [GeForce MX150] (rev a1) Subsystem: ASUSTeK Computer Inc. Device 18ce Kernel modules: nouveau, nvidia_drm, nvidia

Excerpt from /var/log/Xorg.0.log [ 246.532] X.Org X Server 1.20.10 X Protocol Version 11, Revision 0 [ 246.532] Build Operating System: Linux Arch Linux [ 246.532] Current Operating System: Linux asus-x530 5.9.14-arch1-1 #1 SMP PREEMPT Sat, 12 Dec 2020 14:37:12 +0000 x86_64

Log files: daemon-20201225T215345.log switch-20201225T215345.log switch-20201225T215744.log

WhyDoWeWonder commented 3 years ago

What happens when you run modprobe nvidia NVreg_UsePageAttributeTable=1 manually?

kzoli429 commented 3 years ago

modprobe nvidia NVreg_UsePageAttributeTable=1 (as root) results in: modprobe: ERROR: Error running install command '/bin/false' for module nvidia: retcode 1 modprobe: ERROR: could not insert 'nvidia': Invalid argument

kzoli429 commented 3 years ago

Anyway, the result is the same as for: modprobe nvidia (as root)

kzoli429 commented 3 years ago

I gave it another try: $ optirun /usr/bin/glxgears [ 2352.628831] [ERROR]Cannot access secondary GPU - error: Could not enable discrete graphics card [ 2352.628911] [ERROR]Aborting because fallback start is disabled.

$ optirun glxgears [ 2394.053819] [ERROR]Cannot access secondary GPU - error: Could not enable discrete graphics card [ 2394.053896] [ERROR]Aborting because fallback start is disabled.

$ optirun glxgears64 [ 2403.240432] [ERROR]Cannot access secondary GPU - error: Could not enable discrete graphics card [ 2403.240489] [ERROR]Aborting because fallback start is disabled.

$ /usr/bin/glxgears Running synchronized to the vertical refresh. The framerate should be approximately the same as the monitor refresh rate. 337 frames in 5.0 seconds = 67.216 FPS 301 frames in 5.0 seconds = 60.029 FPS 301 frames in 5.0 seconds = 60.013 FPS ... until window closed.

It seems to (partly?) work somehow.

kzoli429 commented 3 years ago

It seems that nvidia driver is not available but did install as modules are available. Some more info from the 'inxi -G' command.

Graphics:
Device-1: Intel UHD Graphics 620 driver: i915 v: kernel Device-2: NVIDIA GP108M [GeForce MX150] driver: N/A Device-3: IMC Networks USB2.0 HD UVC WebCam type: USB driver: uvcvideo Display: x11 server: X.Org 1.20.10 driver: intel unloaded: modesetting,vesa resolution: 1: 1920x1080 60Hz 2: 1920x1080 60Hz OpenGL: renderer: Mesa Intel UHD Graphics 620 (KBL GT2) v: 4.6 Mesa 20.3.1

kzoli429 commented 3 years ago

It seems that I finally found the solution. I have been using Arch Linux for a while and there was an old 'bumblebee.conf' file which denied systemd from loading nvidia modules. It seems to have been solved for now. Thank you for your time, efforts and help.

WhyDoWeWonder commented 3 years ago

Can you please mark this as solved?

nwildner commented 2 months ago

Marking as solved as requested by @WhyDoWeWonder