You are not logged in.

#26 2022-04-17 16:03:56

ualkyire
Member
Registered: 2022-02-05
Posts: 42

Re: NVIDIA Optimus isn't working for 470xx

Alright apparently even bumblebee is not working.

Ok, let me provide you with all the details there is because I'm pulling my hair now.

The cards I have are:

- 00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
- 01:00.0 3D controller: NVIDIA Corporation GK208M [GeForce GT 730M] (rev a1)

The packages I have now installed:

- core/linux-api-headers 5.16.8-1
- core/linux-headers 5.17.3.arch1-1

- community/bumblebee 3.2.1-21
- community/primus 20151110-9
- community/primus_vk 1.6.1-1

- extra/xf86-input-libinput 1.2.1-1
- extra/xf86-video-intel 1:2.99.917+916+g31486f40-2
- extra/vulkan-headers 1:1.3.211-1

- multilib/lib32-primus 20151110-4
- multilib/lib32-primus_vk 1.6.1-1

- aur/nvidia-470xx-utils 470.103.01-1
- aur/opencl-nvidia-470xx 470.103.01-1
- aur/nvidia-470xx-dkms 470.103.01-1
- aur/nvidia-470xx-settings 470.103.01-1
- aur/libxnvctrl-470xx 470.103.01-1
- aur/lib32-nvidia-470xx-utils 470.103.01-1
- aur/lib32-opencl-nvidia-470xx 470.103.01-1

I have the following in my /etc/bumblebee/bumblebee.conf:

- Driver=nvidia
- PMMethod=bbswitch

I have the following in my /etc/bumblebee/xorg.conf.nvidia:

- Option      "AutoAddDevices" "true": instead of "false", still not working
- Option      "AutoAddGPU" "true": instead of "false", still not working
- BusID "PCI:01:00:0": commented out with the correct ID, still not working
- Option "ProbeAllGpus" "true": instead of "false", still not working
- Option "UseEDID" "true": instead of "false", still not working
- # Option "UseDisplayDevice" "none": commented, still not working

I have the bumblebeed.service enabled, and I've removed everything related to nvidia-xrun and optimus-manager.

Upon booting, running "cat /proc/acpi/bbswitch" shows that the card is truly turned off "0000:01:00.0 OFF" which is expected and wanted behavior thanks to the work of bbswitch.

Upon running tree on "/etc/X11":

├── xinit
│   └── xinitrc.d
│       ├── 40-libcanberra-gtk-module.sh
│       ├── 50-systemd-user.sh
│       └── 80xapp-gtk3-module.sh
└── xorg.conf.d

No unwanted .conf files that might possibly mess up Xorg are there.

Also upon checking "/usr/share/X11/xorg.conf.d":

├── 10-nvidia-drm-outputclass.conf
├── 10-quirks.conf
└── 40-libinput.conf

The first file "10-nvidia-drm-outputclass.conf", which upon running "pacman -Ql | grep 10-nvidia-drm-outputclass.conf" seems to be from the package "nvidia-470xx-utils" which is intended, its contents are as follows:

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    ModulePath "/usr/lib/nvidia/xorg"
    ModulePath "/usr/lib/xorg/modules"
EndSection

Nothing looks out of place... The "10-quirks.conf" file has nothing to do with the GPUs.

The following directory "/etc/modules-load.d" is empty, while the following "/usr/lib/modules-load.d" includes an "nvidia-470xx-utils.conf" which has a single line "nvidia-uvm" inside it, apparently to load that one module.

The following directory "/etc/modprobe.d" is empty, while the following "/usr/lib/modprobe.d" includes a "bumblebee.conf" and another "nvidia-470xx-utils.conf". The "bumblebee.conf" file includes:

blacklist nvidia
blacklist nvidia-drm
blacklist nvidia-modeset
blacklist nvidia-uvm
blacklist nouveau

Which apparently blacklists everything, and allows with bbswitch to fully turn off the card which is a behavior that I want, keep in mind that I didn't modify any of this, and the latter "nvidia-470xx-utils.conf" also blacklists nouveau, so that's two files blacklisting the same built-in kernel driver.

Upon running "lsmod" after boot, I found no trace of any nvidia or nouveau module. I also found "i915" which is the integrated card's driver (or i965, having xf86-video-intel installed as well (it still didn't work with or without this)), and "bbswitch" which appears to be working as intended.

Having said the above, I would expect no problems, but no... I'm facing all sorts of weird problems from wrong DISPLAY, to the card not running due to it not having enough priviledges for a separate Xorg session, to the card segfaulting when running and Xorg freezing...

Running "optirun glxinfo" yields the following:

[  778.340955] [ERROR]Cannot access secondary GPU - error: [XORG] (EE)

[  778.340984] [ERROR]Aborting because fallback start is disabled.

Running "optirun -vvv glxinfo" shows that I'm apparently missing the "hostname" executable because "virtualgl" requires it, and the "/var/run/acpid.socket" apparently, so I installed "inetutils" as it includes "hostname", and "acpid" (and I have both "bumblebeed" and "acpid" services enabled and running).

The system is then stuck in this state where "/proc/acpi/bbswitch" is always ON ("0000:01:00.0 ON"), and the card can't be shut down after that, and then Xorg proceeds to freeze...

Here are the requested logs:
- Xorg.8.log: https://dpaste.org/yeAVv
- Xorg.1.log: https://dpaste.org/dkGBQ
- Xorg.0.log: https://dpaste.org/niz4j

I even tried to deal with the PCI ACPI errors by appending:

"acpi_osi=!Windows\x202013" acpi_osi=Linux nogpumanager i915.enable_hd_vgaarb=1 enable_hd_vgaarb=1"

to the kernel cmdline, to no avail.

Let me know your thoughts, and hopefully I can resolve this soon...

Last edited by ualkyire (2022-04-18 13:06:19)

Offline

#27 2022-04-17 20:37:41

seth
Member
Registered: 2012-09-03
Posts: 50,012

Re: NVIDIA Optimus isn't working for 470xx

Please use code tags for file contents and shell I/O for better readability, https://bbs.archlinux.org/help.php#bbcode

[  4227.384] (==) Log file: "/var/log/Xorg.1.log", Time: Mon Feb  7 22:47:28 2022

- dated, irrelevant

[    67.447] (==) Log file: "/var/log/Xorg.0.log", Time: Sun Apr 17 18:54:10 2022

- Runs on the intel chip and is from today

[   839.861] (==) Log file: "/var/log/Xorg.8.log", Time: Sun Apr 17 18:34:50 2022

- bumblebee nvidia X11 server. Looks fine.
There's

[   862.332] (EE) NVIDIA(GPU-0): WAIT (2, 8, 0x8000, 0x00000bec, 0x00000bf4)
[   869.332] (EE) NVIDIA(GPU-0): WAIT (1, 8, 0x8000, 0x00000bec, 0x00000bf4)
[   840.005] (WW) NVIDIA: No DRM device: Direct render devices found but none could be
[   840.005] (WW) NVIDIA:     used.

https://wiki.archlinux.org/title/NVIDIA … de_setting
Furthermore check the system journal, since this is a kernel module issue but also post the output of "/etc/bumblebee/xorg.conf.nvidia" in case there're suspicious options, skip primus for the moment and last but not least remove xf86-video-intel to operate on the modesetting driver.


Sidebar:

I'm facing all sorts of weird problems from wrong DISPLAY, to the card not running due to it not having enough priviledges for a separate Xorg session, to the card segfaulting when running and Xorg freezing...
Running "optirun -vvv glxinfo" shows that I'm apparently missing the "hostname" executable because "virtualgl" requires it, and the "/var/run/acpid.socket" apparently

Don't paraphrase, post the actual commands and outputs: https://bbs.archlinux.org/viewtopic.php?id=57855

