Open joymachs opened 4 years ago
I know this is somewhat old, but I found this post while searching around for solutions to getting a GT-116 and a notebook display with the same 1366x768 resolution to work together. After a bit of tinkering I got a multi-monitor setup to work, so I figured I'd offer some guidance in case anyone else stumbles upon this.
So, first, I'd recommend making sure that xrandr is installed and also enabled in the config:
# Multi Monitor Configuration
enable_multi_monitor = true
enable_xrandr = true
current_monitor_setup = [monitor_2]
Moving on, my [monitor_2] setup is as follows:
[monitor_2]
# 2 monitors arranged horizontally
# screens widths and heights
screen_1W = 1920
screen_1H = 1080
screen_2W = 1366
screen_2H = 768
# global geometry
total_screen_width = ${screen_1W} + ${screen_2W}
total_screen_height = ${screen_1H}
tablet_offset_x = 0
tablet_offset_y = 0
xrandr_output1 = --output HDMI-2 --mode ${screen_1W}x${screen_1H} --pos 0x0 --rotate normal
xrandr_output2 = --output LVDS-1 --mode ${screen_2W}x${screen_2H} --pos ${screen_1W}x0 --rotate normal
xrandr_args = ${xrandr_output1} ${xrandr_output2}
So, to break this down, first you will need to verify that the xrandr --output arguments are using the correct video interfaces. In my case that's HDMI-2 for the GT-116 and LVDS-1 for my laptop's primary display. To figure these out for your system you can run xrandr without any arguments or, alternatively, narrow the output down to only connected displays:
xrandr | grep -P '(?<!dis)connected'
The second thing to note is that I have the tablet's display associated with the screen_1 settings and my primary display as screen_2. I'm pretty sure you can do the opposite if you want, but the important thing is to make sure the rest of the settings are consistent with whichever option you go with. So if you instead choose to associate the tablet with screen_2 then make sure that the xrandr_output# associated with the tablet's video interface now gets the screen_2W and screen_2H mode values, and so on. From my limited experiments both options seem to work fine so long as you update all the other settings to reflect whichever way you defined them.
Moving on, the total_screen_width should be the sum of both displays, so it doesn't matter which is which, but you need to make sure the total_screen_height is using the height of whichever config setting is storing the tablet's vertical resolution. Otherwise you will get problems with the pointer cumulatively drifting farther and farther away from where it should be as you move it in a direction away from the origin.
Finally, the configuration I provided assumes that the tablet will be physically left of the laptop's screen, but you can switch it if it makes more sense to have it be on the other side, just update these lines as follows:
tablet_offset_x = ${screen_2W}
...
xrandr_output1 = --output HDMI-2 --mode ${screen_1W}x${screen_1H} --pos ${screen_2W}x0 --rotate normal
xrandr_output2 = --output LVDS-1 --mode ${screen_2W}x${screen_2H} --pos 0x0 --rotate normal
Note: the above still assumes screen_2 is the laptop and screen_1 is the tablet. Essentially it just makes xrandr position the tablet's display to the right of the laptop's display, and sets the tablet_offset_x over by the same amount so that the pointer is still relative to where the screen is.
Also, in my case, since I specifically want the tablet to be left of the primary display I also have the following command run when I start X:
xrandr --output HDMI-2 --left-of LVDS-1
Probably not strictly necessary, but in my case it helps prevent some of the other things on my desktop from getting swapped around when I start the driver script, so I figured I'd mention it.
Hello everyone. I'm trying to configure the multi-monitor settings for 2 monitors (notebook:1366x768 and tablet:1920x1080), but I'm having a hard time. I suspect it has something about the screen size calculations and I looked inside the .py code to try to understand what I could be doing wrong, but I didn't get it.
Here is my debug log:
And here is my config.ini: