How do I install "Nvidia Prime" with this system?

I read on the mailing list that some were having trouble with snapshot 20170112 - hanging Plasma, broken extended display, I experienced neither. However, on my last zypper dup, it installed kernel 4.9.0.1, but when I boot, it is still kernel 4.9…0.2.

I hooked up a 23 inch display via conventional HDMI on my Asus GL752 VW Optimus laptop and did a normal boot:

   	 	 	 	   inxi -G                                                                                        
**Graphics: ** **Card-1:** Intel HD Graphics 530                                                                        
          **Card-2:** NVIDIA GM107M [GeForce GTX 960M]                                                             
          **Display Server:** X.Org 1.19.0 **drivers:** modesetting (unloaded: fbdev,vesa,intel)                       
          **Resolution:** 1920x1080@60.00hz, 1920x1080@60.00hz                                                     
          **GLX Renderer:** Mesa DRI Intel HD Graphics 530 (Skylake GT2) **GLX Version:** 3.0 Mesa 13.0.3            

  

Here’s my xrandr data:

   	 	 	 	   xrandr 
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 8192 x 8192 
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 381mm x 214mm 
  1920x1080     60.00*+ 
  1400x1050     59.98   
  1280x1024     60.02   
  1280x960      60.00   
  1024x768      60.04    60.00   
  960x720       60.00   
  928x696       60.05   
  896x672       60.01   
  800x600       60.00    60.32    56.25   
  700x525       59.98   
  640x512       60.02   
  640x480       60.00    59.94   
  512x384       60.00   
  400x300       60.32    56.34   
  320x240       60.05   
DP-1 disconnected (normal left inverted right x axis y axis) 
HDMI-1 disconnected (normal left inverted right x axis y axis) 
HDMI-2 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 476mm x 268mm 
  1920x1080     60.00*+  50.00    59.94   
  1920x1080i    60.00    50.00    59.94   
  1680x1050     59.88   
  1280x1024     75.02    60.02   
  1440x900      59.90   
  1280x960      60.00   
  1152x864      75.00   
  1280x720      60.00    50.00    59.94                                                                        
  1024x768      75.03    70.07    60.00                                                                        
  832x624       74.55                                                                                          
  800x600       72.19    75.00    60.32    56.25                                                               
  720x576       50.00                                                                                          
  720x480       60.00    59.94                                                                                 
  640x480       75.00    72.81    60.00    59.94                                                               
  720x400       70.08

  

I only noticed two things:

  1. the second 23-inch display screen was not as bright as the laptop screen – but good enough.
  2. the output shows DP-1 & HDMI-1, but, I only have one other connector and it is a newer HDMI form factor & I don’t have a cable at the present to test it.

Here is my glxspheres output:


   	 	 	 	   [FONT=monospace]glxspheres 
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres) 
Visual ID of window: 0xcd 
Context is Direct 
OpenGL Renderer: Mesa DRI Intel(R) HD Graphics 530 (Skylake GT2)  
62.405402 frames/sec - 69.644428 Mpixels/sec 
59.978793 frames/sec - 66.936333 Mpixels/sec 
59.972825 frames/sec - 66.929673 Mpixels/sec 
59.871636 frames/sec - 66.816746 Mpixels/sec 
60.011317 frames/sec - 66.972629 Mpixels/sec 
59.952902 frames/sec - 66.907438 Mpixels/sec 
59.971532 frames/sec - 66.928230 Mpixels/sec  
  

I’m happy with all that so far! Comments?

*I tried to go for Nvidia Prime, but got a black screen and could not get the X server to start, so, I backed out of that to read up some more.

Now that we have X server 1.19, I would be happy to help one of the experts test suse-prime/nvidia-prime when you are ready – assuming we get that kernel thing above smoothed out.*

[/FONT]

Sorry, I may miss something here, but what technical help are you trying to get here?

hcvv, I would like to get “Nvidia Prime” to work with the new xserver – as best that I can figure out, I need to edit xorg.config prior to reboot; else, i have an unbootable system (I could not get the xserver to start from runlevel 3) I need to figure that out.

