Fullscreen in Gnome 3 does not work (workaround inside)

Bug #1277972 reported by William Paul Liggett on 2014-02-08
68
This bug affects 14 people
Affects Status Importance Assigned to Milestone
Pipelight
Medium
Unassigned
gnome-shell
Fix Released
Medium
Ubuntu
Undecided
Unassigned

Bug Description

Hi,

First off, thanks for developing Pipelight as it's the best solution I've found to get Netflix to work on Linux. However, I am currently using Fedora 20 (64-bit) and I was able to get Pipelight working correctly under Firefox version 27.0, which means I can play Netflix videos just fine (when not in fullscreen). Once I attempt to make the video to go to fullscreen mode, I see that the video enlarges but then is quickly replaced by a blank black screen within Firefox (see the attachment). Note: I _can_ watch the fullscreen version of the video if I do an ALT+ESC twice (kind of like ALT+TAB but that it more directly switches windows). So, this is more of an annoyance (that makes Linux look less capable than MS Windows) rather than a showstopper.

My hardware on my laptop is detailed in the attached ZIP file.

BEFORE READING FURTHER: I will dive into a similar account with Adobe Flash, which was fixed with a program called "Devil's Pie (devilspie)". If you know another possible way to fix my problem, then you can stop reading here.

Possible Fix via Devil's Pie?:

