mviereck/x11docker

Unresponsive Xephyr window after a few minutes of being in the background

smac89 opened this issue ยท 9 comments

I am using x11docker to run the latest xfce desktop built from source. This is supposed to help serve as a development environment for hacking on XFCE. You can see the project here.

I use this command to run the container and it is running rootless with podman:

x11docker --debug --desktop \
    --clipboard \
    --size 1280x720 \
    --cap-default \
    --network=private \
    --init=dockerinit \
    --xephyr \
    --user=RETAIN \
    --name xfce-test \
    --pull=ask \
    --showenv \
    --showid \
    --showinfofile \
    --showpid1 \
    -- \
    ${LOCAL_XFCE:+--volume "$LOCAL_XFCE:/container/xfce/workdir:ro"} \
    -- \
    xfce-test/xfce-test-archlinux:dev

The problem I have is that after starting the container and the desktop is up and running, if I leave the Xephyr window running in the background for more than 5 minutes, the window becomes unresponsive to clicks.

I've done some testing and figured out that the problem is not XFCE itself, but rather the Xephyr window itself is not responding to mouse movements or clicks. I can do a podman exec -it xfce-test xfce4-terminal and sure enough, a terminal window pops open in the window, but I can't interact with it. I am forced to shutdown the entire application, and restart in order to be able to get access for another short period of time.

Is there something I can do to fix this? What am I missing the above options that may be causing this?

if I leave the Xephyr window running in the background for more than 5 minutes, the window becomes unresponsive to clicks.

I've never seen this behaviour.
It is likely not caused by any x11docker options.
podman support is experimental yet. Please add --podman to make sure x11docker sets up right everything.

I guess an issue with the xfce screensaver. Please try to change the screensaver settings.

I have completely disabled screensaver, and disabled powermanager display management, and still the same issue.

I can resize the window, and xfce resizes accordingly, but I still can't click anywhere within the window

Can you reproduce the issue with x11docker/xfce?
I did some test runs with your options and --podman, but cannot reproduce the issue so far.

Edit:
Another check: Please install nxagent and try with --nxagent instead of --xephyr.

Yes for some reason, the image you provided seems to be fine running in the background, but the ones I've tried do not. I addition to the one I was trying, I also tried https://hub.docker.com/r/schuellerf/xfce-test, and experienced the same issue.

Using nxagent produces the desired effect, but introduces weird artifacts into the desktop, like very thick shadows around the window and the panel. Also windows lag a lot when being dragged around.

I think it may have to do with version seeing as the ones I have tried are running the latest xfce from master and the one you have is on 4.12. There might be something I am missing ๐Ÿคท๐Ÿฝโ€โ™‚๏ธ

Alright I got it. It seems the problem really had something to do with xfce's power management, and not xephyr.

After running the command:

xfconf-query -c xfce4-power-manager --create --property /xfce4-power-manager/presentation-mode --type 'bool' --set 'true'

I no longer experienced the freezing. I will make this a permanent part of the image.
Thanks for your help

Alright I got it.

Great!

It seems the problem really had something to do with xfce's power management

Maybe this should be reported to xfce developers?

Using nxagent produces the desired effect, but introduces weird artifacts into the desktop, like very thick shadows around the window and the panel. Also windows lag a lot when being dragged around.

I wonder why the freeze does not appear in nxagent, and why it has these other issues. I don't encounter this with x11docker/xfce.

Unfortunately the images you provide are very big and I can hardly download them with my current internet connection to run some tests myself. I'll build a small xfce image based on debian testing to get a more recent xfce version.

Maybe this should be reported to xfce developers?

Yes! I will also do this. I am currently in the middle of reporting a bug with the terminal running inside the container.

ArcoLinux_2021-04-22_01-57-16

You wouldn't happen to have an idea of why this might be happening inside the container? ๐Ÿ˜„

You wouldn't happen to have an idea of why this might be happening inside the container? ๐Ÿ˜„

Let's look at this in #346

Using nxagent produces the desired effect, but introduces weird artifacts into the desktop, like very thick shadows around the window and the panel. Also windows lag a lot when being dragged around.

I can reproduce this with Xfce 4.16.
I've implemented a new option --composite to fix this.

By default x11docker disables X extension Composite in nxagent because it can cause trouble. But some applications fail without it; so does Xfce 4.16.
If using --nxagent, x11docker now prints a message with a hint to use --composite.
If running --xephyr --composite=no I can reproduce the drawing issues, too.

I wonder if you can reproduce the freeze effect in nxagent now.