Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExtendedDesktopSize support? #91

Open
coredump4 opened this issue Mar 11, 2019 · 18 comments

Comments

@coredump4
Copy link

commented Mar 11, 2019

Issuehunt badges

Hi,
When using a noVNC v1.0.0 client with "remote resize" enabled, the user's desktop can be resized to fit the browser window if the server supports ExtendedDesktopSize encoding. For me, the resizing does not work for x11vnc v0.9.16, but does if I switch to Xvnc.

Does x11vnc support ExtendedDesktopSize? If it does, I could use some help figuring out why the client & server are not in agreement on their protocol extensions.
Also, see this issue.

Thanks.


IssueHunt Summary

Backers (Total: $50.00)

Become a backer now!

Or submit a pull request to get the deposits!

Tips


IssueHunt has been backed by the following sponsors. Become a sponsor

@clementnero

This comment has been minimized.

Copy link

commented Jun 28, 2019

Hello,
Does someone have any update on this topic ?
Thx

@coredump4

This comment has been minimized.

Copy link
Author

commented Jul 1, 2019

I've had to move on to other tasks, but would still like to get away from Xvnc someday.
I've searched through the x11vnc code a bit and can't find any evidence it supports ExtendedDesktopSize. None of the commits since 0.9.16 are in this area, so it looks like something (hopefully) on the backlog.

@bk138 bk138 added the enhancement label Jul 3, 2019

@coredump4

This comment has been minimized.

Copy link
Author

commented Jul 3, 2019

Thank you! I'm eager to test this out.

@issuehunt-app

This comment has been minimized.

Copy link

commented Aug 1, 2019

@maxnet has funded $50.00 to this issue.


@maxnet

This comment has been minimized.

Copy link

commented Aug 1, 2019

Added some pizza money for the reviewer ;-)

@coredump4

This comment has been minimized.

Copy link
Author

commented Aug 1, 2019

I built x11vnc from your branch along with LibVNC/libvncserver, which already has your patch merged. And it almost works but not quite.
When my noVNC client attaches I see:
01/08/2019 21:02:53 Enabling NewFBSize protocol extension for client 127.0.0.1
01/08/2019 21:02:53 Enabling ExtDesktopSize protocol extension for client 127.0.0.1
...which looks good. But when dragging the corner of the browser window around randomly, it doesn't resize, and I see:
01/08/2019 21:03:20 Client requested resolution change to (1782x905)
01/08/2019 21:03:20 Sending rfbEncodingExtDesktopSize for size (2048x1536) resize prohibited
01/08/2019 21:03:35 Client requested resolution change to (1862x769)
01/08/2019 21:03:35 Sending rfbEncodingExtDesktopSize for size (2048x1536) resize prohibited
01/08/2019 21:04:15 Client requested resolution change to (1862x927)
01/08/2019 21:04:15 Sending rfbEncodingExtDesktopSize for size (2048x1536) resize prohibited
Why would resize be prohibited? I confirmed noVNC is in remote resizing mode.

@maxnet

This comment has been minimized.

Copy link

commented Aug 1, 2019

Are that all messages you see in the log?

In addition to the log lines you see that are generated by libvncserver, x11vnc itself should print some additional lines as well (starting with "Received SetDesktopSize message from client requesting (%dx%d) framebuffer with screen configuration:")

If you do not see that, it is likely that x11vnc has not been compiled correctly with support for setdesktopsize hook.
When you did ./configure it did print out it detected xrandr and "_rfbScreenInfo.setDesktopSizeHook" ?

And when running x11vnc it does not spit out any error messages mentioning xrandr? (e.g. "Need at least RANDR 1.3 to support scaling, only %d.%d available")

@coredump4

This comment has been minimized.

Copy link
Author

commented Aug 1, 2019

Based on config.log, it seemed to find RANDR and "_rfbScreenInfo.setDesktopSizeHook":
ac_cv_lib_Xrandr_XRRSelectInput=yes
ac_cv_member_struct__rfbScreenInfo_setDesktopSizeHook=yes
However there is no mention of RANDR in the x11vnc log file at runtime... I did find that odd.

@maxnet

This comment has been minimized.

Copy link

commented Aug 1, 2019

You did start x11vnc with -setdesktopsize ?

@coredump4

This comment has been minimized.

Copy link
Author

commented Aug 1, 2019

With -setdesktopsize, I'm closer still, but I get:
resize failed: invalid screen layout
Is it able to resize to arbitrary sizes? FWIW I'm using the X "dummy" driver.

@maxnet

This comment has been minimized.

Copy link

commented Aug 1, 2019

Size must be in the ranges supported by your graphic driver.
What does running the "xrandr" command under X report?
E.g.:

$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384

Have not tested any dummy drivers.
In fact the embedded device it was written for always reports having a screen even if nothing is connected. So have not tested headless that extensively either.

@maxnet

This comment has been minimized.

Copy link

commented Aug 1, 2019

Suspecting that the dummy X driver may not be supporting randr at all.

Currently it bails out directly in the code then:

   if (!xrandr_present)
        return FALSE;

Guess I should add a line that logs an error there.

Perhaps the new Virtual KMS driver is a better option if you have a system without any GPU.
https://www.phoronix.com/scan.php?page=news_item&px=Virtual-KMS-VKMS-Linux-4.19
(Have not tested that either though)

@coredump4

This comment has been minimized.

Copy link
Author

commented Aug 2, 2019

Dummy is supposed to support RANDR and should be a reasonable choice for a headless system.
However I had Xinerama enabled in my xorg.conf, which conflicts with RANDR, so I subsequently disabled Xinerama.
However, x11vnc now starts up but quickly exits. It doesn't report much in the log when this happens, but you can see where it received a SetDesktopSize message from the client, but then reports "caught X11 error" and dies. The line below "caught X11 error" is "deleted 64 tile_row polling images." but it's unclear to me if that's actually related. I'll take a look at the Virtual KMS driver as well as try to test with a real GPU.

@maxnet

This comment has been minimized.

Copy link

commented Aug 2, 2019

Recall you need to start with -dbg to see the backtrace which could give a clue which command gives an error.

@coredump4

This comment has been minimized.

Copy link
Author

commented Aug 2, 2019

With -dbg, I see the "Welcome to the x11vnc crash shell" message following "caught X11 error," but nothing else that points to a problem.

@coredump4

This comment has been minimized.

Copy link
Author

commented Aug 6, 2019

I've now been successful testing on a host with a GPU and the proprietary Nvidia driver. I will need a solution for headless non-GPU systems too, but this is exciting! Thanks for all your work.

@coredump4

This comment has been minimized.

Copy link
Author

commented Aug 8, 2019

Looks like I'd assumed too much about RANDR support in the X dummy driver. Per this message, it looks like dummy lacks XRRSetScreenSize. That post is a few years old, but nobody's done much with dummy since then either. I will change gears and look at Xvfb instead.

@coredump4

This comment has been minimized.

Copy link
Author

commented Aug 8, 2019

Yep, I'll look at Virtual KMS too, thanks for that.
I've confirmed that Xvfb v1.20.1 has the RANDR extension, but I'll have to test to see if it's fully-functional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.