I had a similar symptom that I experienced with Adobe Flash. On Fedora 20, if you install the latest version of Adobe Flash in Firefox, you can play Flash videos, but once you try to go to fullscreen mode it disappears (but not in the same way that Pipelight does since it's being ran through Wine). The ALT+ESC workaround does not work for the fullscreen Flash problems, but a fix is possible by using a program called "Devil's Pie (devilspie)".

Basically, Devil's Pie was created to perform windowing modifications, which for this fix is to have Devil's Pie to make the Adobe Flash plugin to receive 'focus' (and allow fullscreen to work) once Devil's Pie detected that the Flash video has become a new, real application window all-by-itself (but contained as an instance of Firefox). Here is the Devil's Pie script that I use on my system at this location: ~/.devilspie/flash-fullscreen-firefox.ds

(if
(is (application_name) "plugin-container")
(begin
(focus)
)
)

The script above just simply detects a window titled “plugin-container” (which is the Adobe Flash fullscreen video) and then makes it have 'focus' (stay on top).

Ultimately, what I am getting at is that I think Devil's Pie could fix my fullscreen issue with Pipelight, except that I am a novice to building scripts for Devil's Pie, so I haven't figured out a way to make it detect the new Wine instance of Pipelight. The script above references "plugin-container" because it is the actual window name of the fullscreen Flash video when running "xlsclients -l" (it is a window with the 'Name:' of "plugin-container"). Again, this works great for the Flash problem, but I haven't been able to figure out an appropriate window 'Name:' for the Pipelight fullscreen instance. I don't even know if "xlsclients -l" would even work correctly for Wine-based applications.

I might be thinking too hard of a fix, but I couldn't locate anybody else talking about my same issue with Pipelight + Fedora 20 + Fullscreen. I say Fedora 20 specifically, as I actually have Ubuntu 13.10 as another distro I can boot into on my computer and I do not have this fullscreen weird'ness.

Any suggestions?

Thanks,

--William

Sebastian Lackner (slackner) wrote :

Hi William,

thanks for reporting this problem.

The screenshot looks really weird, but unfortunately I'm not able to reproduce this issue over here. I would like to know some additional information.

First of all: Do you mean the browser fullscreen mode or the netflix player fullscreen mode (for example by pressing key F if i remember correctly?)? Based on your description I would assume that browser fullscreen mode works correctly (but is probably without GPU acceleration).

When you see the black area (as on the screenshot) where the Silverlight application should be, does right click show up the typical context menu? Does resizing the browser window let the content show up again?

It also seems a bit weird to me, that it works for a short moment - is it possible that in this case "Devil's Pie" is responsible for the problems? I think the name "plugin-container" matches nearly all Flash/Silverlight applications, so it maybe assigns the focus to a wrong window?

Moreover I would like to know if it makes a difference when you run your browser with (close all other browser windows first):

GPU acceleration disabled:
PIPELIGHT_GPUACCELERATION=0 firefox

Showing the Silverlight content as a separate window:
PIPELIGHT_EMBED=0 firefox

Sebastian

Wow, that was crazy-quick feedback, Sebastian! But, unfortunately the two proposed fixes did not work (disabling GPU acceleration and moving Silverlight to a new window). Although, I think you may have confused some of what I was trying to say in how Pipelight currently works for me, so I just made a YouTube video that shows you what I am talking about. It is located here:

http://www.youtube.com/watch?v=G3vMK6M9lHQ&feature=youtu.be

Also before I made the video, I fully stopped (kill -9) Devil's Pie to ensure it would have absolutely no conflict with my Pipelight fullscreen tests. Lastly, note that I am using an NVIDIA graphics card (older GeForce 310M), but I am using the Nouveau open source driver and not a proprietary version. Does this matter?

Thanks again,

--William

Michael Müller (mqchael) wrote :

Hi,

this problem is not directly Pipelight related but somehow caused by either a wrong configuration or a bug in your gnome3 version. I would suggest you to fill a bug report at https://admin.fedoraproject.org/pkgdb/acls/bugs/gnome-desktop3 as we can not reproduce this problem with any desktop environments on Ubuntu or Debian.

Michael

Thanks for the comment, Michael. I feel like the GNOME folks won't really look into this since Pipelight is not a stock GNOME app, so I probably won't report the bug there. I'll try changing my video driver to a proprietary NVIDIA version to see if that makes any difference. If that doesn't work, then oh well. Like I said, it is not a show-stopper as I can view fullscreen with the ALT+ESC (x2) method.

The real fix is for Netflix to stop being nerds and to discard their crappy MS Silverlight output for HTML5 instead. I hear they are working on this, but we'll see if this ever really happens (which will be interesting with their DRM requirements). Again though, Pipelight rocks! Overall, I am quite happy :-).

--William

Sebastian Lackner (slackner) wrote :

Hi William,

thanks for the video to make it clear what you mean. The weird part is that I cannot really reproduce it over here (but I'm not using Gnome3).

Do you also have some other desktop environments installed, to check if its really Gnome3 specific?

Moreover: Are you experienced with compiling software? I don't think that its Pipelights fault, but I have some ideas for workarounds - we already intercept the creation of a fullscreen window, so it might be possible to add something like "stay in foreground", which maybe could help a bit. Unfortunately I don't have any machine to test or reproduce it, so ... :/

Sebastian

kpmcdole (kpmcdole) wrote :

I can confirm the same exact problem with Arch with Gnome Shell 3.10 and Chrome 32, 33, 34. Window maximizes then loses focus. I can alt-tab into it.

I can also confirm that is happening to me with pipelight-flash (I haven't try with silverlight). I just want to add that for a temporary fix I tried using devilspie as William mentioned with:
(is (application_name) "plugin-container") - as mentioned on archwiki - and I couldn't mange to work it either because it is for the linux flash version of firefox. Furthermore i try changing "plugin-container" with:
"pluginloader.exe"
"Wine Windows Program Loader"
"Adobe Flash Player"
and (application_name) with:
(window_title)
and (is with:
(matches

but nothing works. Tried different combinations of the above and it fails on every combination. So either devilspie would not work as a temporary fix on this occasion or most probably I am doing something wrong on devilspie as I have no idea on scripting. Either way I wanted to mention this if anyone found a solution with devilspie and can shed a light or for any temp or permanent fix.

Fedora 20, Gnome 3.10, Firefox 27.0 , wine 1.7.11, pipelight 0.2.4.2, adobe flash 12.0.0.44

kpmcdole (kpmcdole) wrote :

It would appear this is a WINE/Gnome bug. When attempting to play a fullscreen game through WINE, the window automatically loses focus and I must Alt-Tab into it to play it.

summary: - Fullscreen in Fedora 20 Has Problems
+ Fullscreen in Gnome 3 does not work (workaround inside)
Ruben Grimm (pmk1c) wrote :

So here's a workaround script for devilspie, that should work for Flash and Silverlight through pipelight:

(if
    (and
        (is (window_class) "Wine")
        (or
            (is (application_name) "Adobe Flash Player")
            (is (application_name) "Microsoft Silverlight")
        )
    )
    (begin
        (focus)
    )
)

It works for me. Thanks for pointing me at devilspie.

Changed in gnome-shell:
importance: Unknown → Medium
status: Unknown → New
Changed in pipelight:
status: New → Confirmed
importance: Undecided → Medium
Charlot (j-email) wrote :
Download full text (3.8 KiB)

Thanks Ruben et al. for the suggestion, but it does not work for me. The Firefox window seems to loose focus (light grey color buttons), but the fullscreen window do not come in front. I am using Fedora 20.

I also tried
(if
         (is (window_class) "Wine")
    (begin
        (focus)
    )
)

It used to work with application name: plugin-container, but not since the last update (June 3).

The alt-esc method works but is not user friendly for the wife!

Here is the output of my xlsclients -l in terminal while a window is in fullscreen. It does not seem to show anything relevant.

Window 0x240009e:
  Machine: localhost.localdomain
  Name: skype-bin
  Command: skype-bin
  Instance/Class: skype-bin/Skype-bin
Window 0x600001:
  Machine: localhost.localdomain
  Name: gnome-settings-daemon
  Icon Name: gnome-settings-daemon
  Command: gnome-settings-daemon
  Instance/Class: gnome-settings-daemon/Gnome-settings-daemon
Window 0xe00001:
  Machine: localhost.localdomain
  Name: gnome-shell
  Icon Name: gnome-shell
  Command: gnome-shell
  Instance/Class: gnome-shell/Gnome-shell
Window 0x1200001:
  Machine: localhost.localdomain
  Name: ibus-x11
  Icon Name: ibus-x11
  Command: ibus-x11
  Instance/Class: ibus-x11/Ibus-x11
Window 0x1600001:
  Machine: localhost.localdomain
  Name: abrt
  Icon Name: abrt
  Command: abrt
  Instance/Class: abrt/Abrt
Window 0x1c00001:
  Machine: localhost.localdomain
  Name: devilspie
  Icon Name: devilspie
  Command: devilspie
  Instance/Class: devilspie/
Window 0x2000001:
  Machine: localhost.localdomain
  Name: evolution-alarm-notify
  Icon Name: evolution-alarm-notify
  Command: evolution-alarm-notify
  Instance/Class: evolution-alarm-notify/Evolution-alarm-notify
Window 0x2600001:
  Machine: localhost.localdomain
  Name: skype-bin
  Icon Name: skype-bin
  Command: skype-bin
  Instance/Class: skype-bin/Skype-bin
Window 0x2400002:
  Machine: localhost.localdomain
  Name: skype-bin
  Command: skype-bin
  Instance/Class: skype-bin/Skype-bin
Window 0x1400001:
  Machine: localhost.localdomain
  Name: Firefox
  Icon Name: firefox
  Command: firefox
  Instance/Class: firefox/Firefox
Window 0x2a00001:
  Machine: localhost.localdomain
  Name: plugin-container
  Icon Name: plugin-container
  Command: plugin-container
  Instance/Class: plugin-container/Plugin-container
Window 0x3200001:
  Machine: localhost.localdomain
  Name: M�t�o
  Icon Name: M�t�o
  Command: org.gnome.Weather.Application
  Instance/Class: org.gnome.Weather.Application/Org.gnome.Weather.Application
Window 0x3400001:
  Machine: localhost.localdomain
  Name: org.gnome.ControlCenter.SearchProvider
  Icon Name: org.gnome.ControlCenter.SearchProvider
  Command: org.gnome.ControlCenter.SearchProvider
  Instance/Class: org.gnome.ControlCenter.SearchProvider/Org.gnome.ControlCenter.SearchProvider
Window 0x3600001:
  Machine: localhost.localdomain
  Name: seahorse
  Icon Name: seahorse
  Command: seahorse
  Instance/Class: seahorse/Seahorse
Window 0x3800001:
  Machine: localhost.localdomain
  Name: nautilus
  Icon Name: nautilus
  Command: nautilus
  Instance/Class: nautilus/Nautilus
Window 0x3a...

Read more...

Charlot (j-email) wrote :

I forgot to mention, I am using the nvidia proprietary drivers, if that changes anything...

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu:
status: New → Confirmed
Celian (r-launchpad-celian-dk) wrote :

Same problem here. Using Gnome Ubuntu 14.04, Intel 4400 Graphics.

Celian (r-launchpad-celian-dk) wrote :

Also Alt-Tab works to regain focus on Wine like described before, but I don't have experience with devilspie so I can't confirm that fix.

Michael Kasch (michael-kasch) wrote :

I can confirm this bug in Debian testing.

As this bug is probbly mutter related (as stated here: https://bugzilla.gnome.org/show_bug.cgi?id=722743)
my version of mutter is: 3.12.2-2
pipelight version 0.2.7.1~jessie

Rubens devilspie workaroud works for me

I tried Rubens devilspie workaround but get this error when launching the fullscreen window of netflix:

(devilspie:9838): Wnck-WARNING **: Received a timestamp of 0; window activation may not function properly.

Anyone know why I get this? Somewhere I read that this was related to metacity... I'm just using stock GNOME-Shell 3.10 on Ubuntu GNOME 14.04

Changed in gnome-shell:
status: New → Fix Released
Tomot (tomot) wrote :

I can confirm that this issue is fixed in Fedora 21 / GnomeShell 3.14

Jason Gambrel (jaygambrel) wrote :

I can confirm this same bug exists in elementary OS Freya. Alt-tab will bring up the window. I installed Devil's Pie:
sudo apt-get install devilspie

and created a blank file in ~/.devilspie called flash-fullscreen-firefox.ds

I pasted the following script into it:

(if
    (or
        (is (application_name) "Adobe Flash Player")
        (is (application_name) "Microsoft Silverlight")
    )
    (begin
        (focus)
    )
)

and then went to the terminal and started Devil's Pie by typing: devilspie

This seemed to solve the problem for me. I am just going to set Devil's Pie to autostart now.

If it doesn't work for you try changing application_name to window_title and see if it works.

- Jay

Jason Gambrel (jaygambrel) wrote :

Addendum

- My above post seems to work intermittently. Sometimes it doesn't. Another workaround for flash is to try using the x64-flash plugin instead. This seems to have taken care of the problem with flash for me. As for Silverlight, I tried installing Devil's Pie 2:

sudo apt-get install devilspie2

Then ran it, to allow it to create ~/.config/devilspie2

I then created a file in that folder called Firefox-Fix.lua and pasted in the following script:

if (get_application_name()=="Microsoft Silverlight") then
 unminimize();
end

I then ran devilspie2 again and it seems to work a bit more reliably. It fails about 1/8 attempts. Unfortunately, I don't know how to detect if a window is still minimized or has lost focus (ie. the unminimize attempt has failed) in Lua. If anyone else does, feel free to rewrite the script.

I then added devilspie2 to my autostart. It still isn't perfect, but better than before.

- Jay

Jason Gambrel (jaygambrel) wrote :

Okay. One final Devil's Pie 2 script. This one tries to unminimize the window, then waits a second and tries again. I have found that if the first one misses the second attempt consistently works a second later.

function sleep(n)
    os.execute("sleep " .. tonumber(n))
end

if (get_application_name()=="Microsoft Silverlight") then
    unminimize();
    sleep(1);
    unminimize();
end

See the above post for installing Devil's Pie 2 and creating an Lua file.

I hope this helps someone as I have pulled most of my hair out trying to get this to work consistently.

- Jay

Peter Tobler (torpet) wrote :

Jason, thanks a lot, your devilspie2 script works. I was playing around with Freya today couldn't get fullscreen to work. The minimized fullscreen window also made my computer extremely slow (I am forcing GPU acceleration in Pipelight).

The devilspie1 script you posted above (I guess you just copied this snippet from the Arch Wiki) doesn't work at all for me.

Your devilspie2 script is not correct though. I am not an expert in Lua, but sleep does not exist. For more info see here: http://stackoverflow.com/a/27693302

I guess just using the unminimize()-function consecutively twice is good enough.

Jason Gambrel (jaygambrel) wrote :

Hi Peter,

I'm glad to hear it was of some help to someone. I really don't know Lua. I just threw that script together from what I could find in the devilspie2 manual and some online resources. The sleep idea I got from: http://lua-users.org/wiki/SleepFunction. It notes that Windows doesn't have a sleep function but I believe Linux does. I was hoping the function would call the Linux sleep command via os.execute. I really am not sure if it is actually doing that, but in the end the script seemed to work for me so I left it alone.

I would be interested to hear if just calling the function twice works just as well.

Jay

Peter Tobler (torpet) wrote :

Hi Jay,

turns out it doesn't work. I was just lucky I got it too work when I tried yesterday, but devilspie1/2 added nothing to that success. I will do some further testing.

Peter

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.