Forcing Manjaro Cinnamon to use dedicated Nvidia GPU

Here is the same, I think.

lsb_release --all
LSB Version:	n/a
Distributor ID:	ManjaroLinux
Description:	Manjaro Linux
Release:	20.2.1
Codename:	Nibia

uname --kernel-release
5.10.18-1-MANJARO

Tha only thing I can think of now is that you re-installed with Open Source drivers only…

What does running mhwd from the GUI give you???

1 Like

I’m sorry to say but the only thing I can think of is: another re-install and ensure you turn on “proprietary drivers” because I can’t seem to find how to do that after the fact…

(and nearly bed time here!)

OK. Here is bed time too. Next day I try from the scratch again.

1 Like

Hi!

I must to reinstall again my system from the scratch.

Now, i gave up the forcing to only usage of dedicated card. It would be enough if my system could use the nVidia card when I run a Steam game. In other cases the Intel UHD is good for me.
The install was with free drivers option.

Now here is the information:

inxi -G
Graphics:  Device-1: Intel UHD Graphics driver: i915 v: kernel 
           Device-2: NVIDIA TU117M driver: nouveau v: kernel 
           Display: x11 server: X.Org 1.20.10 driver: loaded: intel,modesetting,nouveau s-res: 1920x1200 
           OpenGL: renderer: Mesa Intel UHD Graphics (CML GT2) v: 4.6 Mesa 20.3.4

Could you or the community so kind to help me in solving this issue?
Thanks in advance.

For that you need proprietary, not open source and why I said:

but now you have:

(back again where you started)

The problem is when I chose the non-free drivers at install that worked well.
But after the first system upgrade (cca. 400-600 packets) and reboot the system wont work.
Just a black screen were shown. What could be the reason?
I checked in the bios and my system has:

nVidia-Optimus ATI-PX4.0/PX5.0

Does it give better/more information?
I am now totally confused. You wrote: “(back again where you started)” How?

OK, let’s take a step back:

  1. Install with non-free drivers
  2. upgrade the kernel to 5.4 LTS
  3. Upgrade packages

Black screen?

If yes; log on to TTY2

inxi --admin --verbosity=7 --filter --no-host --width
journalctl --boot=0 --system | tail

If no:

Don’t change anything! Report back, please.

:crossed_fingers:

  1. As I wrote the system was out of order after the reboot, but I didn’t try to log on to TTY2.
  2. Upgrade? That would be downgrade, because the actual working kernel version is 5.9.
    Do you really want to the downgrade? I can do that, I just to be sure what is your advice exactly.

This evening I have time to that.

I couldn’t wait until evening. Fresh install with proprietary drivers and all the upgrades.
Seems to me it works smoothly. Here is two snippets from inxi (System and Graphics):

inxi --admin --verbosity=7 --filter --no-host --width
System:
  Kernel: 5.9.16-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.1 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.9-x86_64 
  root=UUID=b76e586a-752c-40b3-b9c9-1b8d2782c3ed rw quiet udev.log_priority=3 
  Desktop: Cinnamon 4.8.6 tk: GTK 3.24.26 dm: LightDM 1.30.0 
  Distro: Manjaro Linux 
