VBox + LXDE stops redrawing the screen

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
mMontu
Posts: 22
Joined: 1. Jan 2017, 23:52
Location: Brazil

VBox + LXDE stops redrawing the screen

Post by mMontu »

I've been using a Salix 14.2 32 bits VM for several months without any problem. Now I decided to switch to the 64 bits version in order to install some applications that requires a 64 bits OS (such as Docker). But for some reason I'm now facing some redraw issues, despite I have NOT changed the host (Windows 10) nor VirtualBox and Extension Pack version (5.0.20-106931).

The problem usually happens while I'm browsing a large file on gvim: the screen stop redrawing, but it seems that all mouse clicks and keyboard input are normally received. The screen only updates when minimized/restored or toggling full screen on VirtualBox window for that VM -- but the screen is updated only once for each minimize/restore, and the redraw problem persists until the guest is rebooted.

I followed these steps in order to create a new VM and reproduce the issue:

1. VM with 4GB of RAM, 128 mb for video, 1 processor

2. Installation full from http://sourceforge.net/projects/salix/f ... o/download

3. Installed gVim

Code: Select all

   spi -u
   spi -U
   spi -i vim-gvim
4. Installed Guest Additions (which required upgrading the kernel to match kernel-sources version)

Code: Select all

   spi -i kernel-source
   slapt-get -i kernel-firmware kernel-headers kernel-huge kernel-modules
   lilo -v
   reboot
   /run/media/.../VBoxLinuxAdditions.run
5. Installed LXDE
based on https://docs.salixos.org/wiki/How_to_install_LXDE

Code: Select all

   spi -i wireless-tools keybinder lxde-common openbox pcmanfm lxpanel lxsession menu-cache lxmenu-data
   spi -i lxterminal lxappearance lxinput lxrandr lxtask obconf midori lxdm
   --> issue happens
6. The following procedure was used to detect the issue: open a large help file, increase the window height and scroll around:

Code: Select all

   gvim -u NONE -U NONE -N -i NONE
   :h 41
   :wincmd o
   :set lines=60
   qq
   G
   gg 
   Ctrl-F
   q
   100@q
Sometimes it happens on the first G, and another times it takes a while; but it seems it occur faster when the gvim window covers part of another window.

This post on Stack Overflow mentions a patch on gVim. But I got the same results with the Vim in the Salix package (7.4.1938), using the same version that works fine on Salix 32-bits (8.0.45), and using the latest version/patches.
The post also mentions some solutions involving Compiz, but I'm not sure how could use that with Salix + LXDE.

What bugs me is the Salix 14.2 32 bits VM still runs just fine in the same environment and the same setup.

Any help is appreciated
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: VBox + LXDE stops redrawing the screen

Post by gapan »

Can you try upgrading virtualbox to the latest version?
Image
Image
mMontu
Posts: 22
Joined: 1. Jan 2017, 23:52
Location: Brazil

Re: VBox + LXDE stops redrawing the screen

Post by mMontu »

I tried updating to VirtualBox-5.0.30-112061, but then for some reason I got network problems. I couldn't make the fresh installed VMs access the network. I tried several solutions I found on the web, such as changing network adapter types, changing the MAC address, and deleting /etc/udev/rules.d/70-persistent-net.rules. But none worked and I ended up reverting to the previous version. I'm unsure about upgrading to 5.1, as it could cause problems in other VMs created by coworkers.
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: VBox + LXDE stops redrawing the screen

Post by gapan »

Does this happen only with LXDE, or with other WMs too?

But you will need to upgrade your virtualbox at some point eventually.
Image
Image
mMontu
Posts: 22
Joined: 1. Jan 2017, 23:52
Location: Brazil

Re: VBox + LXDE stops redrawing the screen

Post by mMontu »

I noticed the the newer VirtualBox network problem on all VMs with Salix 14.2 64 bits (I've created a couple of them trying to solve the redraw problem). The other VMs (including Salix 14.2 32 bits running LXDE) work fine.

The main problem, about redrawing, only occurs after I install LXDE, and only on VMs with Salix 14.2 64 bits.
mMontu
Posts: 22
Joined: 1. Jan 2017, 23:52
Location: Brazil

Re: VBox + LXDE stops redrawing the screen

Post by mMontu »

gapan, I'm sorry, I read VM instead of WM on your last post.

Yes, the issue only occurs using LXDE. But I only tested one WM alternative, the Xfce, which comes in the downloaded ISO. Please let me know if you think testing some specific WMs could help to debug this issue.
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: VBox + LXDE stops redrawing the screen

Post by gapan »

I'm thinking this is most probably a bug with virtualbox that somehow only shows with gvim. I don't have any such problems here with 64bit salix guests, I just tried it. Or it could be something that pops only on windows hosts, don't know. Maybe try enabling/disabling 3D acceleration for your VM?

Other than that, no ideas except upgrading your virtualbox.

Or as a workaround, switch to another WM... If you like lxde, it is possible to run xfwm in place of openbox in lxde (assuming that openbox is the culprit somehow).
Image
Image
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: VBox + LXDE stops redrawing the screen

Post by gapan »

OK, so here's another idea if you're up to it. Recompile gvim for gtk3 instead of gtk2.

1. Download all files from here: http://download.salixos.org/x86_64/slac ... /vim-gvim/
2. Edit the line that reads

Code: Select all

config_vim --with-x --enable-gui=gtk2
and replace gtk2 with gtk3
3. Run:

Code: Select all

fakeroot sh ./vim-gvim.SlackBuild
4. The package will be created in your /tmp. Replace the existing one with:

Code: Select all

sudo spkg --reinstall /tmp/vim-gvim-*.txz
Image
Image
mMontu
Posts: 22
Joined: 1. Jan 2017, 23:52
Location: Brazil

Re: VBox + LXDE stops redrawing the screen

Post by mMontu »

I tried enabling/disabling 3D acceleration, but nothing changed. I'm assuming it is most likely to work with it disabled, so I'm leaving it disabled.

Avoiding GTK+ 2 is a good idea indeed. While I was on the process of rebuild gvim I lose the network connection again, thus I guess it isn't something caused only by newer VirtualBox versions. I tracked it down to the use of Cisco AnyConnect on the host -- but that is another issue.

I tried recompiling gvim following your instructions, but it fails with the following message:

Code: Select all

...
ru.UTF-8/man1/xxd.1

sent 460,729 bytes  received 1,848 bytes  925,154.00 bytes/sec
total size is 452,475  speedup is 0.98
FATAL: VIM package needed in /tmp
$
I build the latest version from vim repository using GTK+ 3, and it seems the issue is solved.
Thanks for your help!
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: VBox + LXDE stops redrawing the screen

Post by mimosa »

It seems you have to build vim itself first:

Code: Select all

fakeroot sh ./vim.SlackBuild
I doubt you need to replace the system vim package with the result, in order for the new gvim to work properly - but perhaps best keep it somewhere safe (not in /tmp) just in case.

Or maybe just:

Code: Select all

wget -c http://download.salixos.org/x86_64/slackware-14.2/slackware64/ap/vim-7.4.1938-x86_64-1.txz
cp vim-7.4.1938-x86_64-1.txz /tmp
and possibly alter the check in the SlackBuild to match the filename, if they are different - but this does assume the packages themselves are the same, as seems likely.
Post Reply