support required for virtualbox Ticket #15863 #2497

Closed
xorbug opened this Issue Oct 11, 2016 · 20 comments

Comments

Projects
None yet
7 participants
@xorbug

xorbug commented Oct 11, 2016

Binary i3 version: 4.12 (2016-03-06, branch "4.12") © 2009 Michael Stapelberg and contributors
Running i3 version: 4.12 (2016-03-06, branch "4.12") (pid 4054)
Loaded i3 config: /home/vals/.config/i3/config (Last modified: Thu Sep 8 12:56:21 2016, 2845516 seconds ago)
on Debian Testing

In the bug ticket 15863 [0] reported on Virtualbox bug tracker there is a recent request to i3 developers to join and help. Bug details are available on that virtualbox ticket page.
I attach a log file about what is happening when running a virtual machine. I did:

  1. start virtualbox main window
  2. start a virtual machine
  3. set to tabbed mode
  4. set the VM fullscreen via the VM menu (=> rendering all black, but this is an old issue for me)
  5. turn off fullscreen mode
  6. open a terminal to dump the log
    The misbehaviour happened, so if it's a loggable thing it should be in there.

Cheers.

[0] https://www.virtualbox.org/ticket/15863

i3log.zip

@Airblader

This comment has been minimized.

Show comment
Hide comment
@Airblader

Airblader Oct 11, 2016

Member

Thanks for letting us know. I'll try to look into this soon.

Member

Airblader commented Oct 11, 2016

Thanks for letting us know. I'll try to look into this soon.

@nmschulte

This comment has been minimized.

Show comment
Hide comment
@nmschulte

nmschulte Oct 15, 2016

Contributor

@Airblader, I want to note that, I think perhaps Chromium also suffers from this "what's my size" issue you brought up (I'm still reading the other thread; I'm affected by this w/ VBox too).

Sometimes (okay, like, every time), when starting Chromium and navigating to certain websites (Google+ nearly 100%) after just starting i3, the page seems to not understand it's actual width, and paints oddly (G+: always wider than reality) very similar to VBox. If I resize the window (float, resize, un-float), the page suddenly seems to understand its width (G+: fits the width, and switches from 3-col to 2-col if narrow enough). Chromium also seems to flicker during various repaints when I have the page inspector/debugging tools open, similar to VBox sometimes.

I wonder if these are the same issue, or if it's likely Chromium is similar/related (sending WM messages that i3 doesn't advertise support for and then entering unaccounted for state), and how to best find a resolution.

Contributor

nmschulte commented Oct 15, 2016

@Airblader, I want to note that, I think perhaps Chromium also suffers from this "what's my size" issue you brought up (I'm still reading the other thread; I'm affected by this w/ VBox too).

Sometimes (okay, like, every time), when starting Chromium and navigating to certain websites (Google+ nearly 100%) after just starting i3, the page seems to not understand it's actual width, and paints oddly (G+: always wider than reality) very similar to VBox. If I resize the window (float, resize, un-float), the page suddenly seems to understand its width (G+: fits the width, and switches from 3-col to 2-col if narrow enough). Chromium also seems to flicker during various repaints when I have the page inspector/debugging tools open, similar to VBox sometimes.

I wonder if these are the same issue, or if it's likely Chromium is similar/related (sending WM messages that i3 doesn't advertise support for and then entering unaccounted for state), and how to best find a resolution.

@Airblader

This comment has been minimized.

Show comment
Hide comment
@Airblader

Airblader Oct 15, 2016

Member

Chromium is using GTK and not QT, so that's interesting. I have constrained time right now, so speaking for myself I'll focus on the VirtualBox issue and once we figure that out we can see if the issues relate or not.

Member

Airblader commented Oct 15, 2016

Chromium is using GTK and not QT, so that's interesting. I have constrained time right now, so speaking for myself I'll focus on the VirtualBox issue and once we figure that out we can see if the issues relate or not.

@nmschulte

This comment has been minimized.

Show comment
Hide comment
@nmschulte

nmschulte Oct 15, 2016

Contributor

