You are not logged in.

#1 2022-02-05 19:20:08

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

NVIDIA Optimus isn't working for 470xx

Hi,

I have a laptop with both an integrated graphics card (Intel HD 4400) and a dedicated NVIDIA graphics card (GT 730M) and I can't seem to get optimus to work regardless of what I'm doing.

In the past I used to use bumblebee and bbswitch which worked fine, the card was powered off when not in use, and using optirun/primusrun enabled me to power on the card to use it for more GPU demanding software.

I then switched to nvidia-xrun with bbswitch, and it worked perfectly. I could have the card powered off, then I would switch to a different TTY and launch `nvidia-xrun openbox` to launch openbox on the dedicated card and get all the performance out of the card, and when I'm done, the card would be shut off.

But now nothing seems to work (except for bbswitch which is turning off the card after boot):
- bumblebee doesn't work, both optirun and primusrun don't work with 470xx
- nvidia-xrun doesn't work, I'm getting a black screen after starting openbox and the screen just freezes with weird graphical glitches on it (apparently it seems to be an error with Xorg configuration according to the aur package.

I know Xorg is supposed to automagically figure out the correct configuration, but I have my doubts here as my card's architecture support was dropped recently and moved to the AUR (470xx), and bumblebee is dead, and I don't know what's wrong with nvidia-xrun.

What could be the problem?

Offline

#2 2022-02-06 13:36:30

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

Re: NVIDIA Optimus isn't working for 470xx

Nothing in the way optimus is working has changed for 470xx to what it used to do, in a general sense, potential actual driver bugs non withstanding.

Is the nvidia kernel module even installed properly? Assuming you opted for the 470xx-dkms packages you need to have linux-headers for your kernel installed so that the kernel module can be built.

For the buggy nvidia-xrun config you can replace it with the correctly working one from the wiki: https://wiki.archlinux.org/title/NVIDIA … phics_only

If this doesn't already clear things up post

pacman -Qs nvida
pacman -Q linux linux-headers
sudo dkms status

Offline

#3 2022-02-07 19:47:36

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

Re: NVIDIA Optimus isn't working for 470xx

Yes, I actually opted for `nvidia-470xx-dkms`, and I tried the configuration from the wiki but it doesn't seem to be working for me...

`pacman -Qs nvidia` shows that the following are available:
- egl-wayland
- lib32-nvidia-470xx-utils
- libvdpau
- libxnvctrl-470xx
- nvidia-470xx-dkms
- nvidia-470xx-settings
- nvidia-470xx-utils
- nvidia-xrun

`pacman -Q linux linux-headers` is showing that both linux and linux-headers are installed and up to date.

`sudo dkms status` shows that nvidia 470 is installed as dkms.

Offline

#4 2022-02-07 20:21:59

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

Re: NVIDIA Optimus isn't working for 470xx

The xorg log from a nvidia-xrun run attempt?

Offline

#5 2022-02-07 21:21:28

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

Re: NVIDIA Optimus isn't working for 470xx

Here's the Xorg.1.log, and here's an image showing what's happening after I attempt an `nvidia-xrun openbox`.

Offline

#6 2022-02-23 21:05:54

vegna
Member
Registered: 2022-02-23
Posts: 4

Re: NVIDIA Optimus isn't working for 470xx

I've just installed nvidia optimus in a laptop shipped with Intel HD 4600 and a dedicated NVIDIA graphics card GT 740M.
Are you sure that you've done these passages?
1- Installed nvidia-470xx-dkms eliminating old libraries otherwise it doesn't install anything
2- dkms and headers
3- optimus-manager
4- systemctl start optimus-manager.service
5-Reboot

Offline

#7 2022-02-26 13:07:08

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

Re: NVIDIA Optimus isn't working for 470xx

Ok, I followed your instructions, while removing `bbswitch` and `nvidia-xrun` and installing `optimus-manager` and cleaning up old files from the previous two packages.

I'm able to run some applications on my dedicated card but not all of them, and it's rather very clunky as the card stays "ON" all the time.

Can you provide your configuration file for `optimus-manager` (/etc/optimus-manager/optimus-manager.conf) and what switching method are you using to make it work? bbswitch? acpi_call? none?

Offline

#8 2022-02-28 13:23:49

vegna
Member
Registered: 2022-02-23
Posts: 4

Re: NVIDIA Optimus isn't working for 470xx

[amd]
DRI=3
driver=modesetting
tearfree=

[intel]
DRI=3
accel=
driver=modesetting
modeset=yes
tearfree=

[nvidia]
DPI=96
PAT=yes
allow_external_gpus=no
dynamic_power_management=no
ignore_abi=no
modeset=yes
options=overclocking

[optimus]
auto_logout=yes
pci_power_control=no
pci_remove=no
pci_reset=no
startup_auto_battery_mode=integrated
startup_auto_extpower_mode=nvidia
startup_mode=integrated
switching=none

Right now I'm using mesa+ nouveau without switching off the nvidia card (I will perform a more granular configuration when I'll have time).
I switch to Nvidia or Nvidia-Hybrid using optimus-manager-qt package, you can simply download it from AUR and it's behaviour it's described on the github page of optimus-manager.
When in mesa+nouveau the command used to run octave on Nvidia is:

 DRI_PRIME=1 octave --gui 

