Help setting up dual monitors with xrandr
#1
Firstly, hello to the community, this is my first post but I've been known to XBMC for a while. Thanks for taking your time to read and help.Nod

What I've got and my objective with it:
I have a Dell laptop, with icore 3 (or something), Debian Jessie and XBMC installed( from a outer repository). The laptop specs are enough for xbmc.
The laptop has it own display with 1366x768 native res, and finally the Tv that I want to use, an old Plasma 42 inch Tv, with 1280x1024 and 1024x768 res on the VGA input.
This Tv is of course wide screen, but its available res on VGA are distorted. This is of course a very old Tv, it does have what may be the first HDMI input ever used, but i don't have a cable so I can't test if it does work, and with different resolutions.
So my objective is to use the Tv as external monitor, close the laptop lid, and work it seamlessly with my android remote.
This is achievable but not constant.

Here is what I've achieved and experienced with so far:
Using xrandr to use only the VGA output and not the laptop display( LVDS), there is a --scale option with xrandr that corrects pixel aspect ratio from 4:3 to 16:9 that is the Tv.
This used to work greatly in another Netbook I had, VLC worked with the correction, but it doesn't work properly if both display are on.
For this I've needed a script to make the correct commands attached to a media key, so this method doesn't switch automatically if plug/unplug the VGA cable.
With the newer laptop however, it seems to detect automatically the new output and changes to something appropriate, sometimes it seems random, sometimes it remembers my last config.

Xrandr's --scale option doesn't work with XBMC, but within it, the video calibration feature allows to correct it, but with little room for error. This will allow videos to play nicely and correctly. This however is not permanent, if I close the lid the screen will blank( probably xscreensaver thing), it will return shortly if there's activity. All okay there, the problem comes when opening the laptop lid, it seems to trigger some auto switching changing xrandr settings reverting and consequently breaking the screen. Do not forget that I have to set it manually every time VGA is connected.

Alternatively, I've tried a dual screen setting with mirrored 1024x768 and side-by-side, these actually were chosen for me, by the auto-switching external monitor media button thingy( what?).
The mirrored options works alright too, video calibrate allows me to correct the aspect ratio, but the LVDS is now wrong ratio. Closing and opening the lid also brakes this config I don't get why.
Side-by-side has the problem with opening the laptop lid, its seemed a good alternative to have XBMC solo on the Tv screen and something else in the laptop screen, but additionally, I can't control where xbmc will show up. "Settings -> video output" will only give me fullscreen#1. I've searched everywhere and couldn't found a answer to this. And to get even better, when I try to change XBMC res options, it will change both of the display scrambling things up.

Argh, sorry for the long post, lemme try to sum up:
Any suggestion on how to get around the laptop's lid opening and auto-switching my monitor config?
How can I force xbmc on one monitor only?
Fiddling with xrandr to get around theses issues? Trying a 1280x720 res on the screen, maybe?
Reply
#2
I don't have the answer but i had similar problems and can let you know how I worked around them.

I wanted to turn my second display on and off i started with xrandr but this gave me overscan issues and i just could not get around them then i found i could do the same with the nvidia-settings from the cli.

Code:
nvidia-settings --assign CurrentMetaMode="DFP-0:nvidia-auto-select+0+0,DFP-2:nvidia-auto-select+1920+0{ViewPortIn=1920x1080,ViewPortOut=1820x1022+50+29}"

This will turn on my second display with the resolution i needed (I have only used nvidia so am not sure if you will have a tool available on any other gpu)

I have a python script which i run from the remote which will turn the screen on then load xbmc or turn the screen off and kill xbmc.

To get xbmc to run on the second screen i have it set to run in windowed mode, then use the Special Application Settings available in KDE which let KDE turn it to full screen which removes the title bar etc, I also set the position to 1920,0 my monitor is 1920,1080 so this sets it to start on the TV (if i load xbmc without running the command to turn on the TV then it loads on my monitor but all the other settings are remembered).

The only other thing i can suggest looking into is acpi, could you have your xrandr script run on open/close of the lid (maybe with a small sleep to fix it after its messed up)?

Hope something in this helps or gives you some more ideas.
Reply
#3
Thanks for the reply.
Actually I've got around my issue, without any major problems.
Now I know xrandr will remember my output configuration when plug/unplug the cable, so I have to plug the cable before opening xbmc, which will also remember the output and have a specific video calibration to correct the aspect( maybe it saves only resolution though).
So I'll have to plug before then open xbmc windowed mode( otherwise gnome will crash), I cannont change the resolution or it will bork the configuration( turn mirrored).

But I have a couple of question for you...
Did add those commands assign to some controller input, or does it use a plug/lid action script. I was wondering about those and if can edit or disable them. I did find the lid acpi script, but i don't think its worth the trouble anymore.

Secondly, this laptop has a intel integrated card, but I have another PC with a nvidia card and I'm having trouble with it, it does not show any res besides my monitor native resolution. Have you come around this?
Reply

Logout Mark Read Team Forum Stats Members Help
Help setting up dual monitors with xrandr0