Installing nvidia and intel driver problem

I have installed manjaro cinnamon. but i am suffering from screen tearing in firefox . after googling this problem i found out this can be solved by installing graphic driver. after installing bumblebee driver in manjaro hardware gui, the nvidia setting could not be loaded. after reinstalling bumblebee 390xx . the nvidia setting gui could be loaded but i got error that you should run "nvidia-xorg as root".
after running this and rebooting the laptop, the login screen was black and i had to reinstall manjaro cinnamon.

System:
  Host: pipboy Kernel: 4.19.8-2-MANJARO x86_64 bits: 64 compiler: gcc 
  v: 8.2.1 Desktop: Cinnamon 4.0.5 Distro: Manjaro Linux 
Machine:
  Type: Laptop System: ASUSTeK product: X510UQ v: 1.0 
  serial: <root required> 
  Mobo: ASUSTeK model: X510UQ v: 1.0 serial: <root required> 
  UEFI: American Megatrends v: X510UQ.309 date: 08/08/2018 
Battery:
  ID-1: BAT0 charge: 29.9 Wh condition: 33.7/42.1 Wh (80%) 
  model: ASUSTeK ASUS Battery status: Discharging 
CPU:
  Topology: Dual Core model: Intel Core i7-7500U bits: 64 type: MT MCP 
  arch: Kaby Lake rev: 9 L2 cache: 4096 KiB 
  flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 23240 
  Speed: 775 MHz min/max: 400/3500 MHz Core speeds (MHz): 1: 722 2: 708 
  3: 707 4: 701 
Graphics:
  Device-1: Intel HD Graphics 620 vendor: ASUSTeK driver: i915 v: kernel 
  bus ID: 00:02.0 
  Device-2: NVIDIA GM108M [GeForce 940MX] vendor: ASUSTeK driver: nouveau 
  v: kernel bus ID: 01:00.0 
  Display: x11 server: X.Org 1.20.3 driver: intel,nouveau 
  unloaded: modesetting tty: N/A 
  OpenGL: renderer: Mesa DRI Intel HD Graphics 620 (Kaby Lake GT2) 
  v: 4.5 Mesa 18.2.6 direct render: Yes 
Audio:
  Device-1: Intel Sunrise Point-LP HD Audio vendor: ASUSTeK 
  driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
  Sound Server: ALSA v: k4.19.8-2-MANJARO 
Network:
  Device-1: Intel Wireless 8265 / 8275 driver: iwlwifi v: kernel port: e000 
  bus ID: 02:00.0 
  IF: wlp2s0 state: up mac: f8:59:71:33:76:38 
Drives:
  Local Storage: total: 1.82 TiB used: 804.67 GiB (43.2%) 
  ID-1: /dev/sda vendor: Seagate model: ST1000LM035-1RK172 size: 931.51 GiB 
  ID-2: /dev/sdb type: USB vendor: A-Data model: HD710 PRO size: 931.51 GiB 
Partition:
  ID-1: / size: 340.77 GiB used: 35.18 GiB (10.3%) fs: ext4 dev: /dev/sda6 
Sensors:
  System Temperatures: cpu: 45.0 C mobo: N/A 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 208 Uptime: 5h 36m Memory: 11.61 GiB used: 2.68 GiB (23.0%) 
  Init: systemd Compilers: gcc: 8.2.1 Shell: zsh v: 5.6.2 inxi: 3.0.28

Can anyone help me how to setup the driver properly?
and can anyone tell me what is the difference between bumblebee 390xx and bumblebee?

390xx version is simply bumblebee which works with nvidia LTS 390xx version of drivers, while regular bumblebee works with the newest, rolling nvidia drivers.

So on LTS driver you always get 390 version with some security and bugfixes but no new features in theory Some features sometimes are ported back to those drivers and sometimes they can show up there sooner then on rolling version, however I wouldn't expect to have any new features in 390xx line, more likely on 396xx one, which isn't currently supported on Manjaro. 390xx version showed up only after end of support for some older GPUs and normally only rolling driver is available. On rolling driver it gets switched to newer and newer version.
On LTS systems like Ubuntu you get only LTS drivers and newer ones only after adding ppa's. On rolling systems rolling driver is the default.