I used http://download.opensuse.org/repositories/home:/Bumblebee-Project:/Bumblebee3/openSUSE_Tumbleweed/
and
http://download.opensuse.org/repositories/home:/Bumblebee-Project:/nVidia:/latest-beta/openSUSE_Tumbleweed/
and installed:
bumblebee dkms-nvidia x11-video-nvidia nvidia-compute dkms-bbswitch
and

  1. Add your user to the “bumblebee” and “video” user groups.

  2. Make sure the Bumblebee and DKMS services are enabled:
    systemctl enable bumblebeed
    systemctl enable dkms

  3. Make sure the Nouveau kernel module is blacklisted. To do that, check if the following line:
    blacklist nouveau
    exists in the file “/etc/modprobe.d/50-blacklist.conf”.
    and then run:
    mkinitrd

  4. Reboot and test!

Any comments greatly appreciated!

Based on what I have read, Nvidia Prime should work with the new Xserver and latest Nvidia proprietary drivers.
hcw, maybe you could re-title the thread to " How do I install “Nvidia Prime” with this system?"

I might have missed something, but the procedure you are outlining seems to install “bumblebee”, NOT something like Nvidia-prime: the latter involved a package called suse-prime-alt that have been retired from TW, maybe because of unresolvable issues.
On Leap 42.2 the package suse-prime can still be installed, but currently has issues; please see https://forums.opensuse.org/showthread.php/512260-Leap-42-1-Optimus-system-with-nvidia-prime-instead-of-bumblebee for details.

OrsoBruno. I previously tried the archived guide here:
https://www.reddit.com/r/openSUSE/comments/3slh7e/tumbleweed_how_to_set_up_nvidia_optimus_with_the_propietary_driver
using the Nvidia Prime driver.

Thanks to your link, I have found:
https://build.opensuse.org/package/show/home:bosim:suse-prime/suse-prime-altthat leads me to:
http://download.opensuse.org/repositories/home:/bosim:/suse-prime/openSUSE_Tumbleweed/

Your post #25, states: "2) suse-prime-alt should work with Tumbleweed and the Bumblebee Project driver (what I remembered, info here: https://build.opensuse.org/package/s…suse-prime-alt",I’ll try it and see. I think that leads to :
http://download.opensuse.org/repositories/home:/Bumblebee-Project:/nVidia:/375.26/openSUSE_Tumbleweed/
for the latest driver – from the Bumblebee-Project:/nvidia repo.
In any event, there are lots of xorg.config discussion in that thread. Surely, I can find something xorg that works that I was missing before.

Lastly, as one can tell, I’m a novice in this video stuff and anything Optimus requires a lot of reading on my part. We shall see…Thanks!

I’m in luck. I downloaded the suse-prime-alt rpm and took a look at it with “awk” and found"

xorg.config
Section "Files"
        ModulePath      "/usr/lib64/nvidia/xorg/modules/updates"
        ModulePath      "/usr/lib64/xorg/modules/updates"
        ModulePath      "/usr/lib64/xorg/modules"
EndSection

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"
EndSection
 
Section "Device"
    Identifier "intel"
    Driver "intel"
EndSection
 
Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection
 
Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:X:X:X"
    Option "DPI" "96 x 96"
EndSection
 
Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration" "on"
    Option "UseDisplayDevice" "None"
EndSection

That and a few more details and I’ll give it a try.

You are welcome, but please be aware that suse-prime-alt worked on the TW version available at the time and TW rolls VERY FAST :wink:
In other words, no guarantee that it should still work on the current version of TW NOW.
Good Luck and have fun!

Well,it worked somewhat:

I was able to install and re-boot without problem – still on the intel device.

Once back up, I did “prime-select nvidia” and when I tried to logout, the helper crashed.
I then went to runlevel 3 “init 3” and back “init 6” and was using the nVidia device --Yea!

: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0xa1
Context is Direct
OpenGL Renderer: GeForce GTX 960M/PCIe/SSE2
1980.588234 frames/sec - 2210.336469 Mpixels/sec
2018.783649 frames/sec - 2252.962552 Mpixels/sec
2022.322083 frames/sec - 2256.911445 Mpixels/sec
2023.751754 frames/sec - 2258.506957 Mpixels/sec
1988.688490 frames/sec - 2219.376355 Mpixels/sec
1865.613027 frames/sec - 2082.024138 Mpixels/sec
1869.932240 frames/sec - 2086.844380 Mpixels/sec

A major step forward IMHO.

I will research that logout/in fault & report back.

Thanks to all!

