| Summary: | Add nvidia-prime as a better alternative to Bumblebee for Hybrid Graphics | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Kristoffer Grundström <lovaren> |
| Component: | New RPM package request | Assignee: | Mageia Bug Squad <bugsquad> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | major | ||
| Priority: | Normal | CC: | curtis_mageia, ghibomgx, lovaren |
| Version: | Cauldron | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Source RPM: | nvidia-prime | CVE: | |
| Status comment: | |||
|
Description
Kristoffer Grundström
2015-09-03 06:21:14 CEST
Here's the code for nvidia-prime: https://launchpad.net/ubuntu/+source/nvidia-prime
Kristoffer Grundström
2015-09-03 06:22:27 CEST
CC:
(none) =>
kristoffer.grundstrom1983 Here's how to install and configure the Optimus driver in Ubuntu: http://xmodulo.com/install-configure-nvidia-optimus-driver-ubuntu.html THIS might also be a possible solution: ftp://ftp.pbone.net/mirror/rpmfusion.org/nonfree/fedora/updates/21/SRPMS/nvidia-kmod-352.30-2.fc21.src.rpm according to https://ask.fedoraproject.org/en/question/9106/what-is-the-difference-between-an-akmod-and-kmod/ AFAIK nvidia-prime is a Ubunutu-specific collection of scripts, we can't use it. I do want to check what the modern Linux world has to propose nowadays as an alternative to bumblebee for non-Ubuntu systems. The nvidia-kmod package from RPM Fusion is just the nvidia driver to compile with changing kernels, just like our dkms-nvidia. Remi: Well, did you read about the difference between kmod and akmod? (In reply to Kristoffer Grundström from comment #5) > Remi: Well, did you read about the difference between kmod and akmod? Well after reading again, akmod == dkms in our repos, while nvidia-kmod would be the precompiled nvidia-current module. Still not particularly relevant as far as optimus laptop are concerned. But the standard installation with xorg-driver-video-nouveau stalls the computer after first reboot after a long delay so you have any idea on a working fix? http://pastebin.com/yPCJYyAR shows everything we need to make a working test-rpm to put in Cauldron. Thanks, but you can trust me, making a RPM of nvidia-prime would be useless as this is only a bunch of _Ubuntu-specific_ scripts. I.e. nvidia-prime relies on dpkg and configuration stuff that only work in Ubuntu, just like the Mageia Control Center would not work as expected if run in Ubuntu. Closing as wontfix as per comment #9. Status:
NEW =>
RESOLVED Giuseppe investigated this a bit lately and might have a different opinion, so CC'ing him in case he wants to reopen and see it worked on e.g. for the Mageia 7 milestone. CC:
(none) =>
ghibomgx (In reply to Rémi Verschelde from comment #11) > Giuseppe investigated this a bit lately and might have a different opinion, > so CC'ing him in case he wants to reopen and see it worked on e.g. for the > Mageia 7 milestone. Then I'd advise opening a new bug report linked to this one for cleaner history. OK, I open a new bug report (sort of nvidia-prime package request) which summarize what follows.
IMHO stuff is a lot easier than it apparently seems if would be satisfied in a moderate approach about getting the nvidia card working as first and only graphics card like it was before the Optimus technology in 2010 where you could easily disable hybrid graphics from BIOS, or like it happens when you actually use an external desktop nvidia graphics card with proprietary drivers.
Don't confuse with the "conflicts" between nvidia proprietary drivers and nouveau, or other problems with nouveau itself, because that's another stuff. The nouveau kernel module is usually automatically loaded when an nvidia card is found. To avoid or get rid of this one have either to pass nouveau.modeset=0 to the booting command line (or patch the nouveau kernel module so that it's not automatically loaded but that's a lot more complicate). Blacklisting nouveau in modprobe.conf.d is usually not enough.
What the ubuntu approach seems to do, is that they have actually two
set of big scripts one is gpu-manager and the other is nvidia-prime. I
had a quick glance to them (so don't take this as written in stone), and
seems that one set is for switching the GL libraries from mesa to the
proprietary libGL, the other is to write a xorg.conf file (they
usually don't ship by default any xorg.conf file) with the proper
configuration, and that it "inactive"(S) the intel driver, and the latest
is to trigger the discrete card in a /proc switch in a loaded kernel
module called "bbswitch" (which we already had packaged as dkms since
it's already needed by bumblebee).
More or less part of this stuff is already available in mageia, in fact:
1) the switching between proprietary GL and Mesa configuration we already did in %post scripts of proprietary drivers or XFdrake just using:
update-alternatives --set gl_conf <nvidia.conf>
2) The xorg.conf is already configured with the nvidia proprietary drivers by XFdrake. What lacks is just the part:
Section "ServerLayout"
Identifier "layout"
Screen 0 "nvidia"
Inactive "intel"
EndSection
to have inactive intel. And adding the proper BusID PCI:X:Y:Z for
nvidia card.
3) Adding some initrd scripts. This is needed which just read a var set in /etc/sysconfig/nvidia-prime for instance and run some trigger echo to > /proc/acpi/bbswitch.
SuSe has also a similar approach with a mini-utility called
SuSE-prime, IIRC they also play with xrandr. And appends the following
options to the nvidia device section of xorg.conf
Option "AllowEmptyInitialConfiguration" "on"
Option "UseDisplayDevice" "None"
I hadn't yet the time to experiment further. IMHO just backporting
nvidia-prime package "as is" is even more complicate as they use
scripts we don't need or don't have.
OK, more or less the approach could be like this (the bbswitch isn't indeed needed anymore): 1) configure the nvidia card with XFdrake using proprietary drivers, this will create a default xorg.conf and also will switch the GL libraries to the nvidia ones, using this command: /usr/sbin/update-alternatives --set gl_conf /etc/nvidia-current/ld.so.conf ldconfig -v this is also what the prime-switch like utils of other distros more or less do. 2) prepare an /etc/X11/xorg.conf with minimal entries, which is like this: ------ xorg.conf ----------------- Section "ServerLayout" Identifier "layout" Screen 0 "nvidia" Inactive "intel" EndSection Section "Device" Identifier "intel" Driver "modesetting" Option "AccelMethod" "None" EndSection Section "Screen" Identifier "intel" Device "intel" EndSection Section "Device" Identifier "nvidia" Driver "nvidia" BusID "PCI:1:0:0" EndSection Section "Screen" Identifier "nvidia" Device "nvidia" EndSection --------------------------------- as stated here: http://http.download.nvidia.com/XFree86/Linux-x86/367.57/README/randr14.html The BusID is the PCI-ID shown for the nvidia graphics card. And 3) add the script: xrandr --setprovideroutputsource modesetting NVIDIA-0 xrandr --auto somewhere in the X11 init scripts. Note that the AllowEmptyInitialConfiguration as well as the UseDisplayDevice soptions eems actually ignored, so we don't add them here.
Curtis Hildebrand
2016-10-14 09:01:32 CEST
CC:
(none) =>
curtis_mageia You said you opened a new bug report but you still comment here. Have I missed the new bug report? |