Install drivers for Nvidia GeForce GTX 1050 without bumblebee

My setup:

% inxi -G
Graphics:  Device-1: Intel UHD Graphics 620 driver: i915 v: kernel
           Device-2: NVIDIA GP107M [GeForce GTX 1050 Mobile] driver: nouveau v: kernel
           Display: x11 server: X.org 1.20.6 driver: intel,modesetting resolution: <xdpyinfo missing>
           OpenGL: renderer: Mesa DRI Intel UHD Graphics (Whiskey Lake 3x8 GT2) v: 4.5 Mesa 19.2.7

I'm trying to install the drivers for my GeForce GTX 1050:

% sudo mhwd -a pci nonfree 0302
> Using config 'video-hybrid-intel-nvidia-430xx-bumblebee' for device: 0000:02:00.0 (0302:10de:1c8d) Display controller nVidia Corporation GP107M [GeForce GTX 1050 Mobile]
Error: config 'video-hybrid-intel-nvidia-430xx-bumblebee' conflicts with config(s): video-intel

I note that:

  • It's trying to use 430xx whereas the Nvidia drivers site gives me version 440.44

  • It's trying to install Bumblebee, whereas I want to use Prime render offloading

Questions:

  1. Why am I getting v430 when v440 is correct and is reported to work well on optimus setups?

  2. Can I have mhwd avoid bumblebee (given its life is coming to an end anyways)

  3. If I can't use mhwd for non-bumblebee, what do I need to install/setup manually to still have a complete setup, eg nvidia-settings, etc.

there is a tutorial, maybe it helps you a little bit

Because Bumblebee is the only automated setup for Optimus available in mhwd at the moment.

Most commands below are Manjaro-specific.
So you have to do:
sudo mhwd -r pci video-hybrid-intel-nvidia-430xx-bumblebee
sudo mhwd -f -i pci video-hybrid-intel-nvidia-440xx-prime

Then install optimus-manager:
trizen -S optimus-manager-qt (from AUR, easy GUI for manipulating Optimus settings)
Now install bbswitch (dynamic module to load/unload Nvidia driver):
sudo pacman -S $(pacman -Qo /lib/modules/$(uname -r)/vmlinuz |cut -c54-60)-bbswitch
Run optimus-manager-qt and set it like this:






...
Reboot
???
PROFIT

Use prime-run to launch apps with Nvidia GPU in hybrid mode.

Arch users have no mhwd utility, so they need to follow another procedure, which is basically just an installation of Nvidia drivers and optimus-manager-qt from repo / AUR, then steps captured on the screenshots above.

6 Likes

Thanks a bunch, @openminded!

How would I apply this solution to allow external displays and projectors. When I have configured this I cannot use any external display it just doesn't work.

I won't be able to use this solution unless I can use external displays.

There's no good solution for laptops that have their HDMI output wired to Nvidia chip except for full-Nvidia setup. Select "Startup mode: Nvidia" in optimus-manager settings.

TL;DR: "Folding at home" hogs nvidia GPU. optimus-manager does not work with Intel.

Original Problem History and Description:

  1. I have a high spec laptop on which I primarily run Manjaro.
  2. I came across the "Folding at Home (FAH)" initiative and installed the client a few weeks back. Things are working great (and I am getting a lot of points at FAH) but the FAH client is very greedy with the nvidia GPU and makes the rest of the system laggy and difficult to work with - I have trouble with almost any other video application. I run FAH only on GPU and have disabled CPU for FAH. While FAH is running, VLC keeps dropping frames, even playing stuff on youtube is not smooth. I wanted to see if I can get my regular apps like VLC and browser run on the Intel GPU and this led me into the rabbit hole of Prime. bumblebee and optimus-manager. Even my mouse pointer is laggy and so is minimizing and maximizing other windows/applications.
  3. I wrestled with optimus-manager for a couple of days and got it to work well with nvidia but with intel I get a blackscreen. I followed: https://github.com/Askannz/optimus-manager
    I don't even know if optimus-manager is the right solution for my use case. Yesterday I uninstalled optimus-manager.
  4. I am plugged into power almost 99.9% of the time. I am not looking to save power or increase battery-life. I just want to be able to use my laptop normally even when FAH is running i.e. my actual aim: Can I let FAH take 100% of nvidia GPU while my chrome/brave/firefox run on the intel GPU.
    a. Is my aim even technically possible?
    b. If possible, how do I go about this process. If this is not the right place to post this, please direct me to the right place.