Offline

#28 2022-04-18 13:15:39

ualkyire
Member
Registered: 2022-02-05
Posts: 42

Re: NVIDIA Optimus isn't working for 470xx

seth wrote:

Please use code tags for file contents and shell I/O for better readability

Done.

seth wrote:

- dated, irrelevant

I see, so Xorg.1.log isn't what we need.

seth wrote:

- Runs on the intel chip and is from today

And Xorg.0.log is for the intel card, and we don't want that now.

seth wrote:

- bumblebee nvidia X11 server. Looks fine.

Which leave us with Xorg.8.log for the nvidia card and apparently it's looking fine.

The output of "/etc/bumblebee/xorg.conf.nvidia" is:

Section "ServerLayout"
    Identifier  "Layout0"
    Option      "AutoAddDevices" "true"
    Option      "AutoAddGPU" "true"
EndSection

Section "Device"
    Identifier  "DiscreteNvidia"
    Driver      "nvidia"
    VendorName  "NVIDIA Corporation"
    BusID "PCI:01:00:0"
    Option "ProbeAllGpus" "true"

    Option "NoLogo" "true"
    Option "UseEDID" "true"
    # Option "UseDisplayDevice" "none"
EndSection

I'll be testing the kernel parameter "nvidia-drm.modeset=1" and I'll remove "xf86-video-intel" and test once again.

Last edited by ualkyire (2022-04-18 13:33:32)

Offline

#29 2022-04-18 13:20:43

seth
Member
Registered: 2012-09-03
Posts: 50,012

Re: NVIDIA Optimus isn't working for 470xx

The posted /etc/bumblebee/xorg.conf.nvidia is invalid - but I suspect that's just your post?

Offline

#30 2022-04-18 13:34:14

ualkyire
Member
Registered: 2022-02-05
Posts: 42

Re: NVIDIA Optimus isn't working for 470xx

Yea it's from my post, as I dropped the "EndSection" from copying by mistake..

Offline

#31 2022-04-18 13:36:58

ualkyire
Member
Registered: 2022-02-05
Posts: 42

Re: NVIDIA Optimus isn't working for 470xx

seth wrote:

Don't paraphrase, post the actual commands and outputs

Ok with "nvidia-drm.modeset=1" and with "xf86-video-intel" installed, running "optirun -vvv glxgears" yields:

[  316.369958] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[  316.370056] [INFO]Configured driver: nvidia
[  316.370199] [DEBUG]optirun version 3.2.1 starting...
[  316.370207] [DEBUG]Active configuration:
[  316.370210] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[  316.370213] [DEBUG] X display: :8
[  316.370219] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia:/usr/lib32/nvidia:/usr/lib:/usr/lib32
[  316.370223] [DEBUG] Socket path: /var/run/bumblebee.socket
[  316.370229] [DEBUG] Accel/display bridge: auto
[  316.370231] [DEBUG] VGL Compression: proxy
[  316.370235] [DEBUG] VGLrun extra options:
[  316.370237] [DEBUG] Primus LD Path: /usr/lib/primus:/usr/lib32/primus
[  316.370297] [DEBUG]Using auto-detected bridge virtualgl
[  328.079439] [INFO]Response: No - error: [XORG] (EE)

[  328.079462] [ERROR]Cannot access secondary GPU - error: [XORG] (EE)

[  328.079470] [DEBUG]Socket closed.
[  328.079489] [ERROR]Aborting because fallback start is disabled.
[  328.079495] [DEBUG]Killing all remaining processes.

Offline

#32 2022-04-18 13:38:32

seth
Member
Registered: 2012-09-03
Posts: 50,012

Re: NVIDIA Optimus isn't working for 470xx

seth wrote:

skip primus for the moment

Offline

#33 2022-04-18 14:31:38

ualkyire
Member
Registered: 2022-02-05
Posts: 42

Re: NVIDIA Optimus isn't working for 470xx

