You are not logged in.

#1 2018-09-02 12:27:40

Hack1337
Member
Registered: 2018-09-02
Posts: 11

Second Monitor and i3 wm

Hi, i recently tried to connect a second monitor via DVI, which brought up some resolution problems.

First i thought it might be solvable with xrandr.
It turned out, that the resolution is configured right,
but i3 doesn't know how to scale the 'interface' so that it only filles the upper left corner of the screen,
Although  i can drag floating containers anywhere on the screen.

Due to the fact, that this is my first post in this forum i hope you'll excuse if this doesn't belong here
or you need more information to help me with this problem.

Thanks in advance and have a nice time,

Hacki smile

Offline

#2 2018-09-02 12:37:10

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: Second Monitor and i3 wm

This likely depends on how/when you run xrandr.  If you run xrandr from within i3, i3 just may not react to the ConfigureNotify event of the root window to reset it's size.  Instead run xrandr from your xinitrc (or comparable startup file) prior to starting i3, so when i3 starts and detects the screen geometry it will have your preferred geometry from the start.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2018-09-02 13:48:51

Hack1337
Member
Registered: 2018-09-02
Posts: 11

Re: Second Monitor and i3 wm

Trilby wrote:

This likely depends on how/when you run xrandr.  If you run xrandr from within i3, i3 just may not react to the ConfigureNotify event of the root window to reset it's size.  Instead run xrandr from your xinitrc (or comparable startup file) prior to starting i3, so when i3 starts and detects the screen geometry it will have your preferred geometry from the start.

So if i connect the screen after entering i3 there is no way to tell i3 it should resize?
A script of this nature would solve my problem in the most comfortable way.

Offline

#4 2018-09-02 14:06:25

seth
Member
Registered: 2012-09-03
Posts: 49,963

Online

#5 2018-09-02 15:04:13

Hack1337
Member
Registered: 2018-09-02
Posts: 11

Re: Second Monitor and i3 wm

thanks for that blog .. i looked up the program on github, found it, downloaded it as .zip and unzipped it ..
now i dont know how to enable it, so it does what it is meant to do.

Thanks in advance and have a nice time,

Hacki smile

Offline

#6 2018-09-02 15:07:36

headkase
Member
Registered: 2011-12-06
Posts: 1,975

Re: Second Monitor and i3 wm

Hack1337 wrote:

thanks for that blog .. i looked up the program on github, found it, downloaded it as .zip and unzipped it ..
now i dont know how to enable it, so it does what it is meant to do.

Thanks in advance and have a nice time,

Hacki smile

See: X On Resize in the: Arch User Repository.  Make sure you've read up on: Makepkg to understand how to build AUR packages.  Once you have a package install it with:

sudo pacman -U <package_name>

Where "<package_name>" is the filename of the software that Makepkg made.

Last edited by headkase (2018-09-02 15:09:27)

Offline

#7 2018-09-02 15:17:54

seth
Member
Registered: 2012-09-03
Posts: 49,963

Re: Second Monitor and i3 wm

Also Keith "even wrote a manual page" (must have killed him ;-), so read that as well.

Online

#8 2018-09-02 15:27:41

Hack1337
Member
Registered: 2018-09-02
Posts: 11

Re: Second Monitor and i3 wm

headkase wrote:
Hack1337 wrote:

thanks for that blog .. i looked up the program on github, found it, downloaded it as .zip and unzipped it ..
now i dont know how to enable it, so it does what it is meant to do.

Thanks in advance and have a nice time,

Hacki smile

See: X On Resize in the: Arch User Repository.  Make sure you've read up on: Makepkg to understand how to build AUR packages.  Once you have a package install it with:

sudo pacman -U <package_name>

Where "<package_name>" is the filename of the software that Makepkg made.

Thanks.. found it .. will try and tell you if it works smile

Offline

#9 2018-09-02 15:28:51

Hack1337
Member
Registered: 2018-09-02
Posts: 11

Re: Second Monitor and i3 wm

seth wrote:

Also Keith "even wrote a manual page" (must have killed him ;-), so read that as well.

Haha yes he might have a burnout now tongue

.. i read that already .. but didnt really help me hmm ..

Offline

#10 2018-09-02 15:41:26

Hack1337
Member
Registered: 2018-09-02
Posts: 11

Re: Second Monitor and i3 wm

@headkase: seems like it doesnt work .. installed, updated, rebooted ... doesnt work sad

Offline

#11 2018-09-02 16:12:33

headkase
Member
Registered: 2011-12-06
Posts: 1,975

Re: Second Monitor and i3 wm

Hack1337 wrote:

@headkase: seems like it doesnt work .. installed, updated, rebooted ... doesnt work sad

The AUR package is just to get it properly installed in your system.  If you did that then it is installed with all the files properly tracked by pacman and now you can move on to getting it configured properly.  Perhaps seth will be able to help you there.

