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
Linear algebra python - Number of operations and problems in Linear Algebra and Numerical Linear Algebra

Linear algebra in python Number of operations and problems in Linear Algebra and

Alireza 5 Oct 09, 2022
PyTorch evaluation code for Delving Deep into the Generalization of Vision Transformers under Distribution Shifts.

Out-of-distribution Generalization Investigation on Vision Transformers This repository contains PyTorch evaluation code for Delving Deep into the Gen

Chongzhi Zhang 72 Dec 13, 2022
Code release for SLIP Self-supervision meets Language-Image Pre-training

SLIP: Self-supervision meets Language-Image Pre-training What you can find in this repo: Pre-trained models (with ViT-Small, Base, Large) and code to

Meta Research 621 Dec 31, 2022
Dynamic Realtime Animation Control

Our project is targeted at making an application that dynamically detects the user’s expressions and gestures and projects it onto an animation software which then renders a 2D/3D animation realtime

Harsh Avinash 10 Aug 01, 2022
Tilted Empirical Risk Minimization (ICLR '21)

Tilted Empirical Risk Minimization This repository contains the implementation for the paper Tilted Empirical Risk Minimization ICLR 2021 Empirical ri

Tian Li 40 Nov 28, 2022
PyTorch implementations of algorithms for density estimation

pytorch-flows A PyTorch implementations of Masked Autoregressive Flow and some other invertible transformations from Glow: Generative Flow with Invert

Ilya Kostrikov 546 Dec 05, 2022
Python script that analyses the given datasets and comes up with the best polynomial regression representation with the smallest polynomial degree possible

Python script that analyses the given datasets and comes up with the best polynomial regression representation with the smallest polynomial degree possible, to be the most reliable with the least com

Nikolas B Virionis 2 Aug 01, 2022
An Efficient Training Approach for Very Large Scale Face Recognition or F²C for simplicity.

Fast Face Classification (F²C) This is the code of our paper An Efficient Training Approach for Very Large Scale Face Recognition or F²C for simplicit

33 Jun 27, 2021
Rule based classification A hotel s customers dataset

Rule-based-classification-A-hotel-s-customers-dataset- Aim: Categorize new customers by segment and predict how much revenue they can generate This re

Şebnem 4 Jan 02, 2022
TransCD: Scene Change Detection via Transformer-based Architecture

TransCD: Scene Change Detection via Transformer-based Architecture

wangzhixue 29 Dec 11, 2022
(NeurIPS 2020) Wasserstein Distances for Stereo Disparity Estimation

Wasserstein Distances for Stereo Disparity Estimation Accepted in NeurIPS 2020 as Spotlight. [Project Page] Wasserstein Distances for Stereo Disparity

Divyansh Garg 92 Dec 12, 2022
[Official] Exploring Temporal Coherence for More General Video Face Forgery Detection(ICCV 2021)

Exploring Temporal Coherence for More General Video Face Forgery Detection(FTCN) Yinglin Zheng, Jianmin Bao, Dong Chen, Ming Zeng, Fang Wen Accepted b

57 Dec 28, 2022
The PyTorch re-implement of a 3D CNN Tracker to extract coronary artery centerlines with state-of-the-art (SOTA) performance. (paper: 'Coronary artery centerline extraction in cardiac CT angiography using a CNN-based orientation classifier')

The PyTorch re-implement of a 3D CNN Tracker to extract coronary artery centerlines with state-of-the-art (SOTA) performance. (paper: 'Coronary artery centerline extraction in cardiac CT angiography

James 135 Dec 23, 2022
Jremesh-tools - Blender addon for quad remeshing

JRemesh Tools Blender 2.8 - 3.x addon for quad remeshing. Currently it is a wrap

Jayanam 89 Dec 30, 2022
PyTorch implementation of 'Gen-LaneNet: a generalized and scalable approach for 3D lane detection'

(pytorch) Gen-LaneNet: a generalized and scalable approach for 3D lane detection Introduction This is a pytorch implementation of Gen-LaneNet, which p

Yuliang Guo 233 Jan 06, 2023
i-SpaSP: Structured Neural Pruning via Sparse Signal Recovery

i-SpaSP: Structured Neural Pruning via Sparse Signal Recovery This is a public code repository for the publication: i-SpaSP: Structured Neural Pruning

Cameron Ronald Wolfe 5 Nov 04, 2022
Federated learning on graph, especially on graph neural networks (GNNs), knowledge graph, and private GNN.

Federated learning on graph, especially on graph neural networks (GNNs), knowledge graph, and private GNN.

keven 198 Dec 20, 2022
Repo for the Tutorials of Day1-Day3 of the Nordic Probabilistic AI School 2021 (https://probabilistic.ai/)

ProbAI 2021 - Probabilistic Programming and Variational Inference Tutorial with Pryo Day 1 (June 14) Slides Notebook: students_PPLs_Intro Notebook: so

PGM-Lab 46 Nov 01, 2022
Official PyTorch implementation of "Proxy Synthesis: Learning with Synthetic Classes for Deep Metric Learning" (AAAI 2021)

Proxy Synthesis: Learning with Synthetic Classes for Deep Metric Learning Official PyTorch implementation of "Proxy Synthesis: Learning with Synthetic

NAVER/LINE Vision 30 Dec 06, 2022
Real-Time Semantic Segmentation in Mobile device

Real-Time Semantic Segmentation in Mobile device This project is an example project of semantic segmentation for mobile real-time app. The architectur

708 Jan 01, 2023