<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>i3 FAQ - Individual question feed</title><link>https://faq.i3wm.org/questions/</link><description>Frequently asked questions and answers about the i3 window manager</description><atom:link href="http://faq.i3wm.org/feeds/question/958/" rel="self"></atom:link><language>en</language><copyright>Copyright i3, 2012</copyright><lastBuildDate>Tue, 18 Jun 2013 12:16:58 +0000</lastBuildDate><item><title>workspaces away after unplugging monitor</title><link>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/</link><description>Hey guys,

i3 is running on my notebook and an external TFT is connected via VGA. If I unplug the VGA cable and put it back again everything works fine (means the workspaces on the TFT are still there). Sometimes I need to unplug the VGA cable and then work for a while. When I then come back later and reconnect the cable (after 1h for example) I can't get back the workspaces on the external monitor (TFT) anymore, the screen just stays black.

I'm not sure if I missunderstand something here but actually that should work without problems. Do you guys maybe have an idea what there could be the reason...</description><pubDate>Tue, 01 Jan 2013 23:01:28 +0000</pubDate><guid>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/</guid></item><item><title>Answer by Cloud for &lt;p&gt;Hey guys,&lt;/p&gt;

&lt;p&gt;i3 is running on my notebook and an external TFT is connected via VGA. If I unplug the VGA cable and put it back again everything works fine (means the workspaces on the TFT are still there). Sometimes I need to unplug the VGA cable and then work for a while. When I then come back later and reconnect the cable (after 1h for example) I can't get back the workspaces on the external monitor (TFT) anymore, the screen just stays black.&lt;/p&gt;

&lt;p&gt;I'm not sure if I missunderstand something here but actually that should work without problems. Do you guys maybe have an idea what there could be the reason...&lt;/p&gt;
 </title><link>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/?answer=994#post-id-994</link><description>Have you tried to in-place restart i3? (In my config is: Mod1+Shift+r, check your config file for it.

That is, do an in-place restart after you reconnect the VGA monitor.

Best,

~C</description><pubDate>Tue, 08 Jan 2013 12:43:44 +0000</pubDate><guid>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/?answer=994#post-id-994</guid></item><item><title>Comment by Michael for &lt;p&gt;Have you tried to in-place restart i3? (In my config is: Mod1+Shift+r, check your config file for it.&lt;/p&gt;

&lt;p&gt;That is, do an in-place restart after you reconnect the VGA monitor.&lt;/p&gt;

&lt;p&gt;Best,&lt;/p&gt;

&lt;p&gt;~C&lt;/p&gt;
</title><link>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/?comment=996#comment-996</link><description>That should not be necessary when you use xrandr to properly configure the monitors.</description><pubDate>Tue, 08 Jan 2013 17:32:14 +0000</pubDate><guid>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/?comment=996#comment-996</guid></item><item><title>Comment by i3-tiler for &lt;p&gt;Have you tried to in-place restart i3? (In my config is: Mod1+Shift+r, check your config file for it.&lt;/p&gt;

&lt;p&gt;That is, do an in-place restart after you reconnect the VGA monitor.&lt;/p&gt;

&lt;p&gt;Best,&lt;/p&gt;

&lt;p&gt;~C&lt;/p&gt;
</title><link>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/?comment=1010#comment-1010</link><description>I use xrandr in my setup too. Pretty much like you described. Restarting in place I also tried but that did not work. At the moment I have no further ideas...</description><pubDate>Wed, 09 Jan 2013 22:10:26 +0000</pubDate><guid>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/?comment=1010#comment-1010</guid></item><item><title>Comment by Cloud for &lt;p&gt;Have you tried to in-place restart i3? (In my config is: Mod1+Shift+r, check your config file for it.&lt;/p&gt;

&lt;p&gt;That is, do an in-place restart after you reconnect the VGA monitor.&lt;/p&gt;

&lt;p&gt;Best,&lt;/p&gt;

&lt;p&gt;~C&lt;/p&gt;
</title><link>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/?comment=1016#comment-1016</link><description>note that for the script to be executed all the times i3 restarts you need to use the exec_always command in the config. My script for setting up monitors can be found here: http://pastebin.com/mXnCL2aQ</description><pubDate>Thu, 10 Jan 2013 10:56:44 +0000</pubDate><guid>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/?comment=1016#comment-1016</guid></item><item><title>Comment by Cloud for &lt;p&gt;Have you tried to in-place restart i3? (In my config is: Mod1+Shift+r, check your config file for it.&lt;/p&gt;

