What I would do is create a bash script and link to a keyboard shortcut to execute as needed. One of the advantages of xrandr is the ease of scripting.
Lee 😎
On Jan 11, 2022 at 1:25 AM, Andreas Fink <
finkandreas@web.de> wrote:
Hello,
I've got a new laptop and see a strange behaviour when disconnecting
and reconnecting my USB-C screen.
Here are the steps that I am doing. I have a dual screen setup with
xrandr, with my notebook screen being the primary screen and a second
large external screen connected via USB-C to my notebook directly.
Now I disconnect the USB-C cable and do not do anything software wise,
i.e. my X-Server is still pretending to run on two screens, I can move
the screen outside of my notebook screen (into the area where the
external screen).
Now I reconnect the USB-C cable but the screens stays blank (the the
screen it says "No USB Type-C connection from your computer"). The only
way to get a signal again is to first use xrandr to only use my
notebook screen, and at the exact time udev gets a DRM event, and
suddently my external monitor appears within xrandr as connected (I did
not touch the cable, I only ran an xrandr command to use only the
notebook screen). Right after the DRM event I can run the xrandr
command to use both screens, but it is annoying to degrade first to one
screen, because all windows are moved around and I do not end up with
the same window setup as before.
Using the same screen with the same experiment as described above but
with a different notebook the screen is able to pick up the signal
again, so it's not purely a problem with the external screen.
Any idea what is going on and how I can workaround it? I just want to disconnect the cable and reconnect it without the need to switch any
xrandr setup.
Thanks for your ideas and help
Andreas
<div id="edo-message"><div><div>What I would do is create a bash script and link to a keyboard shortcut to execute as needed. One of the advantages of xrandr is the ease of scripting.</div><div><br></div><div><br></div><div id="edo-signature"><pre>Lee ðŸ˜
Ž</pre></div></div></div><div id="edo-original"><div><blockquote type="cite" style="margin:1ex 0 0 0!important;border-left:1px #ccc solid!important;padding-left:0.4ex!important"><div id="edo-meta">On Jan 11, 2022 at 1:25 AM, Andreas Fink <<a href="
mailto:
finkandreas@web.de">
finkandreas@web.de</a>> wrote: <br><br></div><pre>Hello,
<br>I've got a new laptop and see a strange behaviour when disconnecting <br>and reconnecting my USB-C screen.
<br>Here are the steps that I am doing. I have a dual screen setup with <br>xrandr, with my notebook screen being the primary screen and a second <br>large external screen connected via USB-C to my notebook directly.
<br>Now I disconnect the USB-C cable and do not do anything software wise, <br>i.e. my X-Server is still pretending to run on two screens, I can move <br>the screen outside of my notebook screen (into the area where the <br>external screen).
<br>Now I reconnect the USB-C cable but the screens stays blank (the the <br>screen it says "No USB Type-C connection from your computer"). The only
<br>way to get a signal again is to first use xrandr to only use my <br>notebook screen, and at the exact time udev gets a DRM event, and <br>suddently my external monitor appears within xrandr as connected (I did <br>not touch the cable, I only ran an xrandr command to use only the <br>notebook screen). Right after the DRM event I can run the xrandr <br>command to use both screens, but it is annoying to degrade first to one <br>screen, because all windows are moved around and I do not end up with <br>the same window setup as before.
<br>Using the same screen with the same experiment as described above but <br>with a different notebook the screen is able to pick up the signal <br>again, so it's not purely a problem with the external screen.
<br>Any idea what is going on and how I can workaround it? I just want to <br>disconnect the cable and reconnect it without the need to switch any <br>xrandr setup.
<br>Thanks for your ideas and help
<br>Andreas
<br></pre></blockquote></div></div>
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)