Simply enable or disable your Nvidia dGPU

Overview

EnvyControl (WIP)

Simply enable or disable your Nvidia dGPU

Usage

First clone this repo and install envycontrol with sudo pip install .

CLI

Turn off your Nvidia dGPU: sudo envycontrol --switch off

Turn on your Nvidia dGPU: sudo envycontrol --switch on

Query the current status of EnvyControl: envycontrol --status

GUI

WIP

Comments
  • Xorg no longer rootless

    Xorg no longer rootless

    Hi everyone and thank you for your great work and this project. I switched recently from Optimus manager to envycontrol and everything is working fine. I noticed that my Xorg session under Gnome now runs as root. Before the change, the process ran rootless. Is this change possibly related to envycontrol or the gdm package I changed from gdm-Prime to the original gdm package? Has anyone who has also changed noticed the same behavior?

    opened by Vargblood 8
  • Update 2.0: Nvidia mode not bootable with amd/nvidia configurations

    Update 2.0: Nvidia mode not bootable with amd/nvidia configurations

    Distro: Arch Linux Kernel: 5.17.1-zen1-1-zen WM: BSPWM, startx Nvidia version: 510.60.02 Envycontrol version: 2.0

    With the new 2.0 update the nvidia mode won't boot with amd/nvidia hardware. (I use startx and automatic login and startup so it just goes and restarts xorg without stopping)

    pastebin for the xorg log file.

    opened by cronyakatsuki 7
  • Switching to nvidia graphics breaks sddm and xorg

    Switching to nvidia graphics breaks sddm and xorg

    After running sudo envycontrol --switch nvidia and rebooting, sddm doesn't start and nor does xorg(By doesn't start I mean that the only thing that is displayed on the screen is a flashing white underscore)

    Steps to reproduce:

    1. Switch to nvidia graphics
    2. Reboot

    Steps to fix the problem :

    1. Switching back to hybrid graphics worked for me. You might have to remove the package if that didn't fix the problem.
    opened by DaVikingMan 7
  • Nvidia and hybrid mode issues

    Nvidia and hybrid mode issues

    From what I can tell, it doesn't load up x org server when i switch to nvidia, also games (in this case "payday 2") don't launch in hybrid mode

    Distro: Fedora 36 kernel version and type: 5.18.9-200.fc36.x86_64 nvidia graphics card: geforce 940mx nvidia driver version: 515.57 intel integrated graphics: Intel HD Graphics 620 EnvyControl version: 2.1.1

    If i need to include more information here, please tell me. Edit: so i just ran nvidia-xconfig and i got these errors

    WARNING: Unable to locate/open X configuration file.

    WARNING: Unable to parse X.Org version string.

    ERROR: Unable to find any GPUs in the system.

    ERROR: Unable to write to directory '/etc/X11'.

    opened by Lithi27 5
  • LightDM fails to start after switching modes

    LightDM fails to start after switching modes

    Everytime I switch modes, LightDM fails to start, and checking systemd status tells me it's because start request repeated too quickly.

    I need to switch to another TTY and manually start LightDM every time.

    I have tried manually setting my DM (using --dm lightdm) to no avail.

    I use a Lenovo Legion 5 15ARH05 with a 4800H (RX Vega 7) + GTX 1650 Ti. OS is Arch Linux.

    If anyone can help that would be great. I can also provide additional information if required. Thanks!

    opened by lvctr 5
  • Unable to switch to nvidia only on wayland

    Unable to switch to nvidia only on wayland

    I am running Arch Linux with KDE, running wayland on RTX 3070 laptop gpu, when i run "sudo envycontrol --switch nvidia", it asks me to reboot to change, which i do. But under settings the graphics processer is still my AMD iGPU, while on envycontrol shows nvidia.

    opened by ShabirK21 5
  • Please help me to enable my external monitor - Envycontrol installed

    Please help me to enable my external monitor - Envycontrol installed

    Hi,

    I'm on a new laptop, here are some basic info: ██ OS: Manjaro Linux x86_64 ██████████████████ ████████ Host: HP ZBook Power 15.6 inch G9 Mobile Worksta ████████ ████████ Kernel: 5.15.60-1-MANJARO ████████ ████████ ████████ Uptime: 8 mins ████████ ████████ ████████ Packages: 1266 (pacman) ████████ ████████ ████████ Shell: zsh 5.9 ████████ ████████ ████████ Resolution: 1920x1080 ████████ ████████ ████████ DE: GNOME 42.4 ████████ ████████ ████████ WM: Mutter ████████ ████████ ████████ WM Theme: Adwaita ████████ ████████ ████████ Theme: Adw-dark [GTK2/3] ████████ ████████ ████████ Icons: Papirus-Dark [GTK2/3] Terminal: gnome-terminal CPU: 12th Gen Intel i5-12500H (16) @ 4.500GHz GPU: NVIDIA GeForce RTX 3050 Ti Mobile GPU: Intel Alder Lake-P Memory: 1828MiB / 15631MiB

    I installed envycontol.

    Problems I have:

    1. The external monitor connected with HDMI won't work (no signal dectected)
    2. If I use hybrid/nvidia MODE, I can't login to GNOME Wayland session (only Xorg)

    Questoin:

    1. Which nvidia driver should I install. I see there are at least two options: (1) install video-nvidia, seems a driver dedicated to nvidia (2) install video-hybrid-intel-nvidia-prime / video-hybrid-intel-nvidia-470xx-prime

    P.S. I tried the above two drivers already, neither can enable my external monitor, so I try envycontrol, still no luck.

    I see envycontrol is able to not only switching GPU modes, but also to enable the external monitor, could you guide me on how to do it?

    Thanks in advance.

    opened by Jack-Chou-HZ 4
  • Switching to Nvidia puts me in a log in loop on Archcraft

    Switching to Nvidia puts me in a log in loop on Archcraft

    When I use this (also with optimus manager) I get put into a login loop where when I try to login (SDDM) it goes to a black screen and puts me on the login screen again.

    specs

    os: archcraft wm: openbox dm: sddm cpu: i5 9300h gpu: gtx 1650 mobile

    opened by xQzca 4
  • Overwrites xorg.conf without warning or backup

    Overwrites xorg.conf without warning or backup

    I used this project and IT OVERWROTE MY xorg.conf WITHOUT WARNING AND WITHOUT MAKING ANY BACKUP. WHY???? People sometimes write their own config files, you know, you can't just banish my configs into OBLIVION like this. The README doesn't mention this at all...

    Please:

    1. EXPLICITLY STATE in the README which files are going to be created or modified
    2. WARN the user about the files that are going to be replaced when running the script
    3. MAKE backups of modified files
    opened by bno1 3
  • Error installing on EndeavourOS kernel 5.17.9-arch1-1

    Error installing on EndeavourOS kernel 5.17.9-arch1-1

    ==> Starting package()...
    Traceback (most recent call last):
      File "setup.py", line 3, in <module>
        import envycontrol
      File "/home/edbizarro/.cache/yay/envycontrol/src/envycontrol/envycontrol.py", line 139
        TEARING_FIX = f'    Option "ForceCompositionPipeline" "true"\n'
                                                                      ^
    SyntaxError: invalid syntax
    ==> ERROR: A failure occurred in package().
        Aborting...
     -> error making: envycontrol
    

    Version 1.x was working fine.

    opened by edbizarro 3
  • Switching to Nvidia displays black screen and other misc. issues

    Switching to Nvidia displays black screen and other misc. issues

    Operating System: EndeavourOS
    KDE Plasma Version: 5.24.4
    KDE Frameworks Version: 5.92.0
    Qt Version: 5.15.3
    Kernel Version: 5.17.1-zen1-1-zen (64-bit)
    Graphics Platform: X11
    Processors: 16 × Intel® Core™ i7-10875H CPU @ 2.30GHz
    Memory: 15.4 GiB of RAM
    Graphics Processor: Mesa Intel® UHD Graphics
    Graphics Processor: NVIDIA GeForce RTX 2060 with Max-Q Design/PCIe/SSE2
    

    I'm having an issue similar to #33, but with Intel/Nvidia. When switching to Nvidia and rebooting, the screen turns black and I need to Shift+Alt+F2 to switch back to hybrid. That being said I tested my system with Optimus-Manager and had no issues and my problem with transparency in KDE were fixed.

    opened by J-SQReD 3
  • Disable nvidia from EGL when in integrated mode

    Disable nvidia from EGL when in integrated mode

    EGL applications have an extra second of startup when in integrated mode, because nvidia's glvnd library runs nvidia-modprobe, which takes a while when the nvidia GPU is off.

    It seems like this project is unmaintained as stated on the website, but it would be cool if this project could do something similar to what I do here https://github.com/alacritty/alacritty/issues/6359#issuecomment-1364724766

    I'm happy to open a PR if there is interest from the maintainer(s)

    opened by russelltg 0
  • Debian 11 - Black screen at boot after switching to nvidia mode

    Debian 11 - Black screen at boot after switching to nvidia mode

    Hi there! I'm on Debian 11 and I'm encountering an issue with envycontrol. Every time I switch from hybrid mode to nvidia, I get a black screen after rebooting the system. No login screen, so I have to switch back to hybrid. I want to enable only my dedicated GPU, because I noticed that steam games are using the integrated card, no matter what. Any idea how to solve the problem? I have an RTX 2070, and the drivers should be properly installed. Thanx, keep on with the good work!

    opened by Cattapignula 3
  • Refresh rates are not recognized

    Refresh rates are not recognized

    On my notebook (with hybrid graphics), when I set the graphics mode to Nvidia, I'm not having the choice of my proper screen-refresh rates. However, if I change the graphic chipset in the BIOS, I am able to use 240Hz.

    Adding the screen refresh rates manually over xrandr on X11, as described in (https://wiki.archlinux.org/title/xrandr), gives an error called crtc:0. Manually providing the EDID file, as described here (https://wiki.archlinux.org/title/Kernel_mode_setting#Forcing_modes_and_EDID), does also not help.

    I suppose that this issue is related to the intel drivers since intel restricts the refresh rate to 60Hz. I am using Fedora 37 on X11. Any help is much appreciated.

    opened by danielrehsmann 1
  • [BUG / Feature request] crash when mssing xorg amdgpy driver

    [BUG / Feature request] crash when mssing xorg amdgpy driver

    When usr/lib/xorg/modules/drivers/amdgpu_drv.so is not present in the system envycontrol should default to modesetting. i had a black screen on my laptop that was fixed by install xf86-video-amdgpu.

    this can also be added to the wiki.

    opened by Marc-Pierre-Barbier 1
  • Add XDM support and option to include nvidia modules in initramfs

    Add XDM support and option to include nvidia modules in initramfs

    Hi, added support for XDM and an option to include nvidia modules in initramfs (Debian-based distros). I had to modify display manager detection regex for Debian, but should work with other distros. Feel free to change as needed. I am also unsure how to include modules in initramfs for non-Debian distros, so please add if you know how to do this. Lastly I am no python guru (second program I have touched only), so apologies for any bad coding practices.

    Closes #61

    opened by porschemad911 0
  • [Feature request] XDM support

    [Feature request] XDM support

    I (and perhaps others) use XDM. It would be nice to have an xrandr script generated into say /etc/X11/Xsession.d/90envycontrol_nvidia-xrandr if the detected display manager is xdm.

    opened by porschemad911 3
Releases(v2.2)
  • v2.2(Dec 27, 2022)

    What's Changed

    • Fixes PCI bus not being found by regex in some laptops by @gsegalini in https://github.com/bayasdev/envycontrol/pull/39
    • Enable PreserveVideoMemoryAllocations by default to fix Wayland session not appearing under Gnome 43+

    New Contributors

    • @gsegalini made their first contribution in https://github.com/bayasdev/envycontrol/pull/39

    Full Changelog: https://github.com/bayasdev/envycontrol/compare/v2.1.1...v2.2

    Source code(tar.gz)
    Source code(zip)
  • v2.1.1(Apr 11, 2022)

    What's Changed

    • Use correct path for LightDM script
    • Also rebuild initramfs for OpenSUSE/SLES

    Full Changelog: https://github.com/geminis3/envycontrol/compare/v2.1...v2.1.1

    Source code(tar.gz)
    Source code(zip)
  • v2.1(Apr 7, 2022)

    What's Changed

    • Fix rebuild of initramfs using dracut by @Luciogi in https://github.com/geminis3/envycontrol/pull/35
    • Reimplemented display manager setup, plus amd nvidia fix. by @cronyakatsuki in https://github.com/geminis3/envycontrol/pull/36

    New Contributors

    • @Luciogi made their first contribution in https://github.com/geminis3/envycontrol/pull/35
    • @cronyakatsuki made their first contribution in https://github.com/geminis3/envycontrol/pull/36

    Full Changelog: https://github.com/geminis3/envycontrol/compare/v2.0...v2.1

    Source code(tar.gz)
    Source code(zip)
  • v2.0(Apr 2, 2022)

    What's Changed

    • Removed Display Manager setup since it was causing more problems
    • Added RTD3 support (for Turing and newer GPUs)
    • Added ForceCompositionPipeline support
    • Added Coolbits support
    • Renamed --status to --query
    • Updated arguments to be more POSIX like
    • Overall code cleanup

    Full Changelog: https://github.com/geminis3/envycontrol/compare/v1.3...v2.0

    Source code(tar.gz)
    Source code(zip)
  • v1.3(Jan 24, 2022)

    What's Changed

    • Poweroff Nvidia card before removing it by @mphe in https://github.com/geminis3/envycontrol/pull/8
    • Enable Nvidia driver modeset for hybrid mode (required to enable Wayland support)

    New Contributors

    • @mphe made their first contribution in https://github.com/geminis3/envycontrol/pull/8

    Full Changelog: https://github.com/geminis3/envycontrol/compare/v1.2...v1.3

    Source code(tar.gz)
    Source code(zip)
  • v1.2(Dec 31, 2021)

    This new version includes improvements to how the X.org config for the nvidia mode is created:

    • Not all Nvidia GPUs have the same 01:00.0 PCI bus, the PCI bus of the available Nvidia GPU will now be detected dynamically and converted to a X.org compatible format.
    • Added initial support for AMD systems with nvidia mode, EnvyControl will attempt to automatically detect the vendor of the system's iGPU and create an appropiate X.org config for it.

    Wishing you and yours a happy, healthy, and abundant 2022! 🎉

    Source code(tar.gz)
    Source code(zip)
  • v1.1(Dec 22, 2021)

    What's new:

    • Implemented automatic DM detection and setup if required (SDDM and LightDM) for nvidia mode
    • Allow to manually specify the DM for nvidia mode
    • Rebuild the initramfs if running on Debian or one of its derivatives (like Ubuntu, etc)
    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Dec 20, 2021)

  • v1.0(Dec 20, 2021)

    🚀 This is the initial release of EnvyControl 🚀, it supports integrated, nvidia and hybrid graphics modes as well as a function to query the current mode.

    Feel free to provide your feedback 💬 if you encounter any issue 🐞 or know a way to improve this program ✨.

    Source code(tar.gz)
    Source code(zip)
Owner
Victor Bayas
Software engineering student, Linux user and tinkerer.
Victor Bayas
arxiv-sanity, but very lite, simply providing the core value proposition of the ability to tag arxiv papers of interest and have the program recommend similar papers.

arxiv-sanity, but very lite, simply providing the core value proposition of the ability to tag arxiv papers of interest and have the program recommend similar papers.

Andrej 671 Dec 31, 2022
Face Recognition plus identification simply and fast | Python

PyFaceDetection Face Recognition plus identification simply and fast Ubuntu Setup sudo pip3 install numpy sudo pip3 install cmake sudo pip3 install dl

Peyman Majidi Moein 16 Sep 22, 2022
A very simple tool for situations where optimization with onnx-simplifier would exceed the Protocol Buffers upper file size limit of 2GB, or simply to separate onnx files to any size you want.

sne4onnx A very simple tool for situations where optimization with onnx-simplifier would exceed the Protocol Buffers upper file size limit of 2GB, or

Katsuya Hyodo 10 Aug 30, 2022
Magisk module to enable hidden features on Android 12 Developer Preview 1.

Android 12 Extensions This is a Magisk module that enables hidden features on Android 12 Developer Preview 1. Features Scrolling screenshots Wallpaper

Danny Lin 384 Jan 6, 2023
Bayesian-Torch is a library of neural network layers and utilities extending the core of PyTorch to enable the user to perform stochastic variational inference in Bayesian deep neural networks

