LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-19-2018, 06:47 PM   #1
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
fedora 28 | nvidia optimus


hi, i am trying to run a game on one of those hybrid intel/nvidia pc's using this guide:
https://rpmfusion.org/Howto/Optimus

i am unable to toggle off the intel gpu in the uefi/bios but no matter what i do the system keeps trying to use the intel gpu instead of the nvidia one.

anyone have experience with these:
Code:
[schneidz@xbmc ~]$ uname -a -m -p
Linux xbmc 4.17.14-202.fc28.x86_64 #1 SMP Wed Aug 15 12:29:25 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[schneidz@xbmc ~]$ dmesg | grep "command line"
[    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.17.14-202.fc28.x86_64 root=UUID=7957bfa9-dee8-4ffe-bb71-a27c7b274f28 ro rhgb quiet nouveau.modeset=0 rd.driver.blacklist=nouveau video=vesa:off LANG=en_US.UTF-8 modprobe.blacklist=nouveau nvidia-drm.modeset=1
[schneidz@xbmc ~]$ lspci -vnn | grep '\''[030[02]\]'
00:02.0 VGA compatible controller [0300]: Intel Corporation Skylake GT2 [HD Graphics 520] [8086:1916] (rev 07) (prog-if 00 [VGA controller])
02:00.0 3D controller [0302]: NVIDIA Corporation GM108M [GeForce 930M] [10de:1346] (rev a2)
[schneidz@xbmc ~]$ lsmod | grep nvidia
nvidia              14061568  15
ipmi_msghandler        57344  2 ipmi_devintf,nvidia
[schneidz@xbmc ~]$ which randr
/usr/bin/which: no randr in (/usr/share/Modules/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/schneidz/.local/bin:/home/schneidz/bin)
[schneidz@xbmc ~]$ xrandr --output <output> --set "PRIME Synchronization" 1
bash: output: No such file or directory
[schneidz@xbmc ~]$ nvidia-settings 

ERROR: Unable to find display on any available system

[schneidz@xbmc ~]$ nvidia-settings -v

nvidia-settings:  version 396.45  (mockbuild@buildvm-01.online.rpmfusion.net) 
Fri Jul 20 12:11:21 CEST 2018
  The NVIDIA X Server Settings tool.

  This program is used to configure the NVIDIA Linux graphics driver.
  For more detail, please see the nvidia-settings(1) man page.
[schneidz@xbmc ~]$ glxinfo | grep "renderer string"
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2)

Last edited by schneidz; 08-19-2018 at 06:56 PM.
 
Old 08-19-2018, 07:06 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,840

Rep: Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148
I don't have Optimus hardware, but AFAIU the nvidia driver is invoked with the 'optirun' command. The general syntax is: optirun [options] application [application-parameters]. For example
Code:
optirun glxgears -info
and $USER needs to be a member of the 'bumblebee' group...
Code:
gpasswd -a $USER bumblebee
More info...
https://docs.fedoraproject.org/en-US...bee/index.html
 
Old 08-19-2018, 09:19 PM   #3
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Original Poster
Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
thanx, supposedly bumblebee is old hat but i gave it a swing anyways:
Code:
[schneidz@xbmc ~]$ groups
schneidz wheel bumblebee
[schneidz@xbmc ~]$ optirun glxgears -info
[ 1071.762181] [ERROR]Cannot access secondary GPU, secondary X is not active.

[ 1071.762259] [ERROR]Aborting because fallback start is disabled.
[schneidz@xbmc ~]$ primusrun glxgears
primus: fatal: Bumblebee daemon reported: econdary X is not active.
 
Old 08-19-2018, 11:26 PM   #4
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,840

Rep: Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148
I'm out of my depth on this, but reading through the guide I linked to...perhaps check the status of the following
Code:
systemctl status bumblebeed
*should be enabled
Code:
systemctl status nvidia-fallback
*should be disabled

Note the guide I linked to also discusses some diagnostic info regarding some errors. Did you read that guide completely? This might be relevant perhaps...
Quote:
[ERROR]Cannot access secondary GPU: No devices detected

In some instances, running optirun will return:

[ERROR]Cannot access secondary GPU - error: [XORG] (EE) No devices detected.
[ERROR]Aborting because fallback start is disabled.

In this case, you will need to move the file /etc/X11/xorg.conf.d/20-intel.conf to somewhere else, restart the bumblebeed daemon and it should work. If you do need to change some features for the Intel module, a workaround is to merge /etc/X11/xorg.conf.d/20-intel.conf to /etc/X11/xorg.conf.

It might be also necessary to comment the driver line in /etc/X11/xorg.conf.d/10-monitor.conf.

You might also need to define the NVIDIA card somewhere (e.g. file /etc/bumblebee/xorg.conf.nvidia), using the correct BusID according to lspci output:

Section "Device"
Identifier "nvidiagpu1"
Driver "nvidia"
BusID "PCI:0:1:0"
EndSection

Note that the format of lspci output is in hexadecimal format, while in xorg it is in decimal. So if the output of lspci is, for example, 0a:00.0 the BusID should be PCI:10:0:0.
 
1 members found this post helpful.
Old 08-20-2018, 11:19 AM   #5
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Original Poster
Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
thanks again, even after disabling nvidia fallback, it magically comes back o for the next reboot:
Code:
[schneidz@xbmc ~]$ sudo systemctl disable nvidia-fallback
[schneidz@xbmc ~]$ sudo shutdown -r now

...

[schneidz@xbmc ~]$ systemctl status nvidia-fallback
● nvidia-fallback.service - Fallback to nouveau as nvidia did not load
   Loaded: loaded (/usr/lib/systemd/system/nvidia-fallback.service; disabled; vendor preset: disabled)
   Active: active (exited) since Mon 2018-08-20 12:03:18 EDT; 3min 22s ago
  Process: 948 ExecStartPost=/bin/plymouth message --text=NVIDIA kernel module missing. Falling back to >
  Process: 924 ExecStart=/sbin/modprobe nouveau (code=exited, status=0/SUCCESS)
 Main PID: 924 (code=exited, status=0/SUCCESS)

Aug 20 12:03:12 xbmc systemd[1]: Starting Fallback to nouveau as nvidia did not load...
Aug 20 12:03:18 xbmc systemd[1]: Started Fallback to nouveau as nvidia did not load.
lines 1-9/9 (END)
[schneidz@xbmc ~]$ systemctl status bumblebeed
● bumblebeed.service - Bumblebee C Daemon
   Loaded: loaded (/usr/lib/systemd/system/bumblebeed.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2018-08-20 12:02:31 EDT; 7min ago
 Main PID: 692 (bumblebeed)
    Tasks: 1 (limit: 4915)
   Memory: 1.6M
   CGroup: /system.slice/bumblebeed.service
           └─692 /usr/sbin/bumblebeed

Aug 20 12:02:31 xbmc systemd[1]: Started Bumblebee C Daemon.
Aug 20 12:03:07 xbmc bumblebeed[692]: [   62.464114] [INFO]/usr/sbin/bumblebeed 3.2.1 started
so i got a solution so i'll mark this as solved eventhough my nvidia graphics adapter has slower fps in the game i am playing than my intel adapter:
Code:
[schneidz@xbmc ~]$ lsmod | egrep "nv|nou|915"
tun                    49152  1
nouveau              2023424  0
ttm                   126976  1 nouveau
i915                 2052096  24
i2c_algo_bit           16384  2 i915,nouveau
mxm_wmi                16384  1 nouveau
drm_kms_helper        196608  2 i915,nouveau
drm                   458752  25 drm_kms_helper,i915,ttm,nouveau
video                  45056  3 asus_wmi,i915,nouveau
wmi                    32768  4 asus_wmi,wmi_bmof,mxm_wmi,nouveau
[schneidz@xbmc ~]$ glxspheres64 
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0x1d1
Context is Direct
OpenGL Renderer: Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2) 
60.462362 frames/sec - 67.475995 Mpixels/sec
60.035922 frames/sec - 67.000089 Mpixels/sec
59.983189 frames/sec - 66.941239 Mpixels/sec
^C
[schneidz@xbmc ~]$ sudo rmmod nouveau 
[schneidz@xbmc ~]$ sudo insmod /lib/modules/4.17.14-202.fc28.x86_64/extra/nvidia/nvidia.ko
[schneidz@xbmc ~]$ sudo insmod /lib/modules/4.17.14-202.fc28.x86_64/extra/nvidia/nvidia-modeset.ko
[schneidz@xbmc ~]$ sudo insmod /lib/modules/4.17.14-202.fc28.x86_64/extra/nvidia/nvidia-drm.ko
[schneidz@xbmc ~]$ sudo insmod /lib/modules/4.17.14-202.fc28.x86_64/extra/nvidia/nvidia-uvm.ko
logout and log back in:
Code:
[schneidz@xbmc ~]$ lsmod | egrep "nv|nou|915"
nvidia_uvm            925696  0
nvidia_drm             45056  4
nvidia_modeset       1093632  3 nvidia_drm
nvidia              14061568  207 nvidia_uvm,nvidia_modeset
tun                    49152  1
ipmi_msghandler        57344  2 ipmi_devintf,nvidia
i915                 2052096  13
i2c_algo_bit           16384  1 i915
drm_kms_helper        196608  2 nvidia_drm,i915
drm                   458752  19 drm_kms_helper,nvidia_drm,i915,ttm
video                  45056  2 asus_wmi,i915
[schneidz@xbmc ~]$ glxspheres64 
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0x6c
Context is Direct
OpenGL Renderer: GeForce 930M/PCIe/SSE2
655.116158 frames/sec - 731.109633 Mpixels/sec
665.840378 frames/sec - 743.077862 Mpixels/sec
692.870984 frames/sec - 773.244018 Mpixels/sec
^C
but the game i am running has low fps and tearing.

also it seems buggy that i can only log into gnome when i log in (lxde, cinnamon, openbox, kodi, ...).
and just now the screen flashes ad brings me back to gdm when i try to log into gnome. i have to now use 'gnome on xorg'.

Last edited by schneidz; 08-20-2018 at 11:27 AM.
 
Old 08-20-2018, 02:43 PM   #6
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,840

Rep: Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148
Were you using Gnome (Wayland) before? If so, I don't think such a solution would work anyway. The nvidia driver isn't Wayland ready yet, let alone Optimus support.
 
Old 08-20-2018, 08:08 PM   #7
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,840

Rep: Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148
Further reading about Fedora 28 and Gnome 3.28 leads me to understand that Mutter (Wayland compositor for Gnome) now has EGL streams support for those wanting to use the proprietary NVIDIA driver. I'm not sure if it is possible to switch video cards with PRIME though

https://fedoramagazine.org/whats-new...8-workstation/
https://negativo17.org/nvidia-driver...for-fedora-25/
https://wiki.archlinux.org/index.php/PRIME
 
  


Reply

Tags
fedora 28, nvidia, optimus



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: NVIDIA are working towards better support for NVIDIA Optimus on Linux LXer Syndicated Linux News 0 08-16-2018 06:42 AM
LXer: NVIDIA Driver with Improved Optimus Support Lands for Fedora 25+ LXer Syndicated Linux News 0 05-13-2017 04:12 AM
NVIDIA Optimus + Bumblebee -> Nvidia X Server setting? cooltoad Linux - Hardware 4 02-05-2014 07:01 PM
[SOLVED] Turning off Nvidia GPU on Asus N53SV laptop. Nvidia Optimus. Installed Bumblebee Lop3 Linux - Laptop and Netbook 7 10-22-2013 07:11 AM
NVIDIA GeForce GT 540M graphics & NVIDIA Optimus Technology rabizadeh_ehsan Linux - Hardware 5 10-21-2011 07:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration