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
A FAIR dataset of TCV experimental results for validating edge/divertor turbulence models.

TCV-X21 validation for divertor turbulence simulations Quick links Intro Welcome to TCV-X21. We're glad you've found us! This repository is designed t

0 Dec 18, 2021
Implicit Deep Adaptive Design (iDAD)

Implicit Deep Adaptive Design (iDAD) This code supports the NeurIPS paper 'Implicit Deep Adaptive Design: Policy-Based Experimental Design without Lik

Desi 12 Aug 14, 2022
Evidential Softmax for Sparse Multimodal Distributions in Deep Generative Models

Evidential Softmax for Sparse Multimodal Distributions in Deep Generative Models Abstract Many applications of generative models rely on the marginali

Stanford Intelligent Systems Laboratory 9 Jun 06, 2022
Rethinking the U-Net architecture for multimodal biomedical image segmentation

MultiResUNet Rethinking the U-Net architecture for multimodal biomedical image segmentation This repository contains the original implementation of "M

Nabil Ibtehaz 308 Jan 05, 2023
This repository contains implementations and illustrative code to accompany DeepMind publications

DeepMind Research This repository contains implementations and illustrative code to accompany DeepMind publications. Along with publishing papers to a

DeepMind 11.3k Dec 31, 2022
RepVGG: Making VGG-style ConvNets Great Again

RepVGG: Making VGG-style ConvNets Great Again (PyTorch) This is a super simple ConvNet architecture that achieves over 80% top-1 accuracy on ImageNet

2.8k Jan 04, 2023
Joint project of the duo Hacker Ninjas

Project Smoothie Společný projekt dua Hacker Ninjas. První pokus o hříčku po třech týdnech učení se programování. Jakub Kolář e:\

Jakub Kolář 2 Jan 07, 2022
Pytorch implementation of the paper "Topic Modeling Revisited: A Document Graph-based Neural Network Perspective"

Graph Neural Topic Model (GNTM) This is the pytorch implementation of the paper "Topic Modeling Revisited: A Document Graph-based Neural Network Persp

Dazhong Shen 8 Sep 14, 2022
Code for "Neural Body: Implicit Neural Representations with Structured Latent Codes for Novel View Synthesis of Dynamic Humans" CVPR 2021 best paper candidate

News 05/17/2021 To make the comparison on ZJU-MoCap easier, we save quantitative and qualitative results of other methods at here, including Neural Vo

ZJU3DV 748 Jan 07, 2023
This GitHub repo consists of Code and Some results of project- Diabetes Treatment using Gold nanoparticles. These Consist of ML Models used for prediction Diabetes and further the basic theory and working of Gold nanoparticles.

GoldNanoparticles This GitHub repo consists of Code and Some results of project- Diabetes Treatment using Gold nanoparticles. These Consist of ML Mode

1 Jan 30, 2022
Building Ellee — A GPT-3 and Computer Vision Powered Talking Robotic Teddy Bear With Human Level Conversation Intelligence

Using an object detection and facial recognition system built on MobileNetSSDV2 and Dlib and running on an NVIDIA Jetson Nano, a GPT-3 model, Google Speech Recognition, Amazon Polly and servo motors,

24 Oct 26, 2022
PyTorch implementation of Barlow Twins.

Barlow Twins: Self-Supervised Learning via Redundancy Reduction PyTorch implementation of Barlow Twins. @article{zbontar2021barlow, title={Barlow Tw

Facebook Research 839 Dec 29, 2022
Implementation for "Seamless Manga Inpainting with Semantics Awareness" (SIGGRAPH 2021 issue)

Seamless Manga Inpainting with Semantics Awareness [SIGGRAPH 2021](To appear) | Project Website | BibTex Introduction: Manga inpainting fills up the d

101 Jan 01, 2023
Supervised 3D Pre-training on Large-scale 2D Natural Image Datasets for 3D Medical Image Analysis

Introduction This is an implementation of our paper Supervised 3D Pre-training on Large-scale 2D Natural Image Datasets for 3D Medical Image Analysis.

24 Dec 06, 2022
Deep Learning for Morphological Profiling

Deep Learning for Morphological Profiling An end-to-end implementation of a ML System for morphological profiling using self-supervised learning to di

Danielh Carranza 0 Jan 20, 2022
An official source code for "Augmentation-Free Self-Supervised Learning on Graphs"

Augmentation-Free Self-Supervised Learning on Graphs An official source code for Augmentation-Free Self-Supervised Learning on Graphs paper, accepted

Namkyeong Lee 59 Dec 01, 2022
PyTorch Code of "Memory In Memory: A Predictive Neural Network for Learning Higher-Order Non-Stationarity from Spatiotemporal Dynamics"

Memory In Memory Networks It is based on the paper Memory In Memory: A Predictive Neural Network for Learning Higher-Order Non-Stationarity from Spati

Yang Li 12 May 30, 2022
Co-GAIL: Learning Diverse Strategies for Human-Robot Collaboration

CoGAIL Table of Content Overview Installation Dataset Training Evaluation Trained Checkpoints Acknowledgement Citations License Overview This reposito

Jeremy Wang 29 Dec 24, 2022
Open source hardware and software platform to build a small scale self driving car.

Donkeycar is minimalist and modular self driving library for Python. It is developed for hobbyists and students with a focus on allowing fast experimentation and easy community contributions.

Autorope 2.4k Jan 04, 2023
Probabilistic Gradient Boosting Machines

PGBM Probabilistic Gradient Boosting Machines (PGBM) is a probabilistic gradient boosting framework in Python based on PyTorch/Numba, developed by Air

Olivier Sprangers 112 Dec 28, 2022