Bayesian-Torch is a library of neural network layers and utilities extending the core of PyTorch to enable the user to perform stochastic variational inference in Bayesian deep neural networks. Bayesian-Torch is designed to be flexible and seamless in extending a deterministic deep neural network architecture to corresponding Bayesian form by simply replacing the deterministic layers with Bayesian layers.

Intel Labs 210 Jan 4, 2023
This repository is based on Ultralytics/yolov5, with adjustments to enable polygon prediction boxes.

Polygon-Yolov5 This repository is based on Ultralytics/yolov5, with adjustments to enable polygon prediction boxes. Section I. Description The codes a

xinzelee 226 Jan 5, 2023
This repository is based on Ultralytics/yolov5, with adjustments to enable rotate prediction boxes.

Rotate-Yolov5 This repository is based on Ultralytics/yolov5, with adjustments to enable rotate prediction boxes. Section I. Description The codes are

xinzelee 90 Dec 13, 2022
Stacs-ci - A set of modules to enable integration of STACS with commonly used CI / CD systems

Static Token And Credential Scanner CI Integrations What is it? STACS is a YARA

STACS 18 Aug 4, 2022
SeisComP/SeisBench interface to enable deep-learning (re)picking in SeisComP

scdlpicker SeisComP/SeisBench interface to enable deep-learning (re)picking in SeisComP Objective This is a simple deep learning (DL) repicker module