seth wrote:

skip primus for the moment

I did that, I ran "optirun -b virtualgl -vvv glxgears":

[  342.030400] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[  342.030478] [INFO]Configured driver: nvidia
[  342.030607] [DEBUG]optirun version 3.2.1 starting...
[  342.030616] [DEBUG]Active configuration:
[  342.030619] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[  342.030622] [DEBUG] X display: :8
[  342.030625] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia:/usr/lib32/nvidia:/usr/lib:/usr/lib32
[  342.030629] [DEBUG] Socket path: /var/run/bumblebee.socket
[  342.030632] [DEBUG] Accel/display bridge: virtualgl
[  342.030636] [DEBUG] VGL Compression: proxy
[  342.030640] [DEBUG] VGLrun extra options:
[  342.030644] [DEBUG] Primus LD Path: /usr/lib/primus:/usr/lib32/primus
[  358.830378] [INFO]Response: No - error: [XORG] (EE) NVIDIA(GPU-0): WAIT (2, 8, 0x8000, 0x00000004, 0x000009bc)

[  358.830393] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) NVIDIA(GPU-0): WAIT (2, 8, 0x8000, 0x00000004, 0x000009bc)

[  358.830397] [DEBUG]Socket closed.
[  358.830416] [ERROR]Aborting because fallback start is disabled.
[  358.830424] [DEBUG]Killing all remaining processes.

There are three bridge options, "auto", "virtualgl" and "primus", the default is "auto" and I manually specified "-b virtualgl" to ensure that bridge is chosen, still it's not working.

Offline

#34 2022-04-18 14:56:42

seth
Member
Registered: 2012-09-03
Posts: 50,012

Re: NVIDIA Optimus isn't working for 470xx

Can you explicitly bbswitch power up the nvidia GPU and then run optirun (and then bbswitch it down)?

Offline

#35 2022-04-18 19:32:24

ualkyire
Member
Registered: 2022-02-05
Posts: 42

Re: NVIDIA Optimus isn't working for 470xx

Ok at least we're getting somewhere, I manually echoed "ON" to "/proc/acpi/bbswitch" and then ran "modprobe nvidia nvidia-uvm nvidia-drm" and then ran "optirun -b virtualgl -vvv glxgears", and I got the following:

[ 9371.582500] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[ 9371.582601] [INFO]Configured driver: nvidia
[ 9371.582812] [DEBUG]optirun version 3.2.1 starting...
[ 9371.582837] [DEBUG]Active configuration:
[ 9371.582842] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 9371.582864] [DEBUG] X display: :8
[ 9371.582868] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia:/usr/lib32/nvidia:/usr/lib:/usr/lib32
[ 9371.582875] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 9371.582881] [DEBUG] Accel/display bridge: virtualgl
[ 9371.582888] [DEBUG] VGL Compression: proxy
[ 9371.582894] [DEBUG] VGLrun extra options:
[ 9371.582900] [DEBUG] Primus LD Path: /usr/lib/primus:/usr/lib32/primus
[ 9373.085466] [INFO]Response: Yes. X is active.

[ 9373.085480] [INFO]Running application using virtualgl.

"glxgears" is entirely black though (no spinning gears are shown) and I'm not getting any "fps" reported to the terminal output, also running it for a while causes my laptop to lag like crazy and eventually freeze.

Offline

#36 2022-04-21 20:15:07

ualkyire
Member
Registered: 2022-02-05
Posts: 42

Re: NVIDIA Optimus isn't working for 470xx

Ok so I did a check and the latest supported driver for gt 730m is the 418 which means the 390xx is the closest and 470xx won't work.

I switched to 390xx to no avail...

Offline

#37 2022-04-21 20:24:16

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,431

Re: NVIDIA Optimus isn't working for 470xx

That's not the case here, there are multiple versions of the 730m and your card is Kepler which is supported by 470xx. (As shown by the fact you are getting as far as you get, it would fail earlier and more unmistakably if it was an issue of the driver actually refusing to drive your card)