There are some GPU nvidia cards which aren't supported by the newest nvidia drivers (fenri based cards - whatever that means) and for those you are suppose to use 390xx version. Or other (usually newer) cards use the regular rolling driver.

Thanks for the reply but how should i install 390 properly on my laptop? I ran screenfetch in terminal after installing the LTS version and the gpu was unknown and couldn't load the nvidia setting

according to nvidia you card works with the latest linux drivers 4.15

From what I see, you have GTX 940MX and that's not a Fermi based card so you should rather use rolling driver, so if you have 390xx one then uninstall it and install rolling, if you are on rolling you are good.

First, bumblebee don't support opening nvidia settings directly. There is a command for that but I can't give to you right now because I'm at work on Win10. I can do that in 5 hours or so.

There are bumbleebee limitations. On one side it uses intel and launches nvidia on demand so you save your battery power, but nvidia settings must be opened with some command options and it doesn't work with vulkan, which is needed for full support on Steam Play. So if you want to for example play Witcher 3 (on lower settings, given your card) you either need to switch to Prime (manually) and then install optimus-manager for switching between cards, or use nvidia-xrun.

Not that those operations are risky and there is a chance you mess something and system won't be bootable but since this is a new installation you don't lose much.

Maybe in the future it all be automated but currently packages from Arch are in a vanilla state (not preconfigured like on Ubuntu) so you need to use tools like Manjaro's mhwd (in manjaro settings) to automate things but that doesn't support prime at the moment.

you have alternative options besides bumblebee i think you should look into and make an informed decision. i can help walk you through setup but you have to decide which is the right fit for your needs.

  • bumblebe option: this is the default that manjaro uses for installing non-free drivers on optimus laptops. uses the integrated intel chip by default and only uses the nvidia gpu when run with opti/primus run. this has its power saving benifits as priority but has drawbacks like lack of vulkan support, hdmi, various others and will not provide the performance of the following 2 options.
  • PRIME option: this has both iGPU and dGPU powered on at same time uses a bit more power but performance on demand without needs of opti/primus/bbswitch switching. i use this method, but performance is my main priority and not battery life.
  • optimus-manager option: provides beneifts of both above options allowing you to use the video-nvidia proprietary drivers like PRIME and allows running on iGPU alone saving power or run on both for graphical performance when needed. so you get full performance when it's using the nvidia/intel gpu combo just like prime does and shares none of the downsides that bumblebee has.

Battery life is my priority but sometimes i may play games .so the third option sounds more reasonable than the first one . Thanks for your reply, I really appreciate your help.

ive never personally used optimus-manager since im plugged into AC power most of the time but i can still help you set it up, there's a good tutorial right here on the forum to set it up. read through it as i am now to prevent any issues along the way.

and here is the manjaro wiki for optimus-manager
https://wiki.manjaro.org/index.php?title=Optimus_Manager

optimus-manager --switch nvidia
Traceback (most recent call last):
  File "/bin/optimus-manager", line 11, in <module>
    load_entry_point('optimus-manager==0.5', 'console_scripts', 'optimus-manager')()
  File "/usr/lib/python3.7/site-packages/optimus_manager/optimus_manager_client.py", line 95, in main
    if not checks.is_daemon_active():
  File "/usr/lib/python3.7/site-packages/optimus_manager/checks.py", line 58, in is_daemon_active
    state = exec_bash("systemctl is-active optimus-manager").stdout.decode('utf-8')[:-1]
  File "/usr/lib/python3.7/site-packages/optimus_manager/bash.py", line 12, in exec_bash
    raise BashError("Failed to execute '%s' : %s" % (command, ret.stderr.decode('utf-8')[:-1]))