On hybrid mode:

 __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME="nvidia" __VK_LAYER_NV_optimus="NVIDIA_only" octave --gui 

Offline

#9 2022-02-28 13:40:41

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

Re: NVIDIA Optimus isn't working for 470xx

Thanks! I wonder if I could use "hybrid" mode as I don't think it'll work on older hardware (if I understood correctly).

I'm waiting for your granular configuration that will possibly use a "switching" tool to turn the card "OFF" when not in use, or at least provide two modes for starting the laptop, one with integrated only and the other with "NVIDIA" only.

Offline

#10 2022-02-28 15:38:31

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

Re: NVIDIA Optimus isn't working for 470xx

Hybrid mode always works, what "doesn't" is deep sleep power saving, so while the dedicated card is not in use with hybrid mode it's possible it consumes more power than necessary, though I have yet to see actual numbers comparing that (which reminds me I've always wanted to test that but haven't been using my laptop much during lockdown, might have to get back to that someday).

FWIW I currently use standard bumblebee and bbswitch, and while bbswitch throws some scary messages that it's unable to put the GPU to sleep, actual power draw as measured by powertop stays in a totally expected and normal 7~ watt range.

Offline

#11 2022-03-05 10:06:34

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

Re: NVIDIA Optimus isn't working for 470xx

Ok so I tried a couple of things:

- integrated mode alone with bbswitch is working fine for fully powering off the card when not in use (which is something I want)
- nvidia mode most of the times chuckles when starting actual GUI apps with "prime-run" or the flags above " __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME="nvidia" __VK_LAYER_NV_optimus="NVIDIA_only"", but funnily enough `glxinfo` from the terminal works and shows that nvidia is being used even when `glxgears` refuses to show spinning gears when run...
- hybrid mode works same as above

I tried setting switching to none (after testing it with bbswitch), and same results.

This is a big step forward from where I was, but it's still not what I want as I want to run full gui apps on the nvidia card.

I'm positive that it has to do with the optimus-manager configuration, which is why I'm hoping someone will post a working configuration with the behavior I need.

Thanks!

Offline

#12 2022-03-05 10:22:19

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

Re: NVIDIA Optimus isn't working for 470xx

What does "chuckle" mean? If you're on nvidia mode there's no need for prime-run, everything should run on the nvidia card anyway. Note this is not the newest and generally not the best HW in the first place so depending on what you might want to do exactly you shouldn't expect any wonders.

Last edited by V1del (2022-03-05 10:44:30)

Offline

#13 2022-03-05 16:21:20

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

Re: NVIDIA Optimus isn't working for 470xx

What I meant by "chuckle" is not working properly or as intended or as it used to work before. I understand that the card itself isn't that powerful, but that's a different topic. I can't go from running glxgears from within openbox (being run by nvidia-xrun) and getting at least 13k to 15k fps (with vsync disabled), to barely getting 3-5k with it being choppy or not displaying at all or getting segmentation faults everywhere...

Offline

#14 2022-03-17 09:38:50

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

Re: NVIDIA Optimus isn't working for 470xx

I tried using "hybrid" but it didn't work. I'm still unable to use the dedicated card without segmentation faults.

Does anyone have a working configuration that they can post?

Offline

#15 2022-03-17 10:08:03

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

Re: NVIDIA Optimus isn't working for 470xx

From a xorg perspective, this config will work: https://wiki.archlinux.org/title/NVIDIA … phics_only and you should be able to replace the config nvidia-xrun uses with that. But you should definitely test behaviour of following this method properly before trying to use optimus-manager and the like. If this config doesn't work for any reason then you can't do anything to make it better with optimus-manager or nvidia-xrun. Repost your xorg logs if it doesn't.

Last edited by V1del (2022-03-17 10:12:13)

Offline

#16 2022-03-17 10:51:44

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

Re: NVIDIA Optimus isn't working for 470xx

I see, so this configuration is the same for xorg to allow me to use the dedicated graphics card as the main card, regardless if I'm using optimus-manager or nvidia-xrun.