&lt;p&gt;That is, do an in-place restart after you reconnect the VGA monitor.&lt;/p&gt;

&lt;p&gt;Best,&lt;/p&gt;

&lt;p&gt;~C&lt;/p&gt;
</title><link>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/?comment=1002#comment-1002</link><description>I use xrandrd in the setup script of i3 (I called it setupmonitors.sh). First it checks if the external monitor is connected (e.g., xrandr | grep "VGA1 connected"), then depending on that it either sets up two screens or one.</description><pubDate>Wed, 09 Jan 2013 08:49:24 +0000</pubDate><guid>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/?comment=1002#comment-1002</guid></item><item><title>Answer by Vardhan for &lt;p&gt;Hey guys,&lt;/p&gt;

&lt;p&gt;i3 is running on my notebook and an external TFT is connected via VGA. If I unplug the VGA cable and put it back again everything works fine (means the workspaces on the TFT are still there). Sometimes I need to unplug the VGA cable and then work for a while. When I then come back later and reconnect the cable (after 1h for example) I can't get back the workspaces on the external monitor (TFT) anymore, the screen just stays black.&lt;/p&gt;

&lt;p&gt;I'm not sure if I missunderstand something here but actually that should work without problems. Do you guys maybe have an idea what there could be the reason...&lt;/p&gt;
 </title><link>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/?answer=1364#post-id-1364</link><description>Hi,
 These are the aliases I use, and they work pretty well. YMMV:

    _vga=$( xrandr  | sed -n 's/^\(VGA.\).*/\1/pg')
    alias laptop='xrandr --output LVDS1 --auto --output $_vga --off'
    alias monitor='xrandr --output LVDS1 --off --output $_vga --auto'
    alias dual='xrandr --output LVDS1 --auto --left-of $_vga --output $_vga --auto'

The reason for $_vga is that sometimes external monitor is VGA1 and sometimes it's VGA2. </description><pubDate>Sun, 10 Mar 2013 04:13:06 +0000</pubDate><guid>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/?answer=1364#post-id-1364</guid></item><item><title>Comment by i3-tiler for &lt;p&gt;Hi,
 These are the aliases I use, and they work pretty well. YMMV:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;_vga=$( xrandr  | sed -n 's/^\(VGA.\).*/\1/pg')
alias laptop='xrandr --output LVDS1 --auto --output $_vga --off'
alias monitor='xrandr --output LVDS1 --off --output $_vga --auto'
alias dual='xrandr --output LVDS1 --auto --left-of $_vga --output $_vga --auto'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The reason for $_vga is that sometimes external monitor is VGA1 and sometimes it's VGA2. &lt;/p&gt;
</title><link>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/?comment=1366#comment-1366</link><description>I don't know on what it depends but with _some_ monitors I just need to switch between virtual consoles like Michael suggested above and all workspaces were like before unplugging the notebook.</description><pubDate>Sun, 10 Mar 2013 10:59:43 +0000</pubDate><guid>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/?comment=1366#comment-1366</guid></item><item><title>Answer by i3-tiler for &lt;p&gt;Hey guys,&lt;/p&gt;

&lt;p&gt;i3 is running on my notebook and an external TFT is connected via VGA. If I unplug the VGA cable and put it back again everything works fine (means the workspaces on the TFT are still there). Sometimes I need to unplug the VGA cable and then work for a while. When I then come back later and reconnect the cable (after 1h for example) I can't get back the workspaces on the external monitor (TFT) anymore, the screen just stays black.&lt;/p&gt;

&lt;p&gt;I'm not sure if I missunderstand something here but actually that should work without problems. Do you guys maybe have an idea what there could be the reason...&lt;/p&gt;
 </title><link>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/?answer=972#post-id-972</link><description>xrandr was also my thought. Today I could test this scenario again. Unfortunately xrandr didn't make it, although xrandr shows that VGA1 is connected. I have no idea how to trigger that the monitor is getting recognized... </description><pubDate>Thu, 03 Jan 2013 23:35:01 +0000</pubDate><guid>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/?answer=972#post-id-972</guid></item><item><title>Comment by i3-tiler for &lt;p&gt;xrandr was also my thought. Today I could test this scenario again. Unfortunately xrandr didn't make it, although xrandr shows that VGA1 is connected. I have no idea how to trigger that the monitor is getting recognized... &lt;/p&gt;
