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
Experimental code for paper: Generative Adversarial Networks as Variational Training of Energy Based Models

Experimental code for paper: Generative Adversarial Networks as Variational Training of Energy Based Models, under review at ICLR 2017 requirements: T

Shuangfei Zhai 18 Mar 05, 2022
Alex Pashevich 62 Dec 24, 2022
RoboDesk A Multi-Task Reinforcement Learning Benchmark

RoboDesk A Multi-Task Reinforcement Learning Benchmark If you find this open source release useful, please reference in your paper: @misc{kannan2021ro

Google Research 66 Oct 07, 2022
Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition

Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition

107 Dec 02, 2022
Attack on Confidence Estimation algorithm from the paper "Disrupting Deep Uncertainty Estimation Without Harming Accuracy"

Attack on Confidence Estimation (ACE) This repository is the official implementation of "Disrupting Deep Uncertainty Estimation Without Harming Accura

3 Mar 30, 2022
LightNet++: Boosted Light-weighted Networks for Real-time Semantic Segmentation

LightNet++ !!!New Repo.!!! ⇒ EfficientNet.PyTorch: Concise, Modular, Human-friendly PyTorch implementation of EfficientNet with Pre-trained Weights !!

linksense 237 Jan 05, 2023
Patch-Diffusion Code (AAAI2022)

Patch-Diffusion This is an official PyTorch implementation of "Patch Diffusion: A General Module for Face Manipulation Detection" in AAAI2022. Require

H 7 Nov 02, 2022
Generative Exploration and Exploitation - This is an improved version of GENE.

GENE This is an improved version of GENE. In the original version, the states are generated from the decoder of VAE. We have to check whether the gere

33 Mar 23, 2022
Public Implementation of ChIRo from "Learning 3D Representations of Molecular Chirality with Invariance to Bond Rotations"

Learning 3D Representations of Molecular Chirality with Invariance to Bond Rotations This directory contains the model architectures and experimental

35 Dec 05, 2022
basic tutorial on pytorch

Quick Tutorial on PyTorch PyTorch Basics Linear Regression Logistic Regression Artificial Neural Networks Convolutional Neural Networks Recurrent Neur

7 Sep 15, 2022
Unofficial Implementation of MLP-Mixer, Image Classification Model

MLP-Mixer Unoffical Implementation of MLP-Mixer, easy to use with terminal. Train and test easly. https://arxiv.org/abs/2105.01601 MLP-Mixer is an arc

Oğuzhan Ercan 6 Dec 05, 2022
The offcial repository for 'CharacterBERT and Self-Teaching for Improving the Robustness of Dense Retrievers on Queries with Typos', SIGIR2022

CharacterBERT-DR The offcial repository for CharacterBERT and Self-Teaching for Improving the Robustness of Dense Retrievers on Queries with Typos, Sh

ielab 11 Nov 15, 2022
Canonical Capsules: Unsupervised Capsules in Canonical Pose (NeurIPS 2021)

Canonical Capsules: Unsupervised Capsules in Canonical Pose (NeurIPS 2021) Introduction This is the official repository for the PyTorch implementation

165 Dec 07, 2022
Speeding-Up Back-Propagation in DNN: Approximate Outer Product with Memory

Approximate Outer Product Gradient Descent with Memory Code for the numerical experiment of the paper Speeding-Up Back-Propagation in DNN: Approximate

2 Mar 02, 2022
Spatial-Temporal Transformer for Dynamic Scene Graph Generation, ICCV2021

Spatial-Temporal Transformer for Dynamic Scene Graph Generation Pytorch Implementation of our paper Spatial-Temporal Transformer for Dynamic Scene Gra

Yuren Cong 119 Jan 01, 2023
Reinforcement Learning with Q-Learning Algorithm on gym's frozen lake environment implemented in python

Reinforcement Learning with Q Learning Algorithm Q learning algorithm is trained on the gym's frozen lake environment. Libraries Used gym Numpy tqdm P

1 Nov 10, 2021
Fast (simple) spectral synthesis and emission-line fitting of DESI spectra.

FastSpecFit Introduction This repository contains code and documentation to perform fast, simple spectral synthesis and emission-line fitting of DESI

5 Aug 02, 2022
The code for our paper CrossFormer: A Versatile Vision Transformer Based on Cross-scale Attention.

CrossFormer This repository is the code for our paper CrossFormer: A Versatile Vision Transformer Based on Cross-scale Attention. Introduction Existin

cheerss 238 Jan 06, 2023
FastFCN: Rethinking Dilated Convolution in the Backbone for Semantic Segmentation.

FastFCN: Rethinking Dilated Convolution in the Backbone for Semantic Segmentation [Project] [Paper] [arXiv] [Home] Official implementation of FastFCN:

Wu Huikai 815 Dec 29, 2022
Implementation of gaze tracking and demo

Predicting Customer Demand by Using Gaze Detecting and Object Tracking This project is the integration of gaze detecting and object tracking. Predict

2 Oct 20, 2022