egpu-switcher

🖥🐧 Setup script for eGPUs in Linux (Xorg)
授权协议 GPL-3.0 License
开发语言 SHELL
所属分类 应用工具、 终端/远程登录
软件类型 开源软件
地区 不详
投 递 者 杜轩昂
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

egpu-switcher

For more information and user feedback, take a look at my Thread over on egpu.io or open an issue on Github.

Distribution agnostic eGPU script that works with NVIDIA and AMD cards.



Description

The goal of this script is to lower the barrier for Linux users to use their eGPU on the Linux Desktop.An interactive setup allows the user to choose their external GPU, which will then be automatically chosen as the primary GPU if it's connected on bootup.

This does not provide you with a plug-and-play functionality like you may know from Windows.
You still need to reboot your computer in order to connect / disconnect your eGPU.
.

Screenshot

Requirements

  1. Your OS is running X-Server.
  2. You have at least pciutils 3.3.x or higher installed (check with lspci --version).
  3. You have at least Bash 4.x or higher installed.
  4. You have already authorized your Thunderbolt EGPU and are able to connect.
  5. You have already installed the latest (proprietary) drivers for your GPUs.

Installation

Ubuntu (apt)

Installation and setup:

$ sudo add-apt-repository ppa:hertg/egpu-switcher
$ sudo apt update
$ sudo apt install egpu-switcher
$ sudo egpu-switcher setup

Uninstall:

$ apt remove egpu-switcher

Other

Installation and setup:

$ git clone git@github.com:hertg/egpu-switcher.git
$ cd egpu-switcher
$ make install
$ sudo egpu-switcher setup

Uninstall:

Critical Warning: Do not use this command on any version prior to 0.10.2!
There was a critical typo in the Makefile which would delete your /usr/bin folder. Please do a manual uninstall by removing the egpu-switcher folder in the /usr/bin/ and the /usr/share/ directory.

$ sudo egpu-switcher cleanup
$ make uninstall

Commands

egpu-switcher setup [--override] [--noprompt]
    This will generate the "xorg.conf.egpu" and "xorg.conf.internal" files and
    symlink the "xorg.conf" file to one of them.
    
    It will also create the systemd service, that runs the "switch" command on each bootup.
    
    This will NOT delete any already existing files. If an "xorg.conf" file already exists, 
    it will be backed up to "xorg.conf.backup.{datetime}". This can later be reverted by
    executing the "cleanup" command.

    --override
        If an AMD GPU or open-source NVIDIA drivers are used, the "switch" command 
        will prevent from switching to the eGPU if there are no displays directly attached to it. 
        This flag will make sure to switch to the EGPU even if there are no displays attached.

    --noprompt
        Prevent the setup from prompting for user interaction if there is
        no existing configuration file found. (Is currently only used by the "postinst" script)
egpu-switcher switch auto|egpu|internal [--override]
    Switches to the specified GPU. if the auto parameter is used, the script will check if 
    the eGPU is attached and switch accordingly. 
    
    The computer (or display-manager) needs to be restarted for this to take effect.

    --override
        If an AMD GPU or open-source NVIDIA drivers are used, the "switch" command 
        will prevent from switching to the eGPU if there are no displays directly attached to it. 
        This flag will make sure to switch to the EGPU even if there are no displays attached.
egpu-switcher cleanup [--hard]
    Remove all files egpu-switcher has created previously and restore the backup
    of previous "xorg.conf" files.

    --hard
        Remove configuration files too.
egpu-switcher config
    Prompts the user to specify their external/internal GPU and saves their answer
    to the configuration file.
egpu-switcher remove
    Allows the user to remove their eGPU without a complete reboot.
    This method will still restart the display-manager, and therefore terminate all its child-processes.

Troubleshooting

If you run into problems, please have a look at TROUBLESHOOT.md before reporting any issues.


Background information

A backup of your current xorg.conf will be created, nothing gets deleted. If the script doesn't work for you, you can revert the changes by executing egpu-switcher cleanup or just completely uninstall the script with apt remove egpu-switcher. This will remove all files it has created and also restore your previous xorg.conf file.

This script will create two configuration files in your X-Server folder /etc/X11.The file xorg.conf.egpu holds the settings for your EGPU and the file xorg.conf.internal holds the settings for your internal graphics.

Then a symlink xorg.conf will be generated which points to the corresponding config file, depending on wheter your egpu is connected or not.

Additionally a custom systemd service with the following content will be created.

/etc/systemd/system/egpu.service

[Unit]
Description=EGPU Service
Before=display-manager.service
After=bolt.service

[Service]
Type=oneshot
ExecStart=/usr/bin/egpu-switcher switch auto

[Install]
WantedBy=graphical.target

This will enable the automatic detection wheter your egpu is connected or not on startup.

  •         when i was so embarassed to use EGPU in NUC.  finally ,i get some help by Mr. zhang to solve this problems .         first, to be honest, i use those article to solve basic install 在Ubuntu中使用雷

 相关资料
  • This plugin adds buttons on a web page to switch between several language. It uses dhtml (no reload) and is based of the usage of "lang" attributes in the HTML code.

  • Brew PHP Switcher Brew PHP switcher is a simple script to switch your Apache and CLI configs quickly between major versions of PHP. If you support multiple products/projects that are built using eithe

  • 声音开关指示小程序 Sound Switcher Indicator 是一款用户可通过Ubuntu面板方便地改变音频输入和输出。而无需访问系统设置,用户可以进行HDMI音频扬声器切换,例如,切换到耳机。 安装方法: sudo add-apt-repository ppa:yktooo/ppasudo apt-get updatesudo apt-get install indicator-sound-switcher

  • #非技术2024笔面经# 一面 自我介绍 主要就是挖简历 然后问了一下为什么想走产品 反问 业务线内容 对实习生期待 二面(主管面 自我介绍 问了问项目 然后问了离职原因 介绍一款喜欢使用的产品+后续迭代方向+如何商业化 hr面 很平常的hr面 算上餐补一天300 #产品实习,你更倾向大公司or小公司#

  • 鼠鼠 国内周五 3/22号早上10点面完的,本来约的是1个小时,最后深挖简历,一堆场景题,加上计网八股,最后两道算法题,一共面了1个半小时。 反问环节,面试官给的评价是需要更加深度思考,多考虑考虑不同场景下会遇到的问题,对个人提升会比较大。最后夸我总体不错,比较优秀(客套感觉) 网上看到不同的帖子说🐧如果面试完,还是面试链接状态,就是面试官还没提交面评。 是不是凉了啊,应不应该发个邮件问问,因为

  • #实习# #腾讯# #面试# 投了简历沉没20天没信息,本来以为凉了,结果又被捞起来了 面试流程: 1.自我介绍 2.面试官介绍工作部门是做火影忍者手游的,有没有了解过 3.擅长编程语言是什么,c语言掌握程度怎么样(语言和具体工作室有关) 4.简历上项目写的是javaweb的项目以及大创科研项目,直接跳过项目没有问,上来就是两道算法,语言任选 5.两个算法题目 问题一:设计实现memmove函数,

相关阅读

相关文章

相关问答

相关文档