Giter Site home page Giter Site logo

grub-nvidia-entry's Introduction

Grub-Nvidia-Entry

If you installed Nvidia drivers through Negativo17 or RPMfusion, the Nvidia card would always be on by default. As the dedicated GPU consumes a lot of power, it is a significant problem to those using laptops.

Features

  • grub-nvidia-entry.sh makes Grub load Nouveau instead of Nvidia drivers on normal basis and creates a new entry which loads Nvidia drivers.
  • nnswitch.sh lets you switch between Nouveau and Nvidia drivers within seconds.

Usage

  • nnswitch.sh: Switch to Nouveau or Nvidia proprietary dirvers. You'll be brought to the login screen right after the switch. The whole process should be around 5 seconds.

Advantages

Why is this method preferred over Bumblebee?

Prerequisites

Supported Operating Systems

  • Fedora 26 ~ 29

Installation

Easy Setup

  • To make the script do everything automatically, run make enable && make.
  • To completely remove everything, run make uninstall.

All Options

  • make or make run: Runs grub-nvidia-entry.sh. Changes take effect on the next boot.
    1. Current session: make / make run
    2. Next boot: changes should take effect
  • make force: Same as running make, but without checking Linux kernel's version and the presence of Nvidia modules.
  • make enable: Registers grub-nvidia-entry.service and gdm-nvidia-wayland-switch.service and enables them. grub-nvidia-entry.sh will update all configurations on the next boot. However, you'll have to reboot again to see the changes.
    1. Current session: make enable / Kernel update
    2. Next boot: grub-nvidia-entry.sh executes
    3. Second boot: changes should take effect
  • make disable: Disables grub-nvidia-entry.service and gdm-nvidia-wayland-switch.service.
  • make install: Registers grub-nvidia-entry.service and gdm-nvidia-wayland-switch.service.
  • make uninstall: Deregisters and uninstalls all components.
  • make sign: Signs Nvidia modules for Secure Boot with SignNvidia.sh. Note that this is NOT included in make enable and should be re-run MANUALLY on every kernel update.

GPU Verification

Intel/Nouveau

iGPU: glxgears -info | grep GL_VENDOR image dGPU(Nouveau): DRI_PRIME=1 glxgears -info | grep GL_VENDOR image

Intel/Nvidia

glxgears -info | grep GL_VENDOR image

Caution

Full installation overwrites /usr/lib/systemd/system/switcheroo-control.service, /etc/grub.d/40_custom, /usr/lib/udev/rules.d/61-gdm.rules, and /etc/gdm/custom.conf.

Issues

  • There's an upstream bug that prevents Gnome from detecting dedicated GPU when Secure Boot is on. DRI_PRIME=1 works fine though. A workaround is to disable Secure Boot for now.
  • Upstream made a change to disable GDM's ability to launch Wayland backend if Nvidia proprietary drivers are used. However, GDM seems to be not regaining the ability even after the drivers are unloaded[need confirmation]. A workaround is applied in the commit, 382ddeb.

Todo

  • RPM package
  • Better documentation for user to check what went wrong.
  • Gnome extension

Development Stopped

I've switched to another laptop with AMD graphics card.

grub-nvidia-entry's People

Contributors

julianneswinoga avatar rwnicholas avatar superdanby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

grub-nvidia-entry's Issues

black screen after using nnswitch in the same Xsession

I am using fedora29 with negativo nvidia drivers. Using the boot parameters which is provided by your project. When I use nnswitch for the first time it changes from nvidia to the non-nvidia driver flawlessly but when I want to revert back to nvidia there's a black screen.
video card- Nvidia gtx1060 max-q

No entry added

Hi,

I cloned the repository and tried both "make enable" and "make" but no entry was added to grub on reboot. The service however seems to be running, yet Nvidia is running.
I'm running Fedora 28 Gnome Version 3.28.2 on Dell XPS 15 9560.
I'm not really sure how to debug this, so please let me know what information I can add that can be useful.

Thanks!

Gnome Shell Can't Detect Dedicated Graphics Card.

Gnome shell can't detect the dGPU. Consequently, the option "Launch using Dedicated Graphics Card" in Gnome's right click menu is not shown.
Nouveau is being loaded correctly. It is tested with DRI_PRIME=1 glxgears -info.

System information:
Secure Boot: On
Kernel: 4.15.4-300.fc27.x86_64
Gnome: 3.26.2
Mode: Intel + Nouveau

How reproducible: 100%

Actual results:
Gnome not detecting dGPU.

Expected results:
image
image

Additional information:
This problem has existed from kernel 4.13 at least.

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.