</title><link>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/?comment=976#comment-976</link><description>I recognized answering is not the right option (directly after I applied it) :(  Thanks for your hint, I'll give it a try.</description><pubDate>Fri, 04 Jan 2013 10:51:31 +0000</pubDate><guid>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/?comment=976#comment-976</guid></item><item><title>Comment by i3-tiler for &lt;p&gt;xrandr was also my thought. Today I could test this scenario again. Unfortunately xrandr didn't make it, although xrandr shows that VGA1 is connected. I have no idea how to trigger that the monitor is getting recognized... &lt;/p&gt;
</title><link>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/?comment=991#comment-991</link><description>I tried it with switching between the virtual consoles but it didn't work... :(</description><pubDate>Mon, 07 Jan 2013 21:58:10 +0000</pubDate><guid>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/?comment=991#comment-991</guid></item><item><title>Comment by Michael for &lt;p&gt;xrandr was also my thought. Today I could test this scenario again. Unfortunately xrandr didn't make it, although xrandr shows that VGA1 is connected. I have no idea how to trigger that the monitor is getting recognized... &lt;/p&gt;
</title><link>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/?comment=974#comment-974</link><description>Please post comments like that as a comment in the future, not as an answer. Also, try switching to the first virtual console (Ctrl-Alt-F1), then back to X11 (Ctrl-Alt-F7 usually)</description><pubDate>Thu, 03 Jan 2013 23:41:38 +0000</pubDate><guid>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/?comment=974#comment-974</guid></item><item><title>Answer by Zucca for &lt;p&gt;Hey guys,&lt;/p&gt;

&lt;p&gt;i3 is running on my notebook and an external TFT is connected via VGA. If I unplug the VGA cable and put it back again everything works fine (means the workspaces on the TFT are still there). Sometimes I need to unplug the VGA cable and then work for a while. When I then come back later and reconnect the cable (after 1h for example) I can't get back the workspaces on the external monitor (TFT) anymore, the screen just stays black.&lt;/p&gt;

&lt;p&gt;I'm not sure if I missunderstand something here but actually that should work without problems. Do you guys maybe have an idea what there could be the reason...&lt;/p&gt;
 </title><link>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/?answer=959#post-id-959</link><description>You might try using xrandr like this:

    xrandr --output VGA1 --auto --left-of LVDS1

VGA1 being your external TFT and LVDS1 your netbooks monitor.
To see which are correct values just run xrandr alone without arguments.
After you find the correct xrandr command you might like to bind it to a keypress.
I think there is no automatic way to do this... Unless you constantly poll xrandr for connected monitors... which isn't very pretty. :(

For autodetecting, here might lie an answer sooner or later: http://unix.stackexchange.com/questions/13746/how-can-i-detect-when-a-monitor-is-plugged-in-or-unplugged</description><pubDate>Wed, 02 Jan 2013 17:06:40 +0000</pubDate><guid>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/?answer=959#post-id-959</guid></item><item><title>Answer by kynan for &lt;p&gt;Hey guys,&lt;/p&gt;

&lt;p&gt;i3 is running on my notebook and an external TFT is connected via VGA. If I unplug the VGA cable and put it back again everything works fine (means the workspaces on the TFT are still there). Sometimes I need to unplug the VGA cable and then work for a while. When I then come back later and reconnect the cable (after 1h for example) I can't get back the workspaces on the external monitor (TFT) anymore, the screen just stays black.&lt;/p&gt;

&lt;p&gt;I'm not sure if I missunderstand something here but actually that should work without problems. Do you guys maybe have an idea what there could be the reason...&lt;/p&gt;
 </title><link>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/?answer=2049#post-id-2049</link><description>I use disper (willem.engen.nl/projects/disper/), a very handy command line utility for switching display configurations. It is a wrapper around `nvidia-xconfig` but can fall back on `xrandr` if you don't use the nVIDIA binary driver / don't have nVIDIA hardware.

On top of that there's auto-disper (github.com/wertarbyte/auto-disper), which you can bind to a key and it will detect your display configuration and automatically switch to a pre-configured profile.

P.S.: I had to cripple the post because my karma is insufficient to publish links.</description><pubDate>Tue, 18 Jun 2013 12:16:58 +0000</pubDate><guid>https://faq.i3wm.org/question/958/workspaces-away-after-unplugging-monitor/?answer=2049#post-id-2049</guid></item></channel></rss>