Linux Video off center on launch
#1
Exclamation 
Hi,

I'm running Ubuntu 12.04 plugged into a Philips 32" LED LCD via HDMI with a 1360x768 pixel resolution (had to find the modeline manually... ugh.) The HTPC is powered by a intel G530 and a Gigabyte H61 motherboard.

The Ubuntu desktop is working great, no problems at all with the video output. And audio over HDMI worked right out of the box!

However...
When I launch XBMC though, the output is the correct resolution but it's off-centered pi about 300px to the right and 150px to the bottom... So I can only see the top left part of the XBMC GUI, with black bars to the top and left of the image.

If I go into setting and set the resolution to something else (say 1024x768, can't actually see what I'm setting it to...), it'll switch resolutions and appear centered. Then I bring it back to 1360x768 and it's centered and all is well.

How can I fix this weird problem?

IMAGE HERE !
Reply
#2
Does your motherboard have a secondary display output, such as DVI or VGA? If so, try disabling that display in xorg.conf or via the Ubuntu GUI.
Reply
#3
Yes, the motherboard has a VGA and a DVI output. Nothing is plugged in to them.
And as far as I can tell, nothing is enabled other than the HDMI output...

The Ubuntu GUI (in System Settings / Displays) only shows the HDMI output.
I do not have an xorg.conf file or anything under xorg.conf.d (the folder doesn't even exist).

Here's my xrandr output :
Code:
Screen 0: minimum 320 x 200, current 1360 x 768, maximum 8192 x 8192
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
HDMI3 connected 1360x768+0+0 (normal left inverted right x axis y axis) 16mm x 9mm
   1920x1080      60.0 +
   1024x768       60.0  
   800x600        60.3  
   720x480        59.9  
   640x480        60.0  
   1360x768       60.0*
DP2 disconnected (normal left inverted right x axis y axis)
DP3 disconnected (normal left inverted right x axis y axis)
Reply
#4
What happens if you set the mode using xrandr before you start XBMC?
Reply
#5
Same thing.

I just tried setting the display to every single output mode using
Code:
xrandr --output HDMI3 --mode "1024x768"

And each resolution work perfectly fine, except 1360x768...

Here's what I setup to get the correct resolution on boot :
Code:
/usr/share/customVideoSetupHDMI.sh :
#!/bin/sh
xrandr --newmode "1360x768" 85.500 1360 1424 1536 1792 768 771 777 795 +Hsync +Vsync
xrandr --addmode HDMI3 "1360x768"
xrandr --output DP3 --off --output DP2 --off --output DP1 --off --output HDMI3 --mode "1360x768" --pos 0x0 --rotate normal --output HDMI2 --off --output HDMI1 --off --output VGA1 --off

/etc/lightdm/lightdm.conf :
[SeatDefaults]
autologin-guest=false
autologin-user=kevin
autologin-user-timeout=0
autologin-session=lightdm-autologin
user-session=ubuntu
greeter-session=unity-greeter
# To make video work properly with Philips HDTV in 720p
display-setup-script=/usr/share/customVideoSetupHDMI.sh
session-setup-script=/usr/share/customVideoSetupHDMI.sh
Reply
#6
can you post a full xbmc debug log? either xbmc or SDL which opens the window does not see the added mode. can you also post the output of xbmc-xrandr?
Reply
#7
(2012-06-09, 18:58)FernetMenta Wrote: can you post a full xbmc debug log? either xbmc or SDL which opens the window does not see the added mode. can you also post the output of xbmc-xrandr?

Where do I get XBMC's debug log?

When / where / how do I run xbmc-xrandr?
Reply
#8
Turn on debugging in system settings: http://wiki.xbmc.org/index.php?title=Log_file
The log file is in ~/.xbmc/temp/xbmc.log

xbmc-xrandr is in the same directory as xbmc.bin. Just run from a terminal.
Reply
#9
Here's the log file : http://paste.ubuntu.com/1040134/

I'm pretty sure the relevant bits are :

Code:
22:38:49 T:140443400267648   ERROR: Unable to load libcrystalhd.so.3, reason: libcrystalhd.so.3: cannot open shared object file: No such file or directory

Code:
22:39:50 T:140443400267648   ERROR: Window Translator: Can't find window tvsettings
22:39:57 T:140443400267648   ERROR: GLX: Same window as before, refreshing context
22:39:57 T:140443400267648   ERROR: Control 1 in window 10099 has been asked to focus, but it can't
22:40:08 T:140443400267648   ERROR: GLX: Same window as before, refreshing context
22:40:08 T:140443400267648   ERROR: Control 1 in window 10099 has been asked to focus, but it can't


I'm not able to run xbmc-xrandr... Either it's not there or it's just not finding it...
In what folder should it be?
Reply
#10
I need a debug log. Please go to system settings and turn on debugging, then start XBMC again.
Reply
#11
Ok, turned on debugging (sorry 'bout that!)

Here's what I did :
  1. Launch XBMC (it launches in 1080p)
  2. Wait for scripts to scrape data / download artwork / etc...
  3. Go to settings and set it to 1368x768
  4. Screen goes off center, wait for it to revert
  5. Go back up menus and exit

Here's the log file : http://paste.ubuntu.com/1041747/

[Edit: Holy crap there's a LOT of stuff from the scrapers in there! Sorry about that...]

Oh, and I found xbmc-xrandr's location in the log file (it's in /usr/lib/xbmc/xbmc-xrandr - but you knew that...), here's the output :
Code:
<screen id="0" minimum_w="320" minimum_h="200" current_w="1360" current_h="768" maximum_w="8192" maximum_h="8192">
  <output name="VGA1" connected="false">
  </output>
  <output name="HDMI1" connected="false">
  </output>
  <output name="DP1" connected="false">
  </output>
  <output name="HDMI2" connected="false">
  </output>
  <output name="HDMI3" connected="true" w="1360" h="768" x="0" y="0" wmm="16" hmm="9">
    <mode id="0x48" name="1920x1080" w="1920" h="1080" hz="60.00000" current="false" preferred="true"/>
    <mode id="0x49" name="1024x768" w="1024" h="768" hz="60.00384" current="false" preferred="false"/>
    <mode id="0x4a" name="800x600" w="800" h="600" hz="60.31654" current="false" preferred="false"/>
    <mode id="0x4b" name="720x480" w="720" h="480" hz="59.94006" current="false" preferred="false"/>
    <mode id="0x4c" name="640x480" w="640" h="480" hz="60.00000" current="false" preferred="false"/>
    <mode id="0xb4" name="1360x768" w="1360" h="768" hz="60.01516" current="true" preferred="false"/>
    <mode id="0xb5" name="1368x768" w="1368" h="768" hz="60.01516" current="false" preferred="false"/>
  </output>
  <output name="DP2" connected="false">
  </output>
  <output name="DP3" connected="false">
  </output>
</screen>
Reply
#12
Those are the kind of problems why I have ditched SDL and rewritten the interface to X11. With SDL it won't ever work completely correct, we just can try to find some kind of work around.
The entries in the log are slightly different to what you said in your first post. The log:

- you start XBMC when your desktop resolution is set to 1360x768
- then XBMC sets resolution to user set look-and-feel resolution, in your case 1920x1080. (what happens if you set this to 1360x768?)

A big issue is that we currently do not wait until xrandr operation is completed. Would XBMC start ok if you set resolution in gui settings to the same resolution you have set when starting xbmc?
Reply
#13
(2012-06-15, 09:04)FernetMenta Wrote: The entries in the log are slightly different to what you said in your first post. The log:

- you start XBMC when your desktop resolution is set to 1360x768
- then XBMC sets resolution to user set look-and-feel resolution, in your case 1920x1080. (what happens if you set this to 1360x768?)

A big issue is that we currently do not wait until xrandr operation is completed. Would XBMC start ok if you set resolution in gui settings to the same resolution you have set when starting xbmc?

I currently use XBMC in 1920x1080 as that's the only usable resolution for now, which is why it loads into that resolution.

I tried setting it to 1360x768 (it goes off center), accepting the changes and exiting XBMC. This way XBMC loads into the same resolution as the desktop.

It still loads off center.

I'm at a loss here... I have no idea what to try Sad
Reply
#14
This is just guessing but have you tried adding your modeline to xorg.conf instead of adding it dynamically?
Reply
#15
(2012-06-19, 21:04)FernetMenta Wrote: This is just guessing but have you tried adding your modeline to xorg.conf instead of adding it dynamically?

I don't have a xorg.conf...

Is there a way to add stuff dynamically and then generate an xorg.conf file automatically to make the changes permanent?
Reply

Logout Mark Read Team Forum Stats Members Help
Video off center on launch0