I3wm manage multiscreen setup?

I have a multiscreen setup at work using a docking station and a one monitor with laptop at home. I run a bit into trouble configuring my system, more particularly am wondering what you do when disconnecting your laptop from your docking station? Any commands on terminal so i3wm doesn’t panic or get lost?

My setup: I use autorandr —save home And autorandr —save work to set up initially both of my layouts. When I connect to let’s say home I just do autorandr —change home and it normally recognizes either home or work. I also have this started in my config file.

Problems: for one, when I simply disconnect my docking at home, go to work and reconnect, I can’t make it work via autorandr —change work in my terminal. I need to logout and back in then it accepts it. Slight annoyance. For two, sometimes when I disconnect and later reconnect the lapop to my screen it often freezes, literally no mouse no workspaces, nothing works. Doesn’t make any sense to me since this happens 50/50 of the time.

I find the problems rather eratic, don’t have these at all when using gnome wayland. Just wondering if there is any best practice before disconnecting my docking station to avoid a full freeze, like a simple terminal command and such?

And second question, what would be the best practice to troubleshoot the screen freeze, looking at journal log?


Edit: Maybe this is helpful?

1 Like

Interesting, I knew none of these things. Will have to check it out.

I don’t know much about it either. Thought maybe it would be of some help. I don’t use i3 on a daily basis but i have tried it and like the way it’s set up on EOS. I could switch someday but happy with KDE.

I would say the issue doing such on i3 is that it is not really dynamic and is a set of individual parts.
P.E changing the screen size/adding a screen with xrandr, will not change the background, and if config has a bar can cause also issues if the bar is not set to a specific display or the opposite the display disappears while config has a bar configured for it…

So it could be that the switcher needs some more scriptlets to solve one or more of changes to the environment.

I think one of the main things is that i3 doesn’t register when I disconnect my screens. Then xrandr doesn’t allow me to switch to my other setup or sometimes freezes. Perhaps if I switch to laptop only via xrandr in terminal or script (still while connected), then disconnect the docking station things might be smoother.

could be adding an i3 reload could help?

And i do use to set display for the bar:

bar {
	font pango:Noto Sans Regular 9, FontAwesome 9
	output HDMI-0

possible also to have two configs and switch them when changing display setup (not sure) ?