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
Cross-lingual Transfer for Speech Processing using Acoustic Language Similarity

Cross-lingual Transfer for Speech Processing using Acoustic Language Similarity Indic TTS Samples can be found at https://peter-yh-wu.github.io/cross-

Peter Wu 1 Nov 12, 2022
State of the art Semantic Sentence Embeddings

Contrastive Tension State of the art Semantic Sentence Embeddings Published Paper · Huggingface Models · Report Bug Overview This is the official code

Fredrik Carlsson 88 Dec 30, 2022
Generative Autoregressive, Normalized Flows, VAEs, Score-based models (GANVAS)

GANVAS-models This is an implementation of various generative models. It contains implementations of the following: Autoregressive Models: PixelCNN, G

MRSAIL (Mini Robotics, Software & AI Lab) 6 Nov 26, 2022
X-modaler is a versatile and high-performance codebase for cross-modal analytics.

X-modaler X-modaler is a versatile and high-performance codebase for cross-modal analytics. This codebase unifies comprehensive high-quality modules i

910 Dec 28, 2022
[CVPR2022] Representation Compensation Networks for Continual Semantic Segmentation

RCIL [CVPR2022] Representation Compensation Networks for Continual Semantic Segmentation Chang-Bin Zhang1, Jia-Wen Xiao1, Xialei Liu1, Ying-Cong Chen2

Chang-Bin Zhang 71 Dec 28, 2022
Learning from Guided Play: A Scheduled Hierarchical Approach for Improving Exploration in Adversarial Imitation Learning Source Code

Learning from Guided Play: A Scheduled Hierarchical Approach for Improving Exploration in Adversarial Imitation Learning Source Code

STARS Laboratory 8 Sep 14, 2022
Multi agent DDPG algorithm written in Python + Pytorch

Multi agent DDPG algorithm written in Python + Pytorch. It also includes a Jupyter notebook, Tennis.ipynb, as a showcase.

Rogier Wachters 2 Feb 26, 2022
an Evolutionary Algorithm assisted GAN

EvoGAN an Evolutionary Algorithm assisted GAN ckpts

3 Oct 09, 2022
Evaluating Privacy-Preserving Machine Learning in Critical Infrastructures: A Case Study on Time-Series Classification

PPML-TSA This repository provides all code necessary to reproduce the results reported in our paper Evaluating Privacy-Preserving Machine Learning in

Dominik 1 Mar 08, 2022
Least Square Calibration for Peer Reviews

Least Square Calibration for Peer Reviews Requirements gurobipy - for solving convex programs GPy - for Bayesian baseline numpy pandas To generate p

Sigma <a href=[email protected]"> 1 Nov 01, 2021
Classifying cat and dog images using Kaggle dataset

PyTorch Image Classification Classifies an image as containing either a dog or a cat (using Kaggle's public dataset), but could easily be extended to

Robert Coleman 74 Nov 22, 2022
Happywhale - Whale and Dolphin Identification Silver🥈 Solution (26/1588)

Kaggle-Happywhale Happywhale - Whale and Dolphin Identification Silver 🥈 Solution (26/1588) 竞赛方案思路 图像数据预处理-标志性特征图片裁剪:首先根据开源的标注数据训练YOLOv5x6目标检测模型,将训练集

Franxx 20 Nov 14, 2022
PyTorch code accompanying the paper "Landmark-Guided Subgoal Generation in Hierarchical Reinforcement Learning" (NeurIPS 2021).

HIGL This is a PyTorch implementation for our paper: Landmark-Guided Subgoal Generation in Hierarchical Reinforcement Learning (NeurIPS 2021). Our cod

Junsu Kim 20 Dec 14, 2022
The official repo of the CVPR2021 oral paper: Representative Batch Normalization with Feature Calibration

Representative Batch Normalization (RBN) with Feature Calibration The official implementation of the CVPR2021 oral paper: Representative Batch Normali

Open source projects of ShangHua-Gao 76 Nov 09, 2022
A PyTorch implementation: "LASAFT-Net-v2: Listen, Attend and Separate by Attentively aggregating Frequency Transformation"

LASAFT-Net-v2 Listen, Attend and Separate by Attentively aggregating Frequency Transformation Woosung Choi, Yeong-Seok Jeong, Jinsung Kim, Jaehwa Chun

Woosung Choi 29 Jun 04, 2022
Temporally Coherent GAN SIGGRAPH project.

TecoGAN This repository contains source code and materials for the TecoGAN project, i.e. code for a TEmporally COherent GAN for video super-resolution

Duc Linh Nguyen 2 Jan 18, 2022
Official repository for "Orthogonal Projection Loss" (ICCV'21)

Orthogonal Projection Loss (ICCV'21) Kanchana Ranasinghe, Muzammal Naseer, Munawar Hayat, Salman Khan, & Fahad Shahbaz Khan Paper Link | Project Page

Kanchana Ranasinghe 83 Dec 26, 2022
Coarse implement of the paper "A Simultaneous Denoising and Dereverberation Framework with Target Decoupling", On DNS-2020 dataset, the DNSMOS of first stage is 3.42 and second stage is 3.47.

SDDNet Coarse implement of the paper "A Simultaneous Denoising and Dereverberation Framework with Target Decoupling", On DNS-2020 dataset, the DNSMOS

Cyril Lv 43 Nov 21, 2022
A Home Assistant custom component for Lobe. Lobe is an AI tool that can classify images.

Lobe This is a Home Assistant custom component for Lobe. Lobe is an AI tool that can classify images. This component lets you easily use an exported m

Kendell R 4 Feb 28, 2022
PyTorch Code for NeurIPS 2021 paper Anti-Backdoor Learning: Training Clean Models on Poisoned Data.

Anti-Backdoor Learning PyTorch Code for NeurIPS 2021 paper Anti-Backdoor Learning: Training Clean Models on Poisoned Data. The Anti-Backdoor Learning

Yige-Li 51 Dec 07, 2022