Here is the config of my system:

$ inxi -Fx
System:    Host: kc-manjaro Kernel: 5.5.13-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.3.0 
           Desktop: KDE Plasma 5.18.3 Distro: Manjaro Linux 
Machine:   Type: Laptop System: Alienware product: Alienware Area-51m v: 1.8.1 serial: <root required> 
           Mobo: Alienware model: Alienware Area-51m v: A00 serial: <root required> UEFI: Alienware v: 1.8.1 
           date: 10/28/2019 
Battery:   ID-1: BAT1 charge: 85.2 Wh condition: 85.2/90.0 Wh (95%) model: COMPAL PABAS0241231 status: Full 
CPU:       Topology: 8-Core model: Intel Core i9-9900K bits: 64 type: MT MCP arch: Kaby Lake rev: C 
           L2 cache: 16.0 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 115232 
           Speed: 4877 MHz min/max: 800/5000 MHz Core speeds (MHz): 1: 4858 2: 4857 3: 4841 4: 4883 5: 4838 
           6: 4812 7: 4789 8: 4925 9: 4801 10: 4886 11: 4899 12: 4844 13: 4843 14: 4846 15: 4835 16: 4892 
Graphics:  Device-1: Intel UHD Graphics 630 vendor: Dell driver: i915 v: kernel bus ID: 00:02.0 
           Device-2: NVIDIA TU106BM [GeForce RTX 2070 Mobile] vendor: Dell driver: nvidia v: 418.113 
           bus ID: 01:00.0 
           Display: x11 server: X.Org 1.20.8 driver: nvidia resolution: 1920x1080~144Hz, 1920x1080~60Hz 
           OpenGL: renderer: GeForce RTX 2070/PCIe/SSE2 v: 4.6.0 NVIDIA 418.113 direct render: Yes 
Audio:     Device-1: Intel Cannon Lake PCH cAVS vendor: Dell driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
           Device-2: NVIDIA TU106 High Definition Audio driver: snd_hda_intel v: kernel bus ID: 01:00.1 
           Sound Server: ALSA v: k5.5.13-1-MANJARO 
Network:   Device-1: Realtek vendor: Dell driver: r8169 v: kernel port: 3000 bus ID: 43:00.0 
           IF: enp67s0 state: down mac: c8:f7:50:71:4f:3e 
           Device-2: Intel Wi-Fi 6 AX200 vendor: Bigfoot Networks driver: iwlwifi v: kernel port: 3000 
           bus ID: 44:00.0 
           IF: wlp68s0 state: up mac: 38:00:25:29:16:1b 
Drives:    Local Storage: total: 1.14 TiB used: 25.18 GiB (2.2%) 
           ID-1: /dev/sda vendor: Seagate model: ST1000LX015-1U7172 size: 931.51 GiB 
           ID-2: /dev/sdb type: USB model: External USB3.0 size: 232.89 GiB 
RAID:      Hardware-1: Intel SATA Controller [RAID mode] driver: ahci v: 3.0 bus ID: 00:17.0 
Partition: ID-1: / size: 227.94 GiB used: 25.18 GiB (11.0%) fs: ext4 dev: /dev/sdb2 
Sensors:   System Temperatures: cpu: 67.0 C mobo: N/A gpu: nvidia temp: 74 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 359 Uptime: 1h 28m Memory: 31.17 GiB used: 4.52 GiB (14.5%) Init: systemd Compilers: 
           gcc: 9.3.0 Shell: bash v: 5.0.16 inxi: 3.0.37 

[kc@kc-manjaro ~]$ echo $XDG_SESSION_TYPE
x11
[kc@kc-manjaro ~]$ systemctl status display-manager
● sddm.service - Simple Desktop Display Manager

