Git Product home page Git Product logo

fedoraprime's Introduction

Fedora Prime

A collection of shell scripts that makes it possible to use the NVIDIA GPU on a Optimus Laptop. The switching is similar to the feature provided by the nvidia-prime package in Ubuntu. However, no such package has been made for other distributions. This is exactly the functionality this package provide.

Background

In 2012, Linus Torvalds gave his famous talk at the University of Helsinki where he gave NVIDIA the middle finger due to lack of support of, in particular, device drivers for the optimus laptops. Not long after NVIDIA provided both documentation for developers of the nouveau project (an open-source implementation of the NVIDIA drivers) and partially support for switching between the Intel and NVIDIA drivers. Canonical then began working on their nvidia-prime package that should make the switching simple, basically just providing one command prime-select for switching, taking either nvidia or intel as parameter. The downside is that you need to logout for the switching to happen. The same limitations are there for this package.

Installation

Supported operating systems: Fedora 22, Fedora 23.

  • Install NVIDIA drivers from RPM Fusion repository (you need to enable it first, if you haven't already, follow instruction on the site):

    sudo dnf install kernel-devel akmod-nvidia
    # for 32 bit compatibility also install: xorg-x11-drv-nvidia-libs.i686
  • Make sure that nouveau (an open source NVIDIA driver) is blacklisted:

    sudo mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img
    sudo dracut -f /boot/initramfs-$(uname -r).img $(uname -r)
  • Install FedoraPrime:

    git clone https://github.com/mvoropaiev/FedoraPrime.git
    cd FedoraPrime
    sudo make install
    # to uninstall, simply run:
    # sudo make uninstall

Usage

To switch a graphic card, you need to run the following command:

# switch to nvidia:
sudo fedora-prime-select nvidia
# switch to intel:
sudo fedora-prime-select intel

Now all you have to do is logout and then login back and you should be using a desired graphic card. You can verify it by running glxinfo | grep 'OpenGL renderer string' for example.

Known bugs

  • If you are in Intel mode and your system has been suspended, changing to NVIDIA may result in blank screen. Therefore you may need to reboot your machine. This is due to limitations of gdm (Ubuntu has patched gdm to run a script similar to xinitrc.nvidia, but these changes are not available upstream, thanks Ubuntu). We set the intel card active during reboot, so we should always be able to recover from the blackscreen by rebooting.

Author

fedoraprime's People

Contributors

bosim avatar mvoropaiev avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.