Giter Club home page Giter Club logo

single-gpu-passthrough-start-script-tty-zsh's Introduction

Single GPU Passthrough VM Start/Stop Script for Zsh

This script is meant to be sourced from your user's Z shell. I prefer to do this with an alias.

Why does this exist?

I wanted a script that could make sure that my GPU doesn't crash after I shut down my VM, because for one reason or another an application like VSCode, OBS, etc. would stick around even after I shutdown my desktop environment, and then break amdgpu.

I also wanted a script that was easy to add extra little things to, like mounting drives, changing the status of a service, or something else. You can add your own commands.

Finally, because of the aforementioned reason, I wanted a script that could run as the user.

This method tends to work more reliably for me than hook scripts, which is why I published it. Those commonly mentioned hook scripts have been unreliable for myself and others.

How do I use it?

I personally set up an alias in my ~/.zshrc, using a line like alias startvm="source somepath/start.sh" and alias revertvm="source somepath/revert.sh". You can just call the script directly using source if you want.

I sign out of my DE and then switch to a tty using Ctrl + Alt + F4 (or some other function key). I then sign in there, and run startvm (or equivalent).

This script allows you to choose a VM. You do not need to add the name of your VM in manually.

single-gpu-passthrough-start-script-tty-zsh's People

Contributors

m2jest1c avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

opticblu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.