If you want to use optimus-manager, you should select hybrid mode and prime-run to start Nvidia-powered tasks. But normally you can just install video-intel-nvidia-440xx-prime config via mhwd and that's it (still necessary to run apps through prime-run).
Also consider limiting resource allocation for your Folding app, because these kind of programs utilize resources way better than games, I mean it should naturally drain out everything from your GPU making your laptop get hot and throttle in order to cool down as much as possible, hence your lagging experience.
That's the reason why I don't run my BOINC tasks on Nvidia chip at all and limit CPU utilisation to 35%. Yes, computational power is not that great in this case, but it's better to have less efficiency than burn the thing out some day when you're not around.

Thanks for the tip. Just a quick clarification: do you recommend: optimus-manager + video-intel-nvidia-440xx-prime + prime-run?
Or just video-intel-nvidia-440xx-prime in isolation + prime-run?

Regarding temp: When folding, I usually put my fan settings to 'performance' and my GPU did not go above 70C at any point - mostly hovers around 67C. I checked the temps for RTX 2070 and apparently RTX 2070 can go up to 80C-85C without throttling. I have now set the fan back to normal and temp is above 70.
I did check if I can throttle GPU for FAH and realised that that is not possible. With GPU its all or nothing. Apparently you can throttle the CPU but not the GPU.

I will try the solution once you clarify and will post here.

Well, in your case optimus-manager makes sense only if you have plans to switch to pure Nvidia mode. Turing GPUs are able to auto suspend in hybrid mode when there's no load, so Intel mode is useless on your laptop.
What I meant about throttling was when you have a high load on GPU it heats the laptop internals and that makes relatively small CPU load to heat it even more making the gap between normal operation and throttling way smaller than usual. Like, no GPU load -- CPU idle temp is 35-40°, with GPU load -- CPU idle is 55° despite the fact that it has no heavy tasks, so it takes less time and load to make it throttle. So, even if your GPU temp is not that high, some heat gets transferred to CPU anyway, making it easier to reach the temp limit.
And btw there are other components that don't like high temps, battery, for example, this is why a long consecutive load isn't a great idea for laptops, even if the max temp is 75°.

Not solved yet !! But some progress.

I had issues upgrading to "video-intel-nvidia-440xx-prime". I uninstalled nvidia-418xx and my display completely disappeared i.e. I could not get to CLI. I used nomodeset as a kernel parameter to get to CLI. Then realised wifi was not up. Had to fish out the Ethernet cable and connect it to the router ethernet port. Then used pacman to install video-hybrid-intel-nvidia-440xx-prime. After that had to reboot the laptop a couple of times to get the wifi working. I have detailed documentation of the whole process and will post it once I get everything right.

Here is the status. Nvidia is my primary GPU which is fine.
I am currently running FAH on nvidia GPU and my system lag still exists. The temps are:
GPU: 64C (with 100% usage by FAH)
CPU: 7 cores @ 55C (varying from 2% usage to 17%usage) and 1 core @ 70C (100% usage)

[kc@kc-manjaro FAHClient]$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x1b8 cap: 0x1, Source Output crtcs: 4 outputs: 4 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x1f9 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 4 associated providers: 1 name:modesetting
[kc@kc-manjaro FAHClient]$ glxinfo | grep "OpenGL vendor"
OpenGL vendor string: NVIDIA Corporation

[kc@kc-manjaro FAHClient]$ nvidia-smi
Sun Apr  5 22:58:57 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.64       Driver Version: 440.64       CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce RTX 2070    Off  | 00000000:01:00.0  On |                  N/A |
| N/A   64C    P2   113W /  N/A |    884MiB /  7979MiB |     98%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1177      G   /usr/lib/Xorg                                193MiB |
|    0      1614      G   /usr/bin/kwin_x11                            173MiB |
|    0      1624      G   /usr/bin/plasmashell                          54MiB |
|    0      1999      C   ...org/v7/lin/64bit/Core_22.fah/FahCore_22   203MiB |
|    0      2108      G   /usr/bin/ksysguard                             3MiB |
|    0      2126      G   /usr/bin/nvidia-settings                       0MiB |
|    0      5950      G   ...AAAAAAAAAAAAAAgAAAAAAAAA --shared-files   249MiB |
+-----------------------------------------------------------------------------+