@Airblader, okay, thanks. If you don't mind, I'd like to support the virtualbox discussion here, instead of giving Oracle my email and agreeing to their overly broad terms of service for single sign-on.

To start, this is me: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=837426#22

xtrace.log.gz
screencap.mkv.zip

I've taken another video capture of the issue(s), this time w/ key presses displayed on screen, and a corresponding xtrace capture to go with.

In this video I do a few things;
0:00 -- start the xtrace of the virtualbox invocation to run the vm
0:15 -- wait for the vm to boot to a "static" rendering (the desktop manager/face-chooser; to better show the issue)
0:35 -- use i3 to flip (alt+e) the parent container's direction (vert/horiz) a few (4) times
0:44 -- use i3 to resize (alt+right_mouse|drag) the split (to resize virtualbox) a few (4) times
0:55 -- use i3 to float (alt+shift+space) virtualbox and move (alt+left_mouse|drag) it around and resize (alt+right_mouse|drag) it a few (6) times
1:16 -- use i3 to "full-screen" (alt+f) and quickly "un-fullscreen" (alt+f) virtualbox (didn't mean to do this...)
1:19 -- use i3 tile/un-float (alt+shift+space) virtualbox
1:22 -- use i3 to rapidly float and un-float virtualbox a few times
1:30 -- use i3 to "full-screen"/"un-fullscreen" twice, once rapidly (1:30) followed by once slowly (1:32)
1:34 -- use i3 to "full-screen"/"un-fullscreen" twice, once rapidly (1:34) followed by once slowly (1:38)

nmschulte@desmas-l:~$ xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
eDP1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 340mm x 190mm
   1920x1080     60.00*+  59.93    50.00  
   1680x1050     59.95    59.88  
   1600x1024     60.17  
   1400x1050     59.98  
   1600x900      60.00  
   1280x1024     60.02  
   1440x900      59.89  
   1280x960      60.00  
   1368x768      60.00  
   1360x768      59.80    59.96  
   1152x864      60.00  
   1280x720      60.00  
   1024x768      60.00  
   1024x576      60.00  
   960x540       60.00  
   800x600       60.32    56.25  
   864x486       60.00  
   640x480       59.94  
   720x405       60.00  
   640x360       60.00  
DP1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
HDMI3 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

It seems like VirtualBox is both 1) missing resize events, and 2) spuriously resizing (and positioning). The first is leading to missed paints, and the second to funky behavior.

I think it's very interesting that rapidly fullscreening and un-fullscreening VirtualBox causes it to become consistent again w/ regard to size/position. Sometimes it doesn't do a final paint after this dance, but you can interact with it and it will paint and be the correct size and that's just as good (given the bigger issue). If you do this dance too slowly (~1 second-ish), VirtualBox puts in scrollbars and the res/size is (just barely) larger than the display area. This makes me wonder if there's e.g. a timed condition or such in VirtualBox causing this behavior.

Contributor

nmschulte commented Oct 15, 2016

@Airblader, okay, thanks. If you don't mind, I'd like to support the virtualbox discussion here, instead of giving Oracle my email and agreeing to their overly broad terms of service for single sign-on.

To start, this is me: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=837426#22

xtrace.log.gz
screencap.mkv.zip

I've taken another video capture of the issue(s), this time w/ key presses displayed on screen, and a corresponding xtrace capture to go with.

In this video I do a few things;
0:00 -- start the xtrace of the virtualbox invocation to run the vm
0:15 -- wait for the vm to boot to a "static" rendering (the desktop manager/face-chooser; to better show the issue)
0:35 -- use i3 to flip (alt+e) the parent container's direction (vert/horiz) a few (4) times
0:44 -- use i3 to resize (alt+right_mouse|drag) the split (to resize virtualbox) a few (4) times
0:55 -- use i3 to float (alt+shift+space) virtualbox and move (alt+left_mouse|drag) it around and resize (alt+right_mouse|drag) it a few (6) times
1:16 -- use i3 to "full-screen" (alt+f) and quickly "un-fullscreen" (alt+f) virtualbox (didn't mean to do this...)
1:19 -- use i3 tile/un-float (alt+shift+space) virtualbox
1:22 -- use i3 to rapidly float and un-float virtualbox a few times
1:30 -- use i3 to "full-screen"/"un-fullscreen" twice, once rapidly (1:30) followed by once slowly (1:32)
1:34 -- use i3 to "full-screen"/"un-fullscreen" twice, once rapidly (1:34) followed by once slowly (1:38)

nmschulte@desmas-l:~$ xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
eDP1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 340mm x 190mm
   1920x1080     60.00*+  59.93    50.00  
   1680x1050     59.95    59.88  
   1600x1024     60.17  
   1400x1050     59.98  
   1600x900      60.00  
   1280x1024     60.02  
   1440x900      59.89  
   1280x960      60.00  
   1368x768      60.00  
   1360x768      59.80    59.96  
   1152x864      60.00  
   1280x720      60.00  
   1024x768      60.00  
   1024x576      60.00  
   960x540       60.00  
   800x600       60.32    56.25  
   864x486       60.00  
   640x480       59.94  
   720x405       60.00  
   640x360       60.00  
DP1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
HDMI3 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

It seems like VirtualBox is both 1) missing resize events, and 2) spuriously resizing (and positioning). The first is leading to missed paints, and the second to funky behavior.

I think it's very interesting that rapidly fullscreening and un-fullscreening VirtualBox causes it to become consistent again w/ regard to size/position. Sometimes it doesn't do a final paint after this dance, but you can interact with it and it will paint and be the correct size and that's just as good (given the bigger issue). If you do this dance too slowly (~1 second-ish), VirtualBox puts in scrollbars and the res/size is (just barely) larger than the display area. This makes me wonder if there's e.g. a timed condition or such in VirtualBox causing this behavior.

@Airblader

This comment has been minimized.

Show comment
Hide comment
@Airblader

Airblader Oct 15, 2016

Member

Thanks! The zip file doesn't download for me, unfortunately. Any chance you can upload the video elsewhere?

Member

Airblader commented Oct 15, 2016

Thanks! The zip file doesn't download for me, unfortunately. Any chance you can upload the video elsewhere?

@nmschulte

This comment has been minimized.

Show comment
Hide comment
@nmschulte

nmschulte Oct 16, 2016

Contributor

Does this work better? I made a goofy zip above, I think.
screencap.mkv.zip

Contributor

nmschulte commented Oct 16, 2016

Does this work better? I made a goofy zip above, I think.
screencap.mkv.zip

@mosajjal

This comment has been minimized.

Show comment
Hide comment
@mosajjal

mosajjal Oct 16, 2016

I think it has something to do with i3 not respecting minimum size required (reported by the app). For example you can resize any floating window to any size w/o any restrictions. if somehow we could override this particular settings for Virtualbox it'll be fixed.

btw I'm a newbie so I don't know much about i3. It's possible they already have this configuration.

I think it has something to do with i3 not respecting minimum size required (reported by the app). For example you can resize any floating window to any size w/o any restrictions. if somehow we could override this particular settings for Virtualbox it'll be fixed.

btw I'm a newbie so I don't know much about i3. It's possible they already have this configuration.

@Airblader

This comment has been minimized.

Show comment
Hide comment
@Airblader

Airblader Oct 16, 2016

Member

I haven't looked at the data yet, but can you explain what makes you think that that's the reason? Given that the bug appears in tiling windows I'm not sure how that could be the reason.

Member

Airblader commented Oct 16, 2016

I haven't looked at the data yet, but can you explain what makes you think that that's the reason? Given that the bug appears in tiling windows I'm not sure how that could be the reason.

@mosajjal

This comment has been minimized.

Show comment
Hide comment
@mosajjal

mosajjal Oct 16, 2016

it's certainly a bug. But if you change the default behavior of Virtualbox windows to "floating", it's almost fixed. The only problem becomes size. It's gonna be small and you can't enlarge the window anymore. But flickers and all the other problems disappear. Is there a configuration to force respect the reported minimum size of the windows in i3 ?