optimus_manager.bash.BashError: Failed to execute 'systemctl is-active optimus-manager' :
systemctl status optimus-manager.service 
● optimus-manager.service - Optimus Manager Commands Daemon
   Loaded: loaded (/usr/lib/systemd/system/optimus-manager.service; enabled; vendor preset: disabled)
   Active: inactive (dead)

i encounter this problem and i don't find any solution for this.

please post output of the following. all output for each ,leave nothing out.
mhwd -li
systemctl status bbswitch
systemctl status bumblebeed
cat /etc/X11/xorg.conf
ls /etc/X11/xorg.conf.d
ls /etc/X11/mhwd.d/
ls /etc/modules-load.d/

mhwd -li

> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
           video-linux            2018.05.04                true            PCI


Warning: No installed USB configs!

systemctl status bbswitch
Unit bbswitch.service could not be found.

systemctl status bumblebeed
Unit bumblebeed.service could not be found.

cat /etc/X11/xorg.conf
cat: /etc/X11/xorg.conf: No such file or directory

ls /etc/X11/xorg.conf.d
00-keyboard.conf

ls /etc/X11/mhwd.d/
empty

ls /etc/modules-load.d/
modules.conf

you need to install video-nvidia to be able to switch.
sudo mhwd -i pci video-nvidia
dont uninstall video-linux, optimus-manager uses its nouveau driver for switching the nvidia off

What does running

systemctl is-active optimus-manager

return?

inactive

mhwd -li

 Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
          video-nvidia            2018.08.09               false            PCI
           video-linux            2018.05.04                true            PCI


Warning: No installed USB configs!

ls /etc/X11/xorg.conf.d
00-keyboard.conf 90-mhwd.conf

ls /etc/X11/mhwd.d/
nvidia.conf nvidia.conf.nvidia-xconfig-original

ls /etc/modules-load.d/
mhwd-gpu.conf modules.conf

optimus-manager --switch nvidia

Traceback (most recent call last):
  File "/usr/bin/optimus-manager", line 11, in <module>
    load_entry_point('optimus-manager==0.5', 'console_scripts', 'optimus-manager')()
  File "/usr/lib/python3.7/site-packages/optimus_manager/optimus_manager_client.py", line 95, in main
    if not checks.is_daemon_active():
  File "/usr/lib/python3.7/site-packages/optimus_manager/checks.py", line 58, in is_daemon_active
    state = exec_bash("systemctl is-active optimus-manager").stdout.decode('utf-8')[:-1]
  File "/usr/lib/python3.7/site-packages/optimus_manager/bash.py", line 12, in exec_bash
    raise BashError("Failed to execute '%s' : %s" % (command, ret.stderr.decode('utf-8')[:-1]))
optimus_manager.bash.BashError: Failed to execute 'systemctl is-active optimus-manager' :

have you rebooted after installing video-nvidia?

optimus-manager --set-startup nvidia_once
then reboot and see if the nvidia is active.

Have you followed the Readme of Optimus manager correctly
Have you enabled the optimus-manager service

Now it is enabled but a new problem . the resultion changed completely everything got bigger.
how should i solve this problem?

1 Like

read the wiki/tutorial (very similar), it tells you how to configure settings since they recommend not using nvidia-settings to make changes.
im about to do this optimus-manager setup right now. just backed up everything with timeshift and good to go. im glad your able to get it running which was my intention to help you do so but please read/research readily available materials and if then you dont know how to fix it, i or another will be glad to assist you.

btw this command:
optimus-manager --set-startup nvidia_once
only sets nvidia to be booted on your next boot and only 1 time.

if you want to set a default (which im not sure is which in your case):
optimus-manager --set-startup nvidia
will boot to nvidia every time unless switched to intel
optimus-manager --set-startup intel
will use intel each boot as default unless you --switch to nvidia and for your purposes as you stated that you want to focus on power conservation. so set it to intel as default and only --switch nvidia when needed.

1 Like

Forum kindly sponsored by