I can't really tell why you're having such a poor experience now, maybe you really just have bad luck and there's an issue with this with that specific card.

Offline

#38 2022-04-21 20:39:56

seth
Member
Registered: 2012-09-03
Posts: 50,012

Re: NVIDIA Optimus isn't working for 470xx

"glxgears" is entirely black though (no spinning gears are shown) and I'm not getting any "fps" reported to the terminal output, also running it for a while causes my laptop to lag like crazy and eventually freeze.

[    69.079] (EE) AIGLX error: dlopen of /usr/lib/dri/i965_dri.so failed (/usr/lib/dri/i965_dri.so: cannot open shared object file: No such file or directory)
[    69.079] (EE) AIGLX error: unable to load driver i965
[    72.126] (II) IGLX: Loaded and initialized swrast
[    72.126] (II) GLX: Initialized DRISWRAST GL provider for screen 0

The issue might simply and entirely be on the intel side. For a wild shot, try replacing mesa w/ https://archlinux.org/packages/extra/x86_64/mesa-amber/

Offline

#39 2022-04-21 21:08:49

ualkyire
Member
Registered: 2022-02-05
Posts: 42

Re: NVIDIA Optimus isn't working for 470xx

Apparently bumblebee requires mesa-libgl which isn't provided by mesa-amber sad

Offline

#40 2022-04-21 21:12:53

seth
Member
Registered: 2012-09-03
Posts: 50,012

Re: NVIDIA Optimus isn't working for 470xx

pacman … --assume-installed mesa-libgl=21.3.8 …

Offline

#41 2022-04-21 21:36:31

ualkyire
Member
Registered: 2022-02-05
Posts: 42

Re: NVIDIA Optimus isn't working for 470xx

Ok my DE crashed (KDE) and kwin_x11 stopped working when I switched to mesa-amber and assumed mesa-libgl is installed for bumblebee...

Offline

#42 2022-04-22 08:17:42

ualkyire
Member
Registered: 2022-02-05
Posts: 42

Re: NVIDIA Optimus isn't working for 470xx

Just double checked from NVIDIA's drivers website, the regular Gefore GT 730 for desktops is supported by the 470xx, but the mobile notebook version 730M isn't even listed for the 470xx, while it's clearly listed in the 390xx version.

- https://www.nvidia.com/Download/driverR … 4603/en-us
- https://www.nvidia.com/download/driverR … 6016/en-us

Last edited by ualkyire (2022-04-22 08:18:43)

Offline

#43 2022-04-22 10:22:18

ualkyire
Member
Registered: 2022-02-05
Posts: 42

Re: NVIDIA Optimus isn't working for 470xx

This is weird, looking each driver's supported list of GPUs shows that the 470.xx doesn't support the 730M, and that the 390.xx supports it.

While when checking the 510.60.02 driver's supported devices:

https://download.nvidia.com/XFree86/Lin … chips.html

it shows below that support for the 730M was moved into the 470.xx ...

sigh this is confusing...

Offline

#44 2022-04-22 10:28:40

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,431

Re: NVIDIA Optimus isn't working for 470xx

The website often does not do a good job between differentiating between the versions of the "same" GPU. From your lspci output  the actual codename is GK208M the K here denotes this is a Kepler GPU which is supported by 470xx.