it's certainly a bug. But if you change the default behavior of Virtualbox windows to "floating", it's almost fixed. The only problem becomes size. It's gonna be small and you can't enlarge the window anymore. But flickers and all the other problems disappear. Is there a configuration to force respect the reported minimum size of the windows in i3 ?

@Airblader

This comment has been minimized.

Show comment
Hide comment
@Airblader

Airblader Oct 16, 2016

Member

But you said the issue is caused by not respecting minimum size for floating windows, which isn't true from what I understand. A virtual machine certainly isn't what we intend floating windows should be used for so that's just a workaround and not respecting minimum size for floating windows is a separate issue from this ticket. For that issue we already have #2436 (which answers your last question.)

VirtualBox should work in tiling mode, but it doesn't. That's what needs to be fixed.

Member

Airblader commented Oct 16, 2016

But you said the issue is caused by not respecting minimum size for floating windows, which isn't true from what I understand. A virtual machine certainly isn't what we intend floating windows should be used for so that's just a workaround and not respecting minimum size for floating windows is a separate issue from this ticket. For that issue we already have #2436 (which answers your last question.)

VirtualBox should work in tiling mode, but it doesn't. That's what needs to be fixed.

@mosajjal

This comment has been minimized.

Show comment
Hide comment
@mosajjal

mosajjal Oct 16, 2016

yes you're right. I only suggested a workaround. The bug is there like I said

yes you're right. I only suggested a workaround. The bug is there like I said

@nmschulte

This comment has been minimized.

Show comment
Hide comment
@nmschulte

nmschulte Oct 16, 2016

Contributor

@Airblader, here is the same video referenced above, but hosted via Debian. It's also H.265/HEVC (x265) encoded, compared to the GitHub hosted zip, which is H.264/MPEG-4 AVC (x264) encoded.

https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=837426;filename=screencap.hevc.mkv;msg=32

Contributor

nmschulte commented Oct 16, 2016

@Airblader, here is the same video referenced above, but hosted via Debian. It's also H.265/HEVC (x265) encoded, compared to the GitHub hosted zip, which is H.264/MPEG-4 AVC (x264) encoded.

https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=837426;filename=screencap.hevc.mkv;msg=32

@nmschulte

This comment has been minimized.

Show comment
Hide comment
@nmschulte

nmschulte Oct 17, 2016

Contributor

This looks applicable to the VBox src:
https://doc.qt.io/qt-5/application-windows.html#x11-peculiarities

X11 provides no standard or easy way to get the frame geometry once the window is decorated. Qt solves this problem with nifty heuristics and clever code that works on a wide range of window managers that exist today. Don't be surprised if you find one where QWidget::frameGeometry() returns wrong results though.

Nor does X11 provide a way to maximize a window. QWidget::showMaximized() has to emulate the feature. Its result depends on the result of QWidget::frameGeometry() and the capability of the window manager to do proper window placement, neither of which can be guaranteed.

depends on the capability of the window manager to do proper window placement --> made me chuckle.

Contributor

nmschulte commented Oct 17, 2016

This looks applicable to the VBox src:
https://doc.qt.io/qt-5/application-windows.html#x11-peculiarities

X11 provides no standard or easy way to get the frame geometry once the window is decorated. Qt solves this problem with nifty heuristics and clever code that works on a wide range of window managers that exist today. Don't be surprised if you find one where QWidget::frameGeometry() returns wrong results though.

Nor does X11 provide a way to maximize a window. QWidget::showMaximized() has to emulate the feature. Its result depends on the result of QWidget::frameGeometry() and the capability of the window manager to do proper window placement, neither of which can be guaranteed.

depends on the capability of the window manager to do proper window placement --> made me chuckle.

@Airblader

This comment has been minimized.

Show comment
Hide comment
@Airblader

Airblader Oct 17, 2016

Member

X11 provides no standard or easy way to get the frame geometry once the window is decorated.

