GithubHelp home page GithubHelp logo

suseprime's Introduction

openSUSE nvidia-prime like package

Assumptions

Installation/usage

  1. Run sudo prime-select nvidia log out and login again, hopefully you are using the NVIDIA card. To switch back to te Intel card run sudo prime-select intel (modesetting driver) or sudo prime-select intel2 (Intel Open Source driver, requires xf86-video-intel package).
  2. To check which video card you're currently using run /usr/sbin/prime-select get-current.
  3. On intel configurations, powering off the NVIDIA card with bbswitch to save power and decrease temperature is supported but requires additional manual setup. Refer to instructions below.

Contact

Related projects

NVIDIA power off support

Powering off the NVIDIA card when not in use is very efficient for significantly decreasing power consumption (thus increase battery life) and temperature. However, this is complicated by the fact that the card can be powered off only when the NVIDIA kernel modules are not loaded.

Install bbswitch

bbswitch is the kernel module that makes it possible to power off the NVIDIA card entirely. Install it with:

zypper in bbswitch

Blacklist the NVIDIA modules so it can be loaded only when necessary

The NVIDIA openSUSE package adds the NVIDIA driver modules to the kernel initrd image. This will make the system always load them on boot. This is problematic for disabling the NVIDIA card with bbswitch as it can only turn off the card when the modules are not loaded. Instead of unloading the modules before making use of bbswitch, the reverse is way easier: have the NVIDIA modules always unloaded and load them only when needed. To prevent the modules from being automatically loaded on boot, we need to blacklist them in initrd. This is easily done with:

cp /etc/prime/09-nvidia-blacklist.conf /etc/modprobe.d
dracut -f

This will also blacklist the nouveau module which can really get in the way with Optimus and causing black screens.

Install the systemd services for doing switch and set correct card during boot

cp /etc/prime/prime-select.service           /usr/lib/systemd/system
systemctl enable prime-select

If nvidia is set, it will load the NVIDIA modules before starting the Graphical Target. Moreover, if an intel config is set but the Intel card was disabled in BIOS (leaving only the dGPU), this service will automatically switch to the nvidia config. The reverse is also true (nvidia config set but BIOS configured to use iGPU only).

FAQ

How do I select a driver ?

sudo prime-select <driver>

Where <driver> is one of:

  • intel: use the modesetting driver
  • intel2: use the intel driver (xf86-video-intel)
  • nvidia: use the NVIDIA proprietary driver

How do I check the current driver configured and the power state of the NVIDIA card ?

/usr/sbin/prime-select get-current
Driver configured: intel
[bbswitch] NVIDIA card is OFF

To get more details on the Xorg driver, install package inxi if necessary and use inxi -G:

inxi -G
Graphics:  Device-1: Intel UHD Graphics 630 driver: i915 v: kernel 
           Device-2: NVIDIA GP107GLM [Quadro P600 Mobile] driver: N/A 
           Display: x11 server: X.Org 1.20.4 driver: intel resolution: 3840x2160~60Hz 
           OpenGL: renderer: Mesa DRI Intel UHD Graphics 630 (Coffeelake 3x8 GT2) v: 4.5 Mesa 18.3.4

suseprime's People

Contributors

bosim avatar egd avatar khazakar avatar michalsrb avatar nicklion avatar simopil avatar sndirsch avatar vinzv avatar zutto 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.