For the mesa-amber issue, you might have to explicitly export  __GLX_VENDOR_LIBRARY_NAME=amber in /etc/profile or so (... though I don't know what kind of effect this would have on bumblebees ability to pick the nvidia GPU as well) it sadly is quite a messy situation currently.

Last edited by V1del (2022-04-22 10:30:55)

Offline

#45 2022-04-22 10:35:01

ualkyire
Member
Registered: 2022-02-05
Posts: 42

Re: NVIDIA Optimus isn't working for 470xx

Ok, I decided to ditch bumblebee altogether, and I've removed all of the messy configurations that I had and ensured that everything is clean.

I want to start by checking the official PRIME method, as I just want the card to work and I no longer care about battery life as the lap will be always plugged in.

Note, I want to use the two cards, the integrated card will drive the display while the NVIDIA card will always be on and will be used via PRIME, as I don't plan on running everything on the NVIDIA card alone while keeping the integrated card unused.

Offline

#46 2022-04-22 12:30:59

ualkyire
Member
Registered: 2022-02-05
Posts: 42

Re: NVIDIA Optimus isn't working for 470xx

Ok, great we're getting somewhere now.

Apparently mesa-amber is the way to go as mesa 22 dropped support for i915 and i965... Sigh...

I added "__GLX_VENDOR_LIBRARY_NAME=amber" to "/etc/profile" and KDE started successfully!

I have stumbled across another problem that I still wasn't able to solve (regardless of amber), when running glxinfo/glxgears (with or without prime-run) I'm receiving:

name of display: :0
Error: couldn't find RGB GLX visual or fbconfig

I still don't have any Xorg configuration generated or edited yet (didn't run nvidia-xconfig yet).

Last edited by ualkyire (2022-04-22 12:31:45)

Offline

#47 2022-04-22 12:49:02

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,431

Re: NVIDIA Optimus isn't working for 470xx

That's somewhat what I was expecting. What happens if you do

__GLX_VENDOR_LIBRARY_NAME=nvidia prime-run glxinfo -B

? It's a bit weird that all of this is even needed, normally glvnd should logically handle this correctly. (... And don't even think about running nvidia-xconfig, it does not and will not help in this situation)

Last edited by V1del (2022-04-22 12:49:40)

Offline

#48 2022-04-22 12:53:01

ualkyire
Member
Registered: 2022-02-05
Posts: 42

Re: NVIDIA Optimus isn't working for 470xx

Ok cool.

Running any of the following:

glxinfo -B
__GLX_VENDOR_LIBRARY_NAME=amber glxinfo -B
__GLX_VENDOR_LIBRARY_NAME=nvidia prime-run glxinfo -B
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia prime-run glxinfo -B

yields the same error message:

name of display: :0
Xlib:  extension "GLX" missing on display ":0".
Xlib:  extension "GLX" missing on display ":0".
Xlib:  extension "GLX" missing on display ":0".
Xlib:  extension "GLX" missing on display ":0".
Xlib:  extension "GLX" missing on display ":0".
Xlib:  extension "GLX" missing on display ":0".
Xlib:  extension "GLX" missing on display ":0".
Error: couldn't find RGB GLX visual or fbconfig
Xlib:  extension "GLX" missing on display ":0".
Xlib:  extension "GLX" missing on display ":0".

Xlib:  extension "GLX" missing on display ":0".

It seems that this isn't either card's fault, the fact that both with and without PRIME I'm getting the same error.

EDIT: The Xorg logs are looking much better now after I switched to mesa-amber and started using PRIME, would they be of interest again?

Last edited by ualkyire (2022-04-22 12:57:36)

Offline

#49 2022-04-22 13:55:24

ualkyire
Member
Registered: 2022-02-05
Posts: 42

Re: NVIDIA Optimus isn't working for 470xx

I'm now wondering for my integrated graphics card as well HD 4400 which is better? mesa's 22 new iris or crocus or mesa-amber's i915 or i965?

Last edited by ualkyire (2022-04-22 13:57:59)

Offline

#50 2022-04-22 14:11:23

seth
Member
Registered: 2012-09-03
Posts: 50,012

Re: NVIDIA Optimus isn't working for 470xx

crocus is claimed to be more performant, but if it doesn't work and drops you w/ the software rasterizer, that's moot.

Xlib:  extension "GLX" missing on display ":0".

doesn't look good either - if that's still a thing, please post an updated xorg log.

Offline

Board footer

Powered by FluxBB