...
Graphics:
  Device-1: Intel UHD Graphics vendor: Micro-Star MSI driver: i915 v: kernel 
  bus ID: 00:02.0 chip ID: 8086:9bc4 class ID: 0300 
  Device-2: NVIDIA TU117M driver: nvidia v: 460.56 
  alternate: nouveau,nvidia_drm bus ID: 01:00.0 chip ID: 10de:1f99 
  class ID: 0302 
  Display: x11 server: X.Org 1.20.10 driver: loaded: modesetting 
  failed: nvidia alternate: fbdev,intel,nouveau,nv,vesa display ID: :0 
  screens: 1 
  Screen-1: 0 s-res: 1920x1200 s-dpi: 96 s-size: 508x318mm (20.0x12.5") 
  s-diag: 599mm (23.6") 
  OpenGL: renderer: Mesa Intel UHD Graphics (CML GT2) v: 4.6 Mesa 20.3.4 
  direct render: Yes 

I stayed at kernel version 5.9
Is it OK in your opinion?
What is the next step?

There is a strange thing. Meanwhile I installed the Screenshot app the following messages were appeared:

ldconfig: /usr/lib32/libnvidia-eglcore.so.460.56 is not a symbolic link
ldconfig: /usr/lib32/libnvidia-glvkspirv.so.460.56 is not a symbolic link
ldconfig: /usr/lib32/libnvidia-glsi.so.460.56 is not a symbolic link
ldconfig: /usr/lib32/libnvidia-tls.so.460.56 is not a symbolic link
ldconfig: /usr/lib32/libnvidia-glcore.so.460.56 is not a symbolic link
ldconfig: /usr/lib/libnvidia-eglcore.so.460.56 is not a symbolic link
ldconfig: /usr/lib/libnvidia-glvkspirv.so.460.56 is not a symbolic link
ldconfig: /usr/lib/libnvidia-gtk2.so.460.56 is not a symbolic link
ldconfig: /usr/lib/libnvidia-cbl.so.460.56 is not a symbolic link
ldconfig: /usr/lib/libnvidia-glsi.so.460.56 is not a symbolic link
ldconfig: /usr/lib/libnvidia-gtk3.so.460.56 is not a symbolic link
ldconfig: /usr/lib/libnvidia-rtcore.so.460.56 is not a symbolic link
ldconfig: /usr/lib/libnvidia-tls.so.460.56 is not a symbolic link
ldconfig: /usr/lib/libnvidia-glcore.so.460.56 is not a symbolic link

Something went wrong?

Good!

Immediately take a system backup:

This is not Windows: 5.9 is an EOL kernel: it will be removed in one of the next upgrades, so better upgrade now.

5.4 has been an LTS kernel since a while and 5.10 is an LTS kernel since very little time.
so for rock stable performance, take 5.4 until 5.10 has reached the stability of 5.4.

That being said, if 5.9 works, don’t delete it, but keep it around and install both 5.4 and 5.10 on top of 5.9 and boot them and try things out on all 3 of them.

https://kernel.org

:crossed_fingers:

P.S. Now you have a stable system, don’t install anything weird (I don’t even know which screen saver you’ve installed, so can’t give you any guidance…)
P.PS. please confirm your OS itself works now.

OK I am going to install the 5.4 and 5.10 kernel versions and test them.

Screenshot is not a screen saver, it is a screen shot app that makes a screen shot when I need. With other words print screen.

What could be the reason of these messages? I suspect not everything is OK inside there.
I can see every time when I install a software.

Well… I cannot backup my system. I have an old external HDD, but that wont work.
Could we continue without the backup? It is my responsible, so I will not accuse you if something goes wrong.

It’s easy:

  • Print this page so you have it as a reference while in TTY2

  • Log off

  • Switch to TTY2 by pressing Ctrl+Alt+F2

  • Log in there

  • Execute:

    sudo mhwd-kernel --install linux54
    sudo mhwd-kernel --install linux510
    
  • to ensure grub is showing, execute:

     sudo nano --backup /etc/default/grub
    
  • Change (or add?) the following 3 lines:

    GRUB_TIMEOUT=3
    #GRUB_HIDDEN_TIMEOUT=0
    #GRUB_TIMEOUT_STYLE=hidden
    

    (3 or higher is fine, add the # before the lines above if those lines are present)

  • Ctrl+X Y Enter to save if there is anything to save

  • If you did save, execute:

     sudo update-grub
    
  • Reboot

  • Go to grub’s Advanced options

  • Choose these kernels one by one and try them out one by one and see if that helps.

:+1:

I installed both of those kernels. I was able to login to the X window with 5.4 and 5.10.
It is enough to check or needs something else?
Now, I am writing this post under the 5.10 kernel.

1 Like

I would accept as a solution. Unfortunately, I am not sure the system will use the nV card as expected.

  1. I can’t see the proprietary drivers
  2. What will ensure the switching between Intel and nVidia?

I tried

sudo mhwd -a pci nonfree 0300

After this

glxinfo | grep NVIDIA

No result.
Here is another try.

lspci -k | grep -A 2 -E "(VGA|3D)"
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics (rev 05)
	DeviceName: Onboard - Video
	Subsystem: Micro-Star International Co., Ltd. [MSI] Device 12bd
--
01:00.0 3D controller: NVIDIA Corporation TU117M (rev ff)
	Kernel driver in use: nvidia
	Kernel modules: nouveau, nvidia_drm, nvidia

One more try.

mhwd -li -d --pci
   NAME:	video-modesetting
   ATTACHED:	PCI
   VERSION:	2020.01.13
   INFO:	X.org modesetting video driver.
   PRIORITY:	1
   FREEDRIVER:	true
   DEPENDS:	-
   CONFLICTS:	-
   CLASSIDS:	0300 
   VENDORIDS:	* 

   NAME:	video-hybrid-intel-nvidia-prime
   ATTACHED:	PCI
   VERSION:	2020.11.30
   INFO:	Hybrid prime solution for NVIDIA Optimus Technology - Closed source NVIDIA driver & open source intel driver.
   PRIORITY:	6
   FREEDRIVER:	false
   DEPENDS:	video-modesetting 
   CONFLICTS:	video*nvidia* 
   CLASSIDS:	0300 0302 0300 
   VENDORIDS:	10de 8086 

   NAME:	video-linux
   ATTACHED:	PCI
   VERSION:	2018.05.04
   INFO:	Standard open source drivers.
   PRIORITY:	2
   FREEDRIVER:	true
   DEPENDS:	-
   CONFLICTS:	-
   CLASSIDS:	0300 0380 0302 
   VENDORIDS:	1002 8086 10de

You can see video-linux is free driver, not proprietary.
So, I am really confused.
I tried to find a complete walkthrough for installing, deploying nVidia drivers for Optimus systems.
What I found none of them complete. They just write “do this and do that”, but no details what are the exact commands that fulfill the whole process, and can be checked each step.
That is right, I am not an expert. But this is the reason why I need detailed and step by step description of the process.
Maybe I should wait few months or years and finally somebody will make such guidebook.

Finally!
It seems to me the GPU switching issue is solved. Not sure, but two tries from three was successful.
I accept your solution considered your kind and diligent helpful work in this subject.
I describe here what lead me to achieve the solution after one month struggle.
Source of information: How to setup Optimus on Manjaro

  1. sudo pacman -S yay
  2. yay -Syu
  3. yay -S nvidia
  4. yay -S base-devel
  5. yay -S optimus-manager
  6. sudo systemctl enable optimus-manager
  7. reboot

Notice these:

  1. yay proposed only this driver: linux414-nvidia-460.56-1. It is maybe a Cinnamon specialty.
  2. must to install the base-devel package
  3. to switch you need to execute this command: optimus-manager --switch nvidia
    The switch will terminate the X session and start a new one with nvidia.

Once, when a process couldn’t be killed the switch failed. So must to reboot from TTY2.
But when everything went smooth I was able to start and play with a Steam game without problem.
If it is interesting I can give information how looks out my system now. Like inxi -G and so on…

So, thanks for your lot of efforts. I hope this is the end of the story.

Appendix:
Sometimes a switching wont work, just black screen appears. That could help if you calls this:

prime-offload

before the switching:

optimus-manager --switch nvidia
1 Like

Appendix 2:

That could happen you need to install: optimus-lancaster-sx.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.