Correct, core X11 doesn't provide such a standard. The EWMH specification, however, does. But granted, i3 currently doesn't fully support this – we only set _NET_FRAME_EXTENTS once if the client requests it via _NET_REQUEST_FRAME_EXTENTS and then never update it again.

Feel free to open an issue for i3 to fully support this hint.

Nor does X11 provide a way to maximize a window.

Correct, core X11 doesn't. The EWMH specification, however, does. But EWMH also allows us not to support it and that's what we chose to do.

Member

Airblader commented Oct 17, 2016

X11 provides no standard or easy way to get the frame geometry once the window is decorated.

Correct, core X11 doesn't provide such a standard. The EWMH specification, however, does. But granted, i3 currently doesn't fully support this – we only set _NET_FRAME_EXTENTS once if the client requests it via _NET_REQUEST_FRAME_EXTENTS and then never update it again.

Feel free to open an issue for i3 to fully support this hint.

Nor does X11 provide a way to maximize a window.

Correct, core X11 doesn't. The EWMH specification, however, does. But EWMH also allows us not to support it and that's what we chose to do.

@Airblader

This comment has been minimized.

Show comment
Hide comment
@Airblader

Airblader Oct 30, 2016

Member

Closing this now since it's handled over at VirtualBox resp. then in QT.

Member

Airblader commented Oct 30, 2016

Closing this now since it's handled over at VirtualBox resp. then in QT.

@Airblader Airblader closed this Oct 30, 2016

@nmschulte

This comment has been minimized.

Show comment
Hide comment
@nmschulte

nmschulte Dec 13, 2016

Contributor

I don't have an account to update the Virtualbox bug report, but if someone wishes to update that report, I've created a relevant bug report for the Qt project:
https://bugreports.qt.io/browse/QTBUG-57608

@xorbug @mosajjal @Airblader

Contributor

nmschulte commented Dec 13, 2016

I don't have an account to update the Virtualbox bug report, but if someone wishes to update that report, I've created a relevant bug report for the Qt project:
https://bugreports.qt.io/browse/QTBUG-57608

@xorbug @mosajjal @Airblader

@djvdorp

This comment has been minimized.

Show comment
Hide comment
@djvdorp

djvdorp Dec 14, 2016

@nmschulte thanks a lot for creating the relevant bug report for the Qt project, I have just updated the Virtualbox bug report with this information 👍

djvdorp commented Dec 14, 2016

@nmschulte thanks a lot for creating the relevant bug report for the Qt project, I have just updated the Virtualbox bug report with this information 👍

@nmschulte

This comment has been minimized.

Show comment
Hide comment
@nmschulte

nmschulte Apr 24, 2017

Contributor

There is some activity on the Qt bug report; it's a bit over my head, as it seems the original issue was too:
https://bugreports.qt.io/browse/QTBUG-57608?focusedCommentId=354600&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-354600

I suspect Tor is correct in that the issue arises from an assumption about synchronicity, rather than the detail of the FIXME: ... comment specifically. @djvdorp, @nmikhailov, he's looking for a narrowed test-case to aid diagnosis.

Contributor

nmschulte commented Apr 24, 2017

There is some activity on the Qt bug report; it's a bit over my head, as it seems the original issue was too:
https://bugreports.qt.io/browse/QTBUG-57608?focusedCommentId=354600&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-354600

I suspect Tor is correct in that the issue arises from an assumption about synchronicity, rather than the detail of the FIXME: ... comment specifically. @djvdorp, @nmikhailov, he's looking for a narrowed test-case to aid diagnosis.

@Airblader

This comment has been minimized.

Show comment
Hide comment
@Airblader

Airblader Apr 25, 2017

Member

Yeah, what Tor said is correct. A reduced testcase would probably indeed help.

Member

Airblader commented Apr 25, 2017

Yeah, what Tor said is correct. A reduced testcase would probably indeed help.

@matoro

This comment has been minimized.

Show comment
Hide comment
@matoro

matoro Oct 22, 2017

This seems to be fixed in virtualbox-5.2.0.

matoro commented Oct 22, 2017

This seems to be fixed in virtualbox-5.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment