[SCRIPT] Xorg.conf Generator and Switcher
Hello everyone. I just finished whipping up a really basic script that I hope will help some people out.
This script automatically enables your eGPU when you boot with it plugged in, and disables the config when you boot without it.
You can find it here. Just clone the repo and then run setup.sh as root and that should be it.
The script looks for the PCI Bus ID of your eGPU and then will generate the xorg.conf seen in this post, with your own BusID substituted. So, in theory, it could work with multiple eGPU enclosures. If you are not docked, then it will delete the xorg.conf and everything will boot as normal.
The setup.sh script will make this script run on bootup before X loads.
While we still don't have hotplugging, I would like to think that this script brings us one step closer to true plug and play.
Run setup.sh and reboot. Booting with eGPU plugged in will generate xorg.conf. Booting w/o eGPU will just be a normal boot.
This works well with the gswitch script too, I just replaced the contents of the if and else in the xswitcher file with
$(yes n | gswitch egpu)
$(yes n | gswitch internal)
so then it gets setup automatically at boot, but you can also switch on the fly with just a logout through the gswitch gui.
Edit: Attached cleaned up version of the xswitcher file I used.
hey buddy, i want to thank you for the nice script.
i tested it on parrot security OS. Workin flawless :)!
just a minor question, what do i need to change to keep the internal display active together with the egpu connected displays ?
Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts
That would be the section in the xswitcher script that says:
However that is not my xorg.conf so 50/50 if that is correct...
Edit: I did not write that xorg.conf is what I meant to say. Also, for some reason, my internal screen is still enabled despite having those lines in the xorg.conf file so YMMV
Update #3: So something broke?
I am not really sure why things aren't working. I ran installed an update from the Software Center (via that little pop-up dialogue window). Now the xorg.config script no longer works. Has anyone else encountered this issue?