Emacs does not redraw properly inside VirtualBox

5

1

I am running Emacs inside a virtual machine, and are experiencing redrawing problems when scrolling or adding/removing lines of text. It seems only a small portion of the window is being redrawn, causing some lines to be repeated and others to be obscured.

I have not experienced any similar problems with other applications inside the virtual machine.

The problem is present whether I run the virtual machine in fullscreen or windowed mode.

This is my setup:

  • Windows 7 Pro 64-bit host OS
    • nVidia GTX 770 graphics card with latest drivers
    • VirtualBox 4.3.6
  • Ubuntu 13.10 64-bit guest OS
    • VirtualBox Guest Additions installed
    • 3D acceleration enabled
    • Cinnamon 2.0.14 desktop environment
    • Emacs 24.3.1

My workaround for now is to run Emacs in terminal mode, but I would prefer a solution that makes it work properly in its own graphical window.

Lars Haugseth

Posted 2014-01-16T11:27:19.490

Reputation: 362

Answers

3

I have had the same problem and it seems that disabling 3D acceleration in VirtualBox properties solved the problem.

Tieum

Posted 2014-01-16T11:27:19.490

Reputation: 46

Switching to gnome-flashback also solved my emacs performance problems in a vmware linux guest (fedora). – Francois – 2017-06-01T08:53:53.250

1Thank you for the answer. I have since gone over to using GNOME Flashback desktop on this VM, and don't experience that problem there, even with 3D acceleration enabled. I will add that as a separate answer, but mark yours as the accepted one. – Lars Haugseth – 2014-04-28T18:29:12.353

1

I followed the tip provided by Lars to great success. I wanted to provide some detail to help other users with this issue.

My setup:

  • Windows 10 Host
  • Ubuntu 16.04 LTS Guest
  • 3D acceleration is enabled in VirtualBox settings.
  • Emacs 26.1
  • Guest Additions installed.
  • VirtualBox 5.2.22 r126460

Steps:

  • Replace Unity with Gnome Flash Back Metacity.

Instructions on how to do that:

https://www.debugpoint.com/2016/04/install-classic-gnome-flashback-in-ubuntu-16-04-replacing-unity/

Performance is great. Emacs, using the same init.el, loads faster in VirtualBox than on Windows.

rorsach

Posted 2014-01-16T11:27:19.490

Reputation: 11

1

As a workaround in cases where Cinnamon is not a requirement, I have found that when using the GNOME Flashback desktop that ships with Ubuntu 13.10, I do not experience this problem, even with 3D acceleration enabled. The functionality and feel of GNOME Flashback is pretty similar to Cinnamon, at least for my use.

Lars Haugseth

Posted 2014-01-16T11:27:19.490

Reputation: 362