Joachim Saul 6 May 13, 2022
The pyrelational package offers a flexible workflow to enable active learning with as little change to the models and datasets as possible

pyrelational is a python active learning library developed by Relation Therapeutics for rapidly implementing active learning pipelines from data management, model development (and Bayesian approximation), to creating novel active learning strategies.

Relation Therapeutics 95 Dec 27, 2022
🦕 NanoSaur is a little tracked robot ROS2 enabled, made for an NVIDIA Jetson Nano

?? nanosaur NanoSaur is a little tracked robot ROS2 enabled, made for an NVIDIA Jetson Nano Website: nanosaur.ai Do you need an help? Discord For tech

NanoSaur 162 Dec 9, 2022
The 1st place solution of track2 (Vehicle Re-Identification) in the NVIDIA AI City Challenge at CVPR 2021 Workshop.

AICITY2021_Track2_DMT The 1st place solution of track2 (Vehicle Re-Identification) in the NVIDIA AI City Challenge at CVPR 2021 Workshop. Introduction

Hao Luo 91 Dec 21, 2022
Tutorial on active learning with the Nvidia Transfer Learning Toolkit (TLT).

Active Learning with the Nvidia TLT Tutorial on active learning with the Nvidia Transfer Learning Toolkit (TLT). In this tutorial, we will show you ho

Lightly 25 Dec 3, 2022
Nvidia Semantic Segmentation monorepo

Paper | YouTube | Cityscapes Score Pytorch implementation of our paper Hierarchical Multi-Scale Attention for Semantic Segmentation. Please refer to t

NVIDIA Corporation 1.6k Jan 4, 2023
PyTorch implementation of the Quasi-Recurrent Neural Network - up to 16 times faster than NVIDIA's cuDNN LSTM

Quasi-Recurrent Neural Network (QRNN) for PyTorch Updated to support multi-GPU environments via DataParallel - see the the multigpu_dataparallel.py ex

Salesforce 1.3k Dec 28, 2022
A Jupyter notebook to play with NVIDIA's StyleGAN3 and OpenAI's CLIP for a text-based guided image generation.

A Jupyter notebook to play with NVIDIA's StyleGAN3 and OpenAI's CLIP for a text-based guided image generation.

Eugenio Herrera 175 Dec 29, 2022
NVIDIA Merlin is an open source library providing end-to-end GPU-accelerated recommender systems, from feature engineering and preprocessing to training deep learning models and running inference in production.

NVIDIA Merlin NVIDIA Merlin is an open source library designed to accelerate recommender systems on NVIDIA’s GPUs. It enables data scientists, machine

null 419 Jan 3, 2023
General purpose GPU compute framework for cross vendor graphics cards (AMD, Qualcomm, NVIDIA & friends)

General purpose GPU compute framework for cross vendor graphics cards (AMD, Qualcomm, NVIDIA & friends). Blazing fast, mobile-enabled, asynchronous and optimized for advanced GPU data processing usecases. Backed by the Linux Foundation.

The Kompute Project 1k Jan 6, 2023