You are not logged in.

#1 2021-02-21 05:30:38

callmer
Member
Registered: 2021-01-07
Posts: 80

can't switch to nvidia with optimus-manager

Hi everybody. I faced very strange behaviour. I know that after switching to nvidia I have to log out and log in again to apply it, as it is said in a message

A GPU switch from intel to nvidia is pending.
Log out and log back in to apply.

Current GPU mode : intel

But, after I interrupted i3 session and exited from tty then logged in again, the message is still the same. I tried to log in via another tty too, but no result. After reboot mode is still on intel, but pending is aborted and I have to switch again. any ideas?

Offline

#2 2021-02-21 11:11:58

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

Re: can't switch to nvidia with optimus-manager

There are special considerations if you just use startx without a display manager: https://github.com/Askannz/optimus-mana … x-or-xinit

Last edited by V1del (2021-02-21 11:12:39)

Offline

#3 2021-02-21 23:51:41

fistrosan
Member
Registered: 2020-04-01
Posts: 168

Re: can't switch to nvidia with optimus-manager

If you get to i3 using startx then you can try adding the following two lines to your .xinitrc:

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

And see if you can now switch between nvidia and intel using optimus-manager.

See also: https://bbs.archlinux.org/viewtopic.php?id=248998 and https://bbs.archlinux.org/viewtopic.php?id=261129

Offline

#4 2021-02-22 09:52:49

callmer
Member
Registered: 2021-01-07
Posts: 80

Re: can't switch to nvidia with optimus-manager

V1del wrote:

There are special considerations if you just use startx without a display manager: https://github.com/Askannz/optimus-mana … x-or-xinit

yes, I read it, it allows me to use optimus manager, otherwise I was getting error. Now It is visible, but it didn't switch.

Offline

#5 2021-02-22 10:03:43

callmer
Member
Registered: 2021-01-07
Posts: 80

Re: can't switch to nvidia with optimus-manager

fistrosan wrote:

If you get to i3 using startx then you can try adding the following two lines to your .xinitrc:

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

And see if you can now switch between nvidia and intel using optimus-manager.

See also: https://bbs.archlinux.org/viewtopic.php?id=248998 and https://bbs.archlinux.org/viewtopic.php?id=261129

I added it, no result. I tried to do this straight from the emulator and got this.

xrandr --setprovideroutputsource modesetting NVIDIA-0
Could not find provider with name NVIDIA-0

Maybe that's matters.`

Offline

#6 2021-02-22 10:27:10

fistrosan
Member
Registered: 2020-04-01
Posts: 168

Re: can't switch to nvidia with optimus-manager

callmer wrote:

Maybe that's matters.`

It might. What is the output of

lspci -k | grep -A 2 -E "(VGA|3D)"

Offline

#7 2021-02-22 13:53:55

callmer
Member
Registered: 2021-01-07
Posts: 80

Re: can't switch to nvidia with optimus-manager

fistrosan wrote:
callmer wrote:

Maybe that's matters.`

It might. What is the output of

lspci -k | grep -A 2 -E "(VGA|3D)"
lspci -k | grep -A 2 -E "(VGA|3D)"
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 630 (Mobile)
	DeviceName: Second VGA
	Subsystem: ASUSTeK Computer Inc. Device 106f
	Kernel driver in use: i915
--
01:00.0 VGA compatible controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] (rev a1)
	DeviceName: VGA
	Subsystem: ASUSTeK Computer Inc. Device 106f
	Kernel modules: nouveau, nvidia_drm, nvidia

Offline

#8 2021-02-22 18:18:47

fistrosan
Member
Registered: 2020-04-01
Posts: 168

Re: can't switch to nvidia with optimus-manager

Yup, as you can see your Intel Graphics is using the i915 kernel module. However you do not have a module loaded for NVIDIA and so the output just tells you which one you have available for you to use.

Try:

sudo modprobe nvidia -vv

and then again

lspci -k | grep -A 2 -E "(VGA|3D)"

to make sure that the kernel is using the nvidia module. Then you should probably reboot and repeat the lscpi command to make sure is being loaded during boot. If it is then try:

xrandr --listproviders

and if NVIDIA-0 is listed then you can try adding the two lines I mentioned originally in the .xinitrc. Hopefully that will get it done (?)

Offline

#9 2021-02-22 22:15:17

seth
Member
Registered: 2012-09-03
Posts: 49,967

Re: can't switch to nvidia with optimus-manager

callmer wrote:

yes, I read it, it allows me to use optimus manager, otherwise I was getting error. Now It is visible, but it didn't switch.

What?
The link says you got to run some stuff after the session in order to apply the change and this only happens automagically for SDDM, LightDM (and probably GDM rather than SDDM again)

Offline

#10 2021-02-23 06:25:59

callmer
Member
Registered: 2021-01-07
Posts: 80

Re: can't switch to nvidia with optimus-manager

seth wrote:
callmer wrote:

yes, I read it, it allows me to use optimus manager, otherwise I was getting error. Now It is visible, but it didn't switch.

What?
The link says you got to run some stuff after the session in order to apply the change and this only happens automagically for SDDM, LightDM (and probably GDM rather than SDDM again)

Yes I meant I did it it's about

sudo /usr/bin/prime-offload
sudo /usr/bin/prime-switch

It's not the reason of the problem.

Offline

#11 2021-02-23 07:00:13

callmer
Member
Registered: 2021-01-07
Posts: 80

Re: can't switch to nvidia with optimus-manager

fistrosan wrote:

Yup, as you can see your Intel Graphics is using the i915 kernel module. However you do not have a module loaded for NVIDIA and so the output just tells you which one you have available for you to use.

Try:

sudo modprobe nvidia -vv

and then again

lspci -k | grep -A 2 -E "(VGA|3D)"

to make sure that the kernel is using the nvidia module. Then you should probably reboot and repeat the lscpi command to make sure is being loaded during boot. If it is then try:

xrandr --listproviders

and if NVIDIA-0 is listed then you can try adding the two lines I mentioned originally in the .xinitrc. Hopefully that will get it done (?)

unfortunately it is not, the output is the same

sudo modprobe nvidia -vv
[sudo] password for ararat: 
modprobe: INFO: custom logging function 0x5575306192c0 registered
insmod /lib/modules/5.10.16-arch1-1/extramodules/nvidia.ko.xz 
modprobe: INFO: context 0x557531a32440 released

lspci -k | grep -A 2 -E "(VGA|3D)"
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 630 (Mobile)
	DeviceName: Second VGA
	Subsystem: ASUSTeK Computer Inc. Device 106f
	Kernel driver in use: i915
--
01:00.0 VGA compatible controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] (rev a1)
	DeviceName: VGA
	Subsystem: ASUSTeK Computer Inc. Device 106f
	Kernel driver in use: nvidia

xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x43 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 1 associated providers: 0 name:modesetting

Still can't switch to nvidia. Is it somehow related to i9 cpu? Because I don't have it, I use i7.

edit: reboot also didn't work

Last edited by callmer (2021-02-23 07:00:49)

Offline

#12 2021-02-23 07:05:06

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: can't switch to nvidia with optimus-manager

callmer wrote:

Yes I meant I did it it's about

sudo /usr/bin/prime-offload
sudo /usr/bin/prime-switch

It's not the reason of the problem.

It is part of the problem. The other, larger, part of the problem is you don't read anything.

Github instructions wrote:

I do not use a display manager (I use startx or xinit)
Just like above, you must make sure to run /usr/bin/prime-offload (as normal user) just after the X server is started, and /usr/bin/prime-switch (as root) after it has stopped.

You really should find another distro. You have no reason to use Arch, and no aptitude for it either. This is more help vampirism.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#13 2021-02-23 08:02:23

callmer
Member
Registered: 2021-01-07
Posts: 80

Re: can't switch to nvidia with optimus-manager

jasonwryan wrote:
callmer wrote:

Yes I meant I did it it's about

sudo /usr/bin/prime-offload
sudo /usr/bin/prime-switch

It's not the reason of the problem.

It is part of the problem. The other, larger, part of the problem is you don't read anything.

Github instructions wrote:

I do not use a display manager (I use startx or xinit)
Just like above, you must make sure to run /usr/bin/prime-offload (as normal user) just after the X server is started, and /usr/bin/prime-switch (as root) after it has stopped.

You really should find another distro. You have no reason to use Arch, and no aptitude for it either. This is more help vampirism.

Thanks for links and motivation you gave to me.

Offline

#14 2021-02-23 10:04:33

fistrosan
Member
Registered: 2020-04-01
Posts: 168

Re: can't switch to nvidia with optimus-manager

callmer wrote:

Still can't switch to nvidia. Is it somehow related to i9 cpu? Because I don't have it, I use i7.

What prompts you to surmise that this could be the problem ?

Offline

#15 2021-02-23 18:30:28

callmer
Member
Registered: 2021-01-07
Posts: 80

Re: can't switch to nvidia with optimus-manager

jasonwryan wrote:
callmer wrote:

Yes I meant I did it it's about

sudo /usr/bin/prime-offload
sudo /usr/bin/prime-switch

It's not the reason of the problem.

It is part of the problem. The other, larger, part of the problem is you don't read anything.

Github instructions wrote:

I do not use a display manager (I use startx or xinit)
Just like above, you must make sure to run /usr/bin/prime-offload (as normal user) just after the X server is started, and /usr/bin/prime-switch (as root) after it has stopped.

You really should find another distro. You have no reason to use Arch, and no aptitude for it either. This is more help vampirism.

I wanted to try it one more time as you so confidently said it  is the absolute solution. Well I'll repeat it doesn't fix my issue. So please be a little bit patient next time and don't suppress newbies like me. However thanks for your reply and help attempt, I really appreciate it, thanks!!!

Offline

#16 2021-02-23 18:31:18

callmer
Member
Registered: 2021-01-07
Posts: 80

Re: can't switch to nvidia with optimus-manager

fistrosan wrote:
callmer wrote:

Still can't switch to nvidia. Is it somehow related to i9 cpu? Because I don't have it, I use i7.

What prompts you to surmise that this could be the problem ?

Ok, ghen I am gonna open new topic (?)

Offline

#17 2021-02-23 19:16:18

seth
Member
Registered: 2012-09-03
Posts: 49,967

Re: can't switch to nvidia with optimus-manager

I wanted to try it one more time as you so confidently said it  is the absolute solution. Well I'll repeat it doesn't fix my issue.

What *exactly* did you do to "try" this?

Offline

Board footer

Powered by FluxBB