My problems:

  1. I don't know if my intel iGPU is being used at all for any program.
  2. Is there an equivalent of nvidia-system-monitor-qt for my intel iGPU? I want to check its load/performance and processes running on it.
  3. I tried doing DRI_PRIME=0 google-chrome-stable as well as DRI_PRIME=1 google-chrome-stable. For both options, I see chrome running in nvidia i.e. Process manager of nvidia-system-monitor-qt
    i.e. Does not look like my iGPU is being used at all.
  4. Of course my system is still laggy i.e. notice lag when moving mouse with FAH running. There is the slight pause between a click and a response.

I want to know if I can do something more.

Thanks,

Well has your installation ever been using iGPU? Maybe there's a setting in your UEFI BIOS to turn on/off Nvidia GPU (dGPU)? I believe Dell machines have it. Try turning it off, normally it should not actually switch it off, but hand dealing with video over to iGPU (Intel one) while maintaining dGPU ready to explicit usage. Hope I sound understandable, my English has a heavy Russian accent lol.
Of course, if you set dGPU off, you'll have to install video-intel-nvidia-440xx-prime again in order to have correct configs in place, then reboot to check if it works.

Thank you for your prompt response. I am always blown away by how helpful people are on these forums.

To answer your question, I don't think my installation has ever used iGPU. I installed nvidia drivers during system install and never switched them off.
Also, I checked my BIOS and there is no option to turn off the nvidia card.

Here is some more info which might be useful:

[kc@kc-manjaro FAHClient]$ lspci -k | grep UHD
00:02.0 Display controller: Intel Corporation UHD Graphics 630 (Desktop 9 Series)
        Subsystem: Dell UHD Graphics 630 (Desktop 9 Series)
[kc@kc-manjaro FAHClient]$ mhwd -l
> 0000:01:00.0 (0300:10de:1f50) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
    video-nvidia-440xx            2019.10.25               false            PCI
    video-nvidia-435xx            2019.10.25               false            PCI
    video-nvidia-430xx            2019.10.25               false            PCI
    video-nvidia-418xx            2019.10.25               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI


> 0000:00:02.0 (0380:8086:3e98) Display controller Intel Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
           video-linux            2018.05.04                true            PCI

Thanks,

Ouch, I got bad news: https://www.dell.com/community/Alienware/Area-51m-only-uses-Nvida-graphics-card-battery-drain/td-p/7436211
Looks like your laptop is not a regular Optimus notebook, and hardcoded to Nvidia GPU only. So the only option left for you is limiting GPU resource allocation for FAH somehow. Maybe try creating some profile in Nvidia settings app?

@openminded: Thanks for digging that out.

I did get some warning about this when I was installing "video-intel-nvidia-440xx-prime" Could not screenshot it as I was in tty/cli mode but it was something which indicated that this is not the recommended driver.

Anyway, this is not a show stopper but I just 'had' to explore if I can eke out a better GUI performance. I can live with my current situation until there is some BIOS or other software update from DELL.

Here are some of the steps I followed. This may help other people with similar issues.

Phase 1:

[kc@kc-manjaro FAHClient]$ sudo cp /etc/X11/xorg.conf.d/90-mhwd.conf /etc/X11/xorg.conf.d/90-mhwd.conf.04Apr2020
[kc@kc-manjaro FAHClient]$ ls /etc/X11/xorg.conf.d/
00-keyboard.conf  90-mhwd.conf  90-mhwd.conf.04Apr2020
[kc@kc-manjaro FAHClient]$ sudo mhwd -r pci video-nvidia-418xx
[sudo] password for kc: 
> Removing video-nvidia-418xx...
Sourcing /etc/mhwd-x86_64.conf
Has lib32 support: true
Sourcing /var/lib/mhwd/local/pci/video-nvidia-418xx/MHWDCONFIG
Processing classid: 0300
Sourcing /var/lib/mhwd/scripts/include/0300
Processing classid: 0302
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing nvidia-418xx-utils breaks dependency 'nvidia-utils' required by nvidia-system-monitor-qt
Error: pacman failed!
Error: script failed!