IIRC logout/login always had problems. IIRC when I tried suse-prime-alt I used a console (i.e. Ctrl+Alt+F1) to issue the “prime-select” commands, ensured to always boot/shutdown in “Intel” mode and logged in my work username after having selected the mode needed (usually “nvidia”).
That appears to be somewhat HW dependent, so Your Mileage Might Vary…

I have had trouble logging in as user after using a terminal; can’t get “startx” to run. What I have found that works is to issue “prime-select nvidia” in a superuser terminal and then do “shutdown -r now”.
(note: on this machine, the reboot hangs at the keyboard back lighting dim & I have to tap the “on” button for it to continue. That is not an issue with susu-prime-alt/nvidia-prime as I have had that issue in Tumbleweed since several zypper dups ago.
Also note that with Leap 42.2, I don’t have this reboot problem (plus not using bumblebee or nvidia prime)).
I have to do the same to get Intel back with “prime-select intel”.

Here are glxspheres with nVidia:

glxspheres
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0xa1
Context is Direct
OpenGL Renderer: GeForce GTX 960M/PCIe/SSE2
1819.090799 frames/sec - 2030.105332 Mpixels/sec
1861.060504 frames/sec - 2076.943522 Mpixels/sec
1838.583127 frames/sec - 2051.858770 Mpixels/sec
1838.341118 frames/sec - 2051.588688 Mpixels/sec
1838.838445 frames/sec - 2052.143704 Mpixels/sec
1848.065776 frames/sec - 2062.44140

