Linux Xbmc session has wrong resolution on laptop connected to tv over hdmi
#1
Hi all,

My problem is with the xbmc-session on my laptop, that is connected to a TV, which has a native resolution of 1360x768. I am using that laptop just as a media center and have the display lid closed all the time. I would only like to output to TV.

In the default Ubuntu and Ubuntu 2D sessions I can set up the correct resolution and turn off the laptop display. Even starting xmbc from there results in correct resolution. But when I log out, in the ubuntu login screen the TV switches back to the resolution of the laptops display. After logging into xbmc session it remains the same and does not revert back to desired 1360x768.
The effect of the wrong resolution is, that the visible image of xmbc on TV is cropped down to the size of the laptops display with black borders.

I tried changing the resolution from XBMC>system>settings>system>Video output, but it only changes the size of the visible image in the cropped frame.

Xrandr is obviously no solution here as firing it up in xbmc session returns only:
Code:
user@Satellite-U400:~$ xrandr
Can't open display

And I don't want to use xmbc from standard sessions as those in combination with xbmc are using up plenty of CPU and fans are running high.
http://forum.xbmc.org/showthread.php?tid=128343

How can I force xbmc session to take the resolution of my tv and not my laptop?
Is there any other config for xbmc session itself?
I read somewhere, that the xbmc session is actually a openbox session, is there any relevant config for it?
Would help to copletely disconnect the laptops display from the mobo? (actually don't want to do this)

Many thanks!
Reply
#2
You need to export the display before issuing commands like that over ssh like DISPLAY=:0 xrandr or something.

idk about hdmi setups but look t http://forum.xbmc.org/showthread.php?tid=81791 for guidance Im pretty sure that this has been covered in forums.
Reply
#3
Hi uNiversal,

thanks for pointing me to the thread, it has actually some helpful hints in it, mainly
Code:
export DISPLAY=:0
and xrandr worked fine then and returned

Code:
Screen 0: minimum 320 x 200, current 1360 x 768, maximum 8192 x 8192
LVDS1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 286mm x 179mm
   1280x800       59.9 +
   1024x768       60.0*
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected 1360x768+0+0 (normal left inverted right x axis y axis) 160mm x 90mm
   1360x768       60.0*+
   1920x1080      50.0     60.0     30.0     25.0     24.0     25.0     30.0  
   1280x720       50.0     60.0  
   1024x768       75.1     70.1     60.0  
   832x624        74.6  
   800x600        72.2     75.0     60.3  
   720x576        50.0  
   720x480        59.9  
   640x480        72.8     75.0     66.7     60.0  
   720x400        70.1  
DP1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
TV1 unknown connection (normal left inverted right x axis y axis)
   848x480        59.9 +
   640x480        59.9 +
   1024x768       59.9  
   800x600        59.9

I tried to add
Code:
xrandr --output DVI-D-1 --auto
xrandr --output LVDS-1 --off
into the /etc/rc.local and rebooted, but the only effect is, that the laptop screen gets turned off.

The second recommendation with inserting a line to xorg.conf is not helping either, because I have no xorg.conf in /etc/X11/. I tried to manually recreate it with
Code:
sudo service lightdm stop
X -configure
but I only get a general xorg.conf and a warning message
Code:
.
.
.
Number of created screens does not match number of detected devices.
  Configuration failed.

So that thread did not solve my issue, unfortunately.

I have to appologize a bit for my first explanation, because the screen resolutions on tv AND laptop display are affected by this issue, didn't realize that before, because the lid was closed. So in ubuntu login screen they both have a resolution of 1024x768 and to me it seems, that the system is trying to mirror the screens. At least I can get the same effect when logging into ubuntu session and tick "Mirror Screens" in Display settings. They try to find the highest common resolution, right? After logging into xbmc session I realized that TV has indeed realized, that the input changed to 1360x768, but the screen is cropped and 1/4 of display is black. Laptop display has two black stripes on left and right side and the resolution isn't perfect either (see attached photo).

Image

When I unplug the HDMI cable and reboot my laptop, it gets loaded into xbmc-session perfectly with laptops native resolution 1280x800p.

So... is there a way to tell xbmc session not to mirror the screens? Or even better, to tell Ubuntu to completely forget about the laptops screen?
Reply
#4
If memory serves, xbmc has a seting to choose screens, bu idk if that will solve your issue. As for the rest idk, mainly I just wanted to point you in some direction.
Reply
#5
Thank you one more time uNiversal Smile appreciate it..

Well this setting is present, if I run XMBC in ubuntu session. I can choose between monitors, where to output.
But for some reason, this option is missing in xbmc session. There are only the Fullscreen <> Windowed, resolution, refresh rate and things like video calibration, test patterns and enable LCD/VFD..

Maybe xbmc session is meant to work with only one display. But I didn't find a word about it in docs Sad
Reply
#6
This guy
http://forum.xbmc.org/showthread.php?tid=149112&page=2

has had same problems, but only a workaround was proposed, to run the XBMCbuntu session which is openbox and autostart xbmc from there...
hmm..
That means I misunderstood earlier. The xbmc session, btw ubuntu repos call it "xbmc-standalone" is no openbox itself Smile What is it then?
Whatever it is, it doesn't work well with 2 monitors..
Reply
#7
This is why they are dropping SDL so to make it easier to do all this. Though many done it before as is.

See https://github.com/xbmc/xbmc/pull/3505 its on the way.
Thoug Im prety sure that this can be done abeit with less class than without SDL.
Reply
#8
also using XMBCubuntu for the workaround but why can't I ad xmbc to my startup applications? Syntax error perhaps? If anybody out there doing this, can you please post the shortcut source etc?

Thanks! by the way- first post, hello and thank you for your help.

also using XBMCubuntu for the workaround but why can't I ad xbmc to my startup applications? Syntax error perhaps? If anybody out there doing this, can you please post the shortcut source etc?

Thanks! by the way- first post, hello and thank you for your help.
Reply

Logout Mark Read Team Forum Stats Members Help
Xbmc session has wrong resolution on laptop connected to tv over hdmi0