Phase 2:
!!! Using the GUI for add remove programs - removing -
!!! nvidia-418xx-utils, nvidia-container-runtime 3.1.4.1 nvidia-container-toolkit 1.0.5-3
!!! nvidia-docker-compose 0.1.6-1, nvidia-system-monitor-qt 1.0-2
!!! Warning - ksysguard requires nvidia-utils, vulkan-icd-loader requires vulkan-driver
!!! Successfull ****

Phase 3:
Reboot messed up my display completely. Screen went blank and I was not able to get to even TTY/CLI.
Fixed this by adding 'nomodeset' kernel param: https://itsfoss.com/fix-ubuntu-freezing/ and got to CLI. Now back on track to start playing with stuff.
At this stage, I lost my wifi too and had to fish out a Ethernet cable to connect to the router.

Phase 4:
!!! Tried installing video-hybrid-intel-nvidia-440xx-prime and it said opencl-nvidia-418 is conflicting
$ sudo pacman -R opencl-nvidia-418xx

Now for the hybrid driver
$ pacman -i pci video-hybrid-intel-nvidia-440xx-prime -
This worked well too but generated some warning and errors:
warning: something on the lines of this is not the recommended driver or something like that.
errors: failed rmmod could not remove modules "drm-kms-helper" and "drm" - I ignored these errors.

Phase 5:
!!! Now will try and install all the modules that I removed yesterday
sudo pacman -S opencl-nvidia-440xx nvidia-440x-utils
!! Installed perfectly
System reboot and voila - have full sddm/KDE. Things are great.
!! This step is Irrelevant for people who don't need docker - Now install the nvidia container stuff nvidia-418xx-utils, nvidia-container-runtime 3.1.4.1 nvidia-container-toolkit 1.0.5-3 nvidia-docker-compose 0.1.6-1,
!! Installed nvidia-system-monitor-qt 1.0-2 for keeping an eye on my nvidia card.

One niggling issue. For some reason wifi was not working even now. I encountered this problem earlier too when I installed Manjaro. Messing with video drivers would result in loss of wifi. At that time rebooting a couple of times solved the issue and that is what I did now too. Executed "shutdown -h now" once and then rebooted a couple of times and wifi is working without a single issue - it comes up automatically every time.

Phase 6:
Realised that there is no substantial improvement with my FAH+GUI performance. I am still getting a slight UI lag when I am running FAH on nvidia GPU. Tried checking if there is a way to measure iGPU performance.
This is when @openminded came across this the dell posting:
https://www.dell.com/community/Alienware/Area-51m-only-uses-Nvida-graphics-card-battery-drain/td-p/7436211

Given this issue from Dell, I am suspending further attempts. Maybe a future BIOS update will improve the situation. Not sure if I should remove "video-hybrid-intel-nvidia-440xx-prime" and go back to "video-nvidia-440xx". Living with "video-hybrid-intel-nvidia-440xx-prime" for now.

Continuing to execute FAH. One final recommendation for FAH on laptops: Go to the BIOS and set your fan speed to Full/Performance especially for FAH. The kind of usage and temperatures generated by FAH will push your hardware to the absolute limit - way more than the most demanding games at UHD and highest FPS. And FAH will keep the hardware at the limit for hours at a time. On laptops, You should probably run FAH not more than 2-3 hrs continuously and not more than 6-7 hrs in a day. Do monitor your system temps at all times and ensure that your GPU does not stay above 75C for extended periods (more than an hour) and that your CPU does not stay above 85C for extended periods
You can run FAH continuously if you have a desktop and its better if you have water/liquid cooling :smiley:

I have xiaomi lapbook with i5 6200u and geforce 940mx and i cant make it work any tips? im using the last nvidia 440 driver!

please post the output of 'inxi -Fxxz' first to get an overview.

Pls let's not turn this thread into a mess, create a separate topic. We already have 2 discussions with 2 different people here for practically no good reason.

2 Likes

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

Forum kindly sponsored by