Author Topic: Different UI size on different monitors  (Read 6669 times)

0 Members and 1 Guest are viewing this topic.

Offline dwunnith

  • Neuling
  • *
  • Posts: 1
  • I'm new. Be nice!
  • Branch: stable
  • Desktop: i3wm
  • GPU Card: nVidia GTX 860m
  • GPU driver: non-free
  • Kernel: linux46-x86_64
  • Skill: Intermediate
Different UI size on different monitors
« on: 16. April 2016, 11:16:54 »
I use a monitor with a resolution of 3840x2160 alongside my integrated laptop monitor with 1920x1080. To be able to read the text of the UI elements (i3bar, window titles, dmenu, dunst messages) on the former, I have set the font size in the configuration files to 15 (see: https://forum.manjaro.org/index.php?PHPSESSID=t9oh45h934u5ukpva39suh0nt6&topic=29893.msg247970#msg247970). This, however, makes the UI elements on the latter monitor abominably large. How could one achieve different UI font sizes on different monitors?
« Last Edit: 16. April 2016, 11:19:44 by dwunnith »
'We think in generalities, but we live in detail.'
   - Alfred Whittaker

Offline Chrysostomus

  • Maintainer
  • ***
  • Posts: 1634
  • Neckbeards are cool
    • Git
  • Branch: unstable
  • Desktop: Gnome, bspwm
  • GPU Card: Intel HD4000
  • GPU driver: free
  • Kernel: linux44-x64
  • Skill: Intermediate
Re: Different UI size on different monitors
« Reply #1 on: 17. April 2016, 14:43:10 »
I don't think i3 has pre-existing software for that. Your best bet might be gnome-settings-daemon, though I'm not sure if it can set scaling separately for different monitors either.

I would personally considering setting the better monitor to 1920x1080 resolution too, but that is not an actual solution to your problem. Potentially waste of a good monitor.

 If you use only one monktor at the same time, then srandr can solve your problem, by running a script that alters font size when a new monitor is detected. But that will not hwlp you if you want to use the simultaneously.

Offline jonathon

  • Core Team
  • *****
  • Posts: 2104
  • Technologist - Teacher - Tea drinker
  • Branch: Unstable
  • Desktop: MATE 1.14
  • GPU Card: Nvidia GTX680M
  • GPU driver: Bumblebee nvidia+intel
  • Kernel: 4.6.0-*-MANJARO x86_64
  • Skill: Advanced
Re: Different UI size on different monitors
« Reply #2 on: 17. April 2016, 18:26:51 »
There are a number of possible options here.

http://askubuntu.com/questions/393400/is-it-possible-to-have-two-different-dpi-configurations-for-two-different-screen
https://wiki.archlinux.org/index.php/multihead

It should also be possible to use xrandr to set the display's DPI independently. However, the key here is going to be experimentation.

Edit:

I've just had some success with this for a 1920x1080 + 1280x1024 setup:

Code: [Select]
xrandr --output VGA1 --auto --right-of LVDS1 --scale 1.25x1.25
though currently the mouse cursor is limited to the original "virtual" screen dimensions (i.e. I can't get all the way right+down).

Edit 2:

This is a nice trick for single displays. I haven't yet got it working correctly on a dual-head setup though:

Code: [Select]
xrandr --output LVDS1 --scale-from 1600x900 --panning 1600x900
This gives me extra space (though a little blurry) on my X230's 1366x768 screen.

Edit 3:

OK, some success. This is for a laptop with 1920x1080 screen (which I want to keep native) and a 1600x1200 external monitor which I want to scale up to 1920x1440:

Code: [Select]
xrandr --output HDMI1 --scale-from 1920x1440 --panning 1920x1440+1920+0 --fb 3840x1440 --right-of LVDS1
So, walking through the parameters:

--output HDMI1 is the connection for the external monitor.
--scale-from 1920x1440 is the exact scaled resolution.
--panning 1920x1440+1920+0 allows the mouse to move over the full screen area, and offsets it by the x-resolution of the other display
--fb 3840x1440 sets the size of the "virtual" desktop. This is the sum of the native LVDS1 and scaled HDMI1 widths, and the height of the largest display (the scaled HDMI1).
--right-of LVDS1 places the external monitor to the right of the laptop.

Some tweaks you may want:

Use --scale instead of --scale-from. For your hiDPI display it's probably easier to set this to --scale 0.5x0.5.
Use --pos XxY instead of --right-of. This allows much better control of the position of the displays.

This drawback of this approach at the moment is that there is an hidden but active area of 360 pixels "below" the laptop screen; I assume this is because I'm overriding the virtual desktop size. There might be a way to fix this.
« Last Edit: 17. April 2016, 22:43:24 by jonathon »
--
MSI GT70: Core i7-3630QM, 16GB, Nvidia GTX680M, Intel 2230, Manjaro-MATE-amd64-EFI
Lenovo X230: Core i5-3320M, 4GB, Intel HD4000, Intel 6205, Manjaro-MATE-amd64
Dell Studio 1749: Core i5 540, 8GB, ATi HD5650, Intel WLAN, Manjaro-Xfce-amd64
Let's go in the garden; you'll find something waiting.