Last edited by headkase (2018-09-02 16:13:34)

Offline

#12 2018-09-02 17:52:00

seth
Member
Registered: 2012-09-03
Posts: 49,963

Re: Second Monitor and i3 wm

Ok, I just read your first thread (somthing I should have done before) - you're apparently not out for a daemon to update your outputs when you attach/remove one (what x-on-resize does), but struggle w/ i3wm's handling of the available screen geometry.

Let's start w/ the basics: what's the output of "xrandr -q" when the external screen is attached?
Also to stress Tribly's point: depending on when and how you run xrandr to update the output settings, i3wm might miss that event, so it's crucial to know whether (and how exactly) you run this w/ your i3wm config, xinitrc or just at some point during the session.

Online

#13 2018-09-02 18:45:00

Hack1337
Member
Registered: 2018-09-02
Posts: 11

Re: Second Monitor and i3 wm

seth wrote:

Let's start w/ the basics: what's the output of "xrandr -q" when the external screen is attached?

I'll try that tomorrow and tell you smile

Offline

#14 2018-09-02 23:51:37

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: Second Monitor and i3 wm

X-on-resize looks like a handy tool, but I suspect it is not really on point for the main question of this thread.

Hack1337 wrote:

So if i connect the screen after entering i3 there is no way to tell i3 it should resize?

I suspect there probably is, but I don't know i3 well at all.  Many window managers will listen for the relevant configure events, but given your symptoms it would seem that i3 is not doing this by default.

You could, however, simply restart i3, though it doesn't seem to have a "replace" command (like openbox and some others).  But you could run i3 in a loop in your xinitrc. (edit: see below for the best approach).

Last edited by Trilby (2018-09-03 21:08:35)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#15 2018-09-03 18:49:48

DeadLink404
Member
Registered: 2017-11-24
Posts: 40

Re: Second Monitor and i3 wm

Trilby wrote:

X-on-resize looks like a handy tool, but I suspect it is not really on point for the main question of this thread.
You could, however, simply restart i3, though it doesn't seem to have a "replace" command (like openbox and some others).

There is a restart command in the default config:

bindsym Mod1+Shift+r restart

Offline

#16 2018-09-16 12:16:52

Hack1337
Member
Registered: 2018-09-02
Posts: 11

Re: Second Monitor and i3 wm

hi again … the problem is still unsolved .. restarting i3 doesn't help at all …

this is my output of "xrandr -q":

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
LVDS1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 310mm x 170mm
   1366x768      60.10*+
   1280x720      59.74 
   1024x768      60.00 
   1024x576      60.00    59.90    59.82 
   960x540       60.00    59.63    59.82 
   800x600       60.32    56.25 
   864x486       60.00    59.92    59.57 
   640x480       59.94 
   720x405       59.51    60.00    58.99 
   680x384       60.00 
   640x360       59.84    59.32    60.00 
DP1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
DP3 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
HDMI3 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 480mm x 270mm
   1920x1080     60.00*+
   1680x1050     59.88 
   1280x1024     75.02    60.02 
   1440x900      59.90 
   1280x960      60.00 
   1280x800      59.91 
   1152x864      75.00 
   1280x720      60.00 
   1024x768      75.03    70.07    60.00 
   832x624       74.55 
   800x600       72.19    75.00    60.32    56.25 
   640x480       75.00    66.67    59.94 
   720x400       70.08 
VGA1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

Offline

#17 2018-09-16 12:50:09

seth
Member
Registered: 2012-09-03
Posts: 49,963

Re: Second Monitor and i3 wm

Please always wrap console output in "code" tags (makes it easier to read, check all newbie corner stickies while at it ;-)

There's your problem: you've two overlapping outputs of different sizes and i3 aligns to the smaller one.
You could arrange your outputs so that they do not overlap or, if you just want to clone the output, scale the bigger output down to effectively run at 1366x768 (factor 0.711)

Online

#18 2018-09-16 13:01:55

Hack1337
Member
Registered: 2018-09-02
Posts: 11

Re: Second Monitor and i3 wm

since i want to use both screens separately i would prefer to arrange them so they don't overlap anymore .. could you possibly explain how to do so ?

Hacki smile

Offline

#19 2018-09-16 13:10:38

seth
Member
Registered: 2012-09-03
Posts: 49,963

Online

#20 2018-09-16 13:14:19

Hack1337
Member
Registered: 2018-09-02
Posts: 11

Re: Second Monitor and i3 wm

so i'll rtfm ^^

Offline

#21 2018-09-16 13:34:51

Hack1337
Member
Registered: 2018-09-02
Posts: 11

Re: Second Monitor and i3 wm

"xrandr --output HDMI3 --left-of LVDS1" did fix it ... thanks for your time and help. smile

Hacki

Offline

Board footer

Powered by FluxBB