I'll try it out and report back. Thanks.

Offline

#17 2022-04-15 10:54:37

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

Re: NVIDIA Optimus isn't working for 470xx

Unfortunately that didn't work... I even switched DEs and I'm still getting the same behavior. I'm even thinking of ditching Arch altogether because it dropped support for the 470 cards...

Any ideas?

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

Offline

#18 2022-04-15 11:11:31

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,925

Re: NVIDIA Optimus isn't working for 470xx

I'm even thinking of ditching Arch alltogether because it dropped support for the 470 cards...

Archlinux followed the same policy wrt nvidia drivers it has for years i.e. provide nvidia's latest driver.

The decision to release newer drivers is made by nvidia.

Last week I updated my laptop from 2007 that uses an amd video chipset from the r300 family.
It still works fine with latest mesa & kernel (although you need a lot of patience).

Please put the blame where it should be.

Any ideas?

Have you tried to use https://archlinux.org/packages/extra/any/nvidia-prime/ ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#19 2022-04-15 11:20:38

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

Re: NVIDIA Optimus isn't working for 470xx

I tried prime to no avail.

The thing is it was working just fine before the 470 split happened. I'm thinking it might be from the "optimus" packages (be it in the official repos or in the aur) being configured to work with `nvidia` instead of `nvidia-470xx`.

It would also be logical to assume that my card might be broken, but that's a bit unlikely given that it stopped working immediately after the update.

Offline

#20 2022-04-15 11:47:05

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

Re: NVIDIA Optimus isn't working for 470xx

None of these solutions should inherently care about your driver version, they just set up xorg in a specific way, something that did indeed change but that was with xorg 1.21 is that it's more strict in which kind of configurations it allows, which is why you manually need to replace the config nvidia-xrun uses with what the wiki provides, since that is a correct xorg.conf. What's your situation now? Can you post some actable "not working" information? After failure to start xorg mention which method you tried and post the outputs of

cat /var/log/Xorg.0.log #And or any other xorg logs present there or under ~/.local/share/xorg/Xorg.0.log if you had user mode logins
sudo journalctl -b

Last edited by V1del (2022-04-15 11:55:25)

Offline

#21 2022-04-16 17:29:16

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

Re: NVIDIA Optimus isn't working for 470xx

Thanks for your help.

Ok I've decided to try this on a fresh new install, what packages should I install if I wanted to get a bumblebee like functionality (turn the dedicated card off when I'm not using it, preferably using bbswitch because it fully turns off my card, and run everything on the integrated card, then turn the dedicated card on whenever I want to use it (doesn't matter if it's in a separate Xorg session or not)).

Offline

#22 2022-04-16 19:48:12

seth
Member
Registered: 2012-09-03
Posts: 51,317

Re: NVIDIA Optimus isn't working for 470xx

The exact same ones you had before, except that you substitute the nvidia packages for the 470xx ones.
There's no need for "a bumblebee like functionality" because you can just use bumblebee.

Arch […] dropped support for the 470 cards

The thing is it was working just fine before the 470 split happened.

You're currently operating based on false assumptions (ex falso…)
The 470xx driver was stalled into legacy mode by nvidia; you kept using what you had been using and just won't get support of the newer driver versions.
The "naughty" thing is that you've to build and maintain them from the AUR and I strongly suspect that is where things fell off a cliff.

So don't turn this into a goose chase by creating moving targets.
What this thread needs isn't a "re-installation" where you'll likely just repeat the same mistakes but some hard data to operate on.
=> Post the outputs V1del asked for and also "glxinfo -B" on what you believe to be "I run this on nvidia" .

And also maybe relevant:

I'm still unable to use the dedicated card without segmentation faults.

So maybe post a backtrace for such case.

Online

#23 2022-04-17 10:33:59

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

Re: NVIDIA Optimus isn't working for 470xx

I wish I could still use bumblebee.

Running "pacman -S bumblebee" prompts me with 2 providers, one with opencl-mesa and one with opencl-nvidia; the latter apparently is for the 510 driver, should I install the one with opencl-mesa then grab "opencl-nvidia-470xx" from the AUR?

Offline

#24 2022-04-17 10:43:49

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,925

Re: NVIDIA Optimus isn't working for 470xx

bumblebee depends on virtualgl which depends on opencl-driver .

opencl-nvidia-470xx does also provide opencl-driver , just install it before bumblebee / virtualgl .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#25 2022-04-17 10:44:56

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

Re: NVIDIA Optimus isn't working for 470xx

Apparently installing "opencl-nvidia-470xx" before bumblebee solves this. Ima test things out first, and report back smile

Offline

Board footer

Powered by FluxBB