FernetMenta / xbmc

Fork of XBMC Main PVR Development Repository.
http://xbmc.org
Other
55 stars 20 forks source link

XBMC change display output if out of focus when playback of video finish and req refresh rate change #200

Open KRA77 opened 10 years ago

KRA77 commented 10 years ago

I'm sorry if I'm doing this wrong, I was pointed in this direction from here: http://forum.xbmc.org/showthread.php?tid=181703&pid=1586282#pid1586282

Problem is xbmc is moved from hdmi2 to main display (hdmi1) when a movie is finished playback if xbmc is not in focus and a refreshrate change is invoked.

My setup HDMI1 on 1080p monitor @ 60hz default, running xubuntu desktop HDMI2 on 1080p pj @ 50hz default running xbmc fullscreen

if I playback ex a 24p video it will change refreshrate to 24 and play video, when done it will change back to 50hz. If at this point I have moved the focus away from HDMI2 xbmc will move to HDMI1 where my current focus is, in ex a web browser.

I have a debug log.

This debug log start xbmc on hdmi2. Start video playback of a video that does NOT invoke refreshrate change, skip forward, move away focus of mouse to hdmi1, let video finish and everything is normal. Then I play a video that does invoke refresh rate change, skip to end, move mouse focus to hdmi1, let it finish, xbmc gui is moved to hdmi1 as hdmi2 change refreshrate.

debug.log: http://paste.ubuntu.com/6668493/

FernetMenta commented 10 years ago

can you post output of xbmc-xrandr during playback and right after playback has stopped. (for the case you keep XBMC focused and the other case)

KRA77 commented 10 years ago

OK, I've done 4 logs

gui-before-playing.log - this is output after starting xbmc on hdmi2 and show gui/menu 50hz playing.log - this is output when playing a 24p video (24hz) on hdmi2 gui-after-playing.log - this is output from gui/menu on hdmi2 after the video finished playback and change back to 50hz gui-after-playing-moved.log this is output from gui/menu after it moved to hdmi1 and hdmi2 is changing refresh back to 50hz

hdmi1 is at all times 60hz

2014/1/2 Rainer Hochecker notifications@github.com

can you post output of xbmc-xrandr during playback and right after playback has stopped.

— Reply to this email directly or view it on GitHubhttps://github.com/FernetMenta/xbmc/issues/200#issuecomment-31444077 .

Sendt fra min Commodore 128

KRA77 commented 10 years ago

ok, it seems the logs didn't make it to github.

http://paste.ubuntu.com/6679958/

http://paste.ubuntu.com/6679972/

http://paste.ubuntu.com/6679974/

http://paste.ubuntu.com/6679984/

hdmi1 is at all times 60hz

FernetMenta commented 10 years ago

Can you compile yourself?

KRA77 commented 10 years ago

Maybe, I know how to clone from git and compile. But never done big projects like xbmc, only small apps and pvr plug-ins etc.

  1. jan. 2014 19:20 skrev "Rainer Hochecker" notifications@github.com følgende:

Can you compile yourself?

— Reply to this email directly or view it on GitHubhttps://github.com/FernetMenta/xbmc/issues/200#issuecomment-31542109 .

wsnipex commented 10 years ago

since you're probably on my fernetmenta-master ppa, this should do for depends: sudo apt-get build-dep xbmc

then clone the repo: git clone git@github.com:FernetMenta/xbmc.git

compile: ./bootstrap ./configure --prefix=/tmp/xbmc make -j4 #(assuming you have at least a dual core cpu)

FernetMenta commented 10 years ago

currently I have no mulit-screen setup for testing so it's a little bit of guessing. https://github.com/FernetMenta/xbmc/commit/bca1dab4489a10eeb9ab682ff2bb21f8a90bd6d1 might worth a try

KRA77 commented 10 years ago

I tried to clone using your command but it failed:

git clone git@github.com:FernetMenta/xbmc.git Cloning into 'xbmc'... Permission denied (publickey). fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

So I used git clone https://github.com/FernetMenta/xbmc/

Then I compared with the patch, and it seems the changes was already there, plus some others. So I will try to compile this.

currently compiling with make -j8 (it will be installed in /tmp/xbmc ??) I guess this will be several hours.

KRA77 commented 10 years ago

ok, compiling was done in minutes rather than hours as I expected.

Now bad news is there is no change in behavior, but question is if it's because I did something wrong or the changes didn't work.

like I said I only did "git clone https://github.com/FernetMenta/xbmc/ " and didn't do the patch changes since they seemed to already be there.

I Replaced it with this as I understand is already patched file: https://github.com/FernetMenta/xbmc/blob/bca1dab4489a10eeb9ab682ff2bb21f8a90bd6d1/xbmc/windowing/X11/WinSystemX11.cpp

Still didn't work.

FernetMenta commented 10 years ago

are you sure you are running the just compiled version?

KRA77 commented 10 years ago

Yes, I checked system settings and it says compiled today, the installed xbmc is dated 26 dec.

PS! updated post above, downloading the complete file made no change either.

XBMC 13-0-Aplha12 Git:20140103-bca1dab (Compiled: Jan 3 2014)

KRA77 commented 10 years ago

ok, I just made a discovery

xubuntu (xfwm4) - has issue ubuntu (unity/compiz?) - does not have issue

So I tried to start compiz in xubuntu compiz --replace it failed, I'm guessing because composite is turned off in xubuntu and I was left without a windows manager. At this point I started xbmc without a window manager and I did not have the issue.

I tried compton window manager and I still have the issue.

So it seems the window manager plays a part if this happens or not.

I also tried running xbmc in window mode, but at this point refreshrate change was not invoked.

KRA77 commented 10 years ago

ok, so I've finally found the solution, or rather workaround for this issue. This confirms it's a window manager issue, I experience this issue with xubuntu and lubuntu. I have now found a solution with lubuntu (openbox)

in ".config/openbox/lubuntu-rc.xml" I added the following line: < application name="xbmc.bin" >< position force="yes" >< x>1920< /x >< y >0< /y >< monitor>2< /monitor >< /position >< /application >

This makes sure xbmc allways opens and stays on HDMI2.

FernetMenta commented 10 years ago

thanks for the info. let's keep the issue open for future findings