Comments (6)
Hi @T-X I actually have the same laptop as you, nice.
For this hardware switching to the eGPU with the script is only the best when using an external display connected to the eGPU. The DRI_PRIME=1 environment variable is the preferred method for using the eGPU on the laptop's internal display.
For this combination of using the eGPU with open source drivers (amdgpu, i915 or nouveau), but with no display connected to the eGPU you should not switch to the "eGPU mode" of the script. Instead let it use the "internal mode" and use the environment variable DRI_PRIME=1
or a similar method to offload rendering to the eGPU. This can be added to /etc/environment or as a prefix before any command to run it on the eGPU.
If you force Xorg to run on the eGPU with the --override command, with an AMD card I find that even if you get an X session running (I'm able to switch to a TTY and use startx --
to get X running) it will be extremely laggy and unusable so that's why this is not recommended.
@hertg I've used the new golang version of the script and it works well and as expected for me. For the remove command, I wouldn't worry about adding it unless there's a lot of people asking for it. Since I originally added that part of the script things have changed on the driver side and now it's unnecessary for me. With an AMD card on the latest kernel and GNOME desktops I can simply log out, turn off any displays connected to the eGPU and unplug the eGPU. So unless there's someone that needs it, I don't think it's necessary to add that functionality to the script anymore.
from egpu-switcher.
Thanks for the report, unfortunately I'm not really familiar with that particular issue (how to handle the situation of using a non NVIDIA GPU with no monitors attached). The original --override
flag came from @ewagner12, so they probably have some more valuable information about what is happening here?
@ewagner12 just a sidenote, I have rewritten egpu-switcher
in golang last year, but have made my best efforts to port your contributions 1:1 without changing their behaviors, with the exception of the remove
feature, which I tried to port but simply wasn't able to get to work.
The source code for the --override
flag is here:
Lines 127 to 143 in 13b8a06
from egpu-switcher.
Ha! I found a solution / workaround:
- Let lightdm login automatically: I added "autologin-user=myuser" to /etc/lightdm.conf
After that DISPLAY=:0 xrandr
on VT2 shows meaningful values and detects eDP-1-1. However running DISPLAY=:0 xrandr --output eDP-1-1 --auto
still throws the error "xrandr: Configure crtc 5 failed".
- On VT2 (Ctrl+Alt+F2) run xrandr through a terminal emulator instead:
DISPLAY=:0 lxterminal -e xrandr --verbose --output eDP-1-1 --auto
- Press Ctrl+Alt+F7 to hop into your logged in desktop, which is now also visible on the laptop screen with your eGPU enabled. And without needing a display connected to the eGPU.
I don't know why the LightDM greeter and Xmonad won't enable and use eDP-1-1 by default in such a case. But this workaround is good enough for me now.
from egpu-switcher.
Hi @hertg I tested this more on my system and I found one bug potentially causing unintended behavior in the script related to this issue.
If /etc/X11/xorg.conf.d/99-egpu-switcher.conf
exists:
Expected Behavior: Running sudo egpu-switcher switch auto
in the above case of AMD eGPU connected with no displays removes the X11 conf file.
Actual Behavior: Running sudo egpu-switcher switch auto
in the above case only prints an error, /etc/X11/xorg.conf.d/99-egpu-switcher.conf
still exists.
I believe that at line 139 in
Lines 137 to 153 in 13b8a06
I can't speak to behavior in Xmonad as I don't use it, but I believe this should avoid a black screen unless the --override command is used
from egpu-switcher.
@ewagner12 Thanks for your report, that indeed makes sense. I created a new issue #107 for this
from egpu-switcher.
I've also opened a ticket on LightDM here. As I noticed that with just a docking station and no eGPU the LightDM greeter uses all available monitors that are routed through the iGPU. However when the eGPU is enabled through the egpu-switcher then LightDM only uses any monitors connected to the eGPU but not the eDP display anymore, as originally reported.
And also as after login configuring the eDP display via xrandr works. And when I use KDE (instead of xmonad, my prefered window manager) with an eGPU enabled then KDE also enables all connected displays by default, including the eDP-1-1 display. Which made me think that maybe LightDM should/could do something different when eGPUs are used.
from egpu-switcher.
Related Issues (20)
- some commands show debug output without verbose flag
- Add "check" command
- Fix config directory permissions
- Fix directory permissions for /usr/share folder
- still uses the i915 driver?
- switch: opensource drivers without monitors should switch to internal HOT 3
- intel arc support HOT 3
- Provide Variable Refresh Rate Support
- egpu-switcher gives black screen with a 4090 eGPU
- neither my DGPU or my EGPU displays output anymore.
- Add way to modify generated xorg.config
- After enable and then disable and then disable --hard my system config hasn't reverted ot how it was before. HOT 7
- Add an option to reload `nvidia_drm` kernel module on egpu connection
- Publish a snap of egpu-switcher? HOT 1
- Boot gets stuck with eGPU connected HOT 7
- Firefox - hardware acceleration only works on legacy branch HOT 5
- Option to disable modesetting HOT 5
- black screen of death for Lemur Pro at PopOS HOT 3
- Mention golang as build requirement in README HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from egpu-switcher.