and here is “powertop” with nVidia{

The battery reports a discharge rate of 31.2 W
The estimated remaining time is 1 hours, 23 minutes

Summary: 1144.2 wakeups/second, 18.5 GPU ops/seconds, 0.0 VFS ops/sec and 14.2% CPU use

            Usage       Events/s    Category       Description
         19.9 ms/s     217.8        Process        kwin_x11 -session 1028c1d320b210000148461530900000016130
         63.6 ms/s     193.5        Process        /usr/bin/plasmashell --shut-up
          5.1 ms/s     160.4        Process        powertop
          7.7 ms/s     140.0        Process        [irq/133-nvidia]
          2.4 ms/s      75.8        Process        /usr/bin/parcellite
         18.0 ms/s      72.9        Process        /usr/bin/X -nolisten tcp -auth /run/sddm/{66d706a2-b2b5-
          0.8 ms/s      56.4        Timer          tick_sched_timer
        631.3 us/s      36.0        Interrupt      [6] tasklet(softirq)
        112.1 us/s      29.2        Timer          intel_uncore_fw_release_timer
          4.4 ms/s      23.3        Process        /usr/bin/konsole --profile Root Shell
        323.6 us/s      26.2        Process        [i915/signal:1]
        171.6 us/s      22.4        Process        [rcu_preempt]
          1.2 ms/s      12.6        Process        kded5 [kdeinit5]
        482.4 us/s      11.7        kWork          os_execute_work_item
          0.7 ms/s       8.7        Process        /usr/bin/krunner
        387.1 us/s       5.8        Process        /usr/lib64/libexec/kf5/klauncher --fd=9
        371.8 us/s       5.8        Process        /usr/bin/kglobalaccel5
        403.6 us/s       4.9        Process        /usr/bin/kwalletd5
        399.8 us/s       4.9        Process        /usr/bin/kactivitymanagerd start-daemon
        398.1 us/s       4.9        Process        /usr/bin/kuiserver5
        359.0 us/s       4.9        Process        /usr/lib64/libexec/kdeconnectd
        356.0 us/s       4.9        Process        /usr/lib64/libexec/kf5/kscreen_backend_launcher
        236.5 us/s       4.9        Process        [irq/129-iwlwifi]
          0.8 ms/s       3.9        Process        /usr/sbin/NetworkManager --no-daemon
        649.1 us/s       3.9        Process        /usr/bin/konsole
        385.9 us/s       3.9        Process        /usr/lib64/libexec/org_kde_powerdevil -session 1028c1d32
        371.4 us/s       3.9        Process        /usr/bin/xembedsniproxy
        536.3 us/s       2.9        Process        /usr/bin/ksmserver
        346.6 us/s       2.9        Process        /usr/lib64/libexec/polkit-kde-authentication-agent-1
          3.8 ms/s       1.0        Timer          hrtimer_wakeup
        397.8 us/s       1.9        Process        /usr/bin/kaccess
         71.2 us/s       1.9        Process        /usr/sbin/ntpd -p /var/run/ntp/ntpd.pid -g -u ntp:ntp -c
         55.4 us/s       1.9        kWork          gc_worker
         28.7 us/s       1.9        Process        /usr/sbin/haveged -w 1024 -v 0 -F
        342.5 us/s       1.0        Interrupt      [7] sched(softirq)
          2.7 ms/s      0.00        Interrupt      [133] nvidia
         11.0 us/s       1.0        kWork          pci_pme_list_scan
          5.0 us/s       1.0        kWork          flush_to_ldisc
          2.4 us/s       1.0        kWork          console_callback
          2.3 us/s       1.0        Timer          sched_rt_period_timer
        535.4 us/s      0.00        Process        /bin/dbus-daemon --system --address=systemd: --nofork --
        508.6 us/s      0.00        Interrupt      [9] RCU(softirq)
        357.3 us/s      0.00        Interrupt      [128] i915
        332.0 us/s      0.00        Interrupt      [1] timer(softirq)
        191.8 us/s      0.00        Process        [kworker/5:1]
        114.2 us/s      0.00        Interrupt      [0] HI_SOFTIRQ
        110.6 us/s      0.00        Timer          process_timeout
         74.5 us/s      0.00        kWork          vmstat_update
         52.3 us/s      0.00        Timer          nvidia_rc_timer
         47.3 us/s      0.00        Timer          delayed_work_timer_fn
         42.4 us/s      0.00        Interrupt      [1] i8042
         38.8 us/s      0.00        kWork          vmstat_shepherd
         34.3 us/s      0.00        Process        [kworker/0:3]

As compared to 2 hours, 31 minutes with the 530 intel alone.

I will continue to explore that logout issue as time permits. I’m reading related posst in the nvidia linux forum and there are lots of them. Any ideas greatly appreciated.

Startx has been depreciated for some time now you have to be root or mode the permission on startx

I did not know that, thanks. I was trying to start x without having to be in root.

Anyway, I just did a “zypper dup --no-allow-vendor-change” and had 193 upgrades – which included a new 9.3.1.1 kernel set.

Of course, that broke nvidia prime i.e., suse-prime (alt). I deleted all all those packages and did “zypper clean”, so I think I am back to a clean Tumbleweed install.

I’ll try this again later, probably with the latest beta driver…

I did a re-install as per above and did a “zypper dup --no-allow-vendor-change” , there was a dkms & nvidia-dkms update and they did their thing – took a while. I still had the logout greeter/helper crash and had to reboot from a superuser terminal; but, the nvidia card is working well!

There is a new Tumbleweed 20170121 release up with kernel-source (4.9.3 -> 4.9.4); I’ll give it a try, but right now, I have to go to work.

Have fun!

Just to follow up, I did a “zypper dup” and got a new kernel which broke the Suse-prime-alt install (again).

I tried a lot of “fixes” like re-install the prime video RPM set, etc.; nothing worked. I then booted to run level 3 and on my desktop, googled for “dkms install nvidia commands” and tried numerous recovery attempts. I think all I did was make things worse; so, I re-installed Tumbleweed to get a fresh starting point.

Learning curve – read up on “dkms” – list the recovery commands, what they do and when to use them.

Have fun!

As far as I know, if you have a kernel greater than 4.5 then Prime is accommodated and will work automatically together with the proprietary Nvidia driver 376.26… no need to install anything

This will support it by default. So, if you have an Optimus set up with integrated Intel GPU and an Nvidia one, this is enough for it to work.
Using Bumblebee at the same time is likely to get in the way, and that might be why external monitors and other things don’t work properly. I discovered this to my detriment after the last few kernel updates on Tumbleweed. I removed all traces of Bumblebee and now have a smooth working system, with a smooth and snappy glxspheres demo too
There is lately a lot of information on Prime offloading on the Nvidia developers website and freedesktop.org https://nouveau.freedesktop.org/wiki/Optimus/

but my concern is what the best solution might be for Leap 42.2?.. I just installed that on a machine with Optimus and am not sure how to get the performance on a level with yet another laptop I have with Leap 42.2 and a dedicated Nvidia card