Hi Tyler, I did a lot of experimenting a while back to find something that works well for me. I have a MacBook Pro with a HiDPI screen connected to two 1080p external monitors via ThunderBolt-to-DisplayPort adapters. I place my MacBook Pro to the right of the two external monitors. I also run i3. Here's what I found worked for me: .Xresources contains: Xft.dpi: 220 .xinitrc contains: xrdb -merge ~/.Xresources export QT_AUTO_SCREEN_SCALE_FACTOR=1 export GDK_SCALE=1.5 export GDK_DPI_SCALE=0.75 exec i3 xrandr command for external monitors: xrandr --output DP1 --scale 1.5x1.5 --auto --pos 0x0 --primary --output DP2 --scale 1.5x1.5 --auto --pos 2880x0 --output eDP1 --mode 1920x1200 --pos 5760x0 xrandr command for switching back to internal laptop screen: xrandr --output eDP1 --auto --primary --output DP1 --off --output DP2 --off I tried playing with panning but I found it easier to just set similar resolutions using whatever mode I want on the monitors and the proper scale option and then specifying the absolute positions with --pos. When external monitors are enabled, I reduce the resolution of my laptop screen because the laptop is on a stand further away from me so I need the text a bit larger. Good luck. Let us know how it goes. Thanks, Eric On Mon, Jul 30, 2018 at 11:18 PM Tyler <tylera@privatedemail.net> wrote:
Hi,
I am using ArchLinux with i3 on my Dell XPS 13" 9370 @ 3840x2160) HiDPI and everything works great with:
.Xresources:
! xft fonts !---------------------------------------------------------------------- Xft.dpi: 220 Xft.autohint: 0 Xft.lcdfilter: lcddefault Xft.hintstyle: hintfull Xft.hinting: 1 Xft.antialias: 1 Xft.rgba: rgb
! urxvt !--------------------------------------------------------------------- URxvt*font: xft:DejaVu Sans Mono for Powerline:size=12: \ minspace=False:antialias=true, \ xft:Segoe UI Emoji:size=12:minspace=False:antialias=true
URxvt*boldFont: xft:DejaVu Sans Mono for Powerline:size=12: \ minspace=False:antialias=true, \ xft:Segoe UI Emoji:size=12:minspace=False:antialias=true
URxvt.letterSpace: -1
and in /etc/profile.d/hidpi.sh
export GDK_SCALE=2 export GDK_DPI_SCALE=0.5 export QT_AUTO_SCREEN_SCALE_FACTOR=0 export QT_SCREEN_SCALE_FACTORS=2 export QT_QPA_PLATFORMTHEME=qt5ct
However recently I bought a Dell DA300 Mobile Adapter and decided I wanted to use my external Dell 30" 3000WFP (2560x1600) over DisplayPort.
I found this blog article https://blog.summercat.com/configuring-mixed-dpi-monitors-with-xrandr.html which explains exactly what I am trying to do. The only difference is the placement of the external screen (mine is on the left of the laptop) and the screen size and resolution.
In that article he uses his HiDPI on both screens and then scales down on the external screen, which is why he doubles the resolution of the external display. The reason he does that is so he doesn't have to touch .Xresources or fiddle with toolkit scaling options.
Using this command I was able to get it working great with a single external monitor ie the Dell 30" 3000WFP @ (2560x1600)
xrandr --dpi 220 --fb 5120x3200 \ --output eDP1 --off \ --output DP1 --scale 2x2 --panning 5120x3200
With the dual-monitor setup I'm struggling to understand the panning option. I have looked at https://wiki.archlinux.org/index.php/xrandr and the man file and still couldn't figure that track x track y part out. It's not very easy to understand.
So far for the external monitor I have this:
xrandr --dpi 220 --fb 8960x5360 \ --output eDP1 --mode 3840x2160 \ --output DP1 --scale 2x2 --pos -2560x0 --panning 5120x3200+2560+0
What I want is to be able to access the whole area of both screens. In his example he has a laptop at 3200x1800 and an external monitor at 1920x1080
Dual monitors
When I want to use both monitors, this is the command I run:
xrandr --dpi 276 --fb 7040x3960 \ --output eDP-1 --mode 3200x1800 \ --output DP-1-2 --scale 2x2 --pos 3200x0 --panning 3840x2160+3200+0
Here's an explanation of the options:
Global options: --dpi 276 sets the DPI to 276. --fb 7040x3960 creates one screen with resolution 7040x3960. This is the combined resolution of the two monitors. The high DPI monitor has 3200x1800 resolution. The lower DPI monitor has 1920x1080 resolution, but I double it as I scale it by 2 (see below). Combine these like so: 3200+1920*2 x 1800+1080*2 = 7040x3960. Both monitors share this screen. High DPI monitor options (--output eDP-1): --mode 3200x1800 says to use resolution 3200x1800. This is the default, but specifying it is necessary if the monitor is disabled (as it is when using the external monitor by itself) as it enables the monitor. Lower DPI monitor options (--output DP-1-2): --scale 2x2 is similar to zooming out. This is necessary as we set the DPI globally to that of the high DPI monitor. --pos positions it to the right of the laptop monitor. --panning allows our pointer to access the whole area.
Any help or tips would be much appreciated!
-- Tyler