The vboxvideo driver causes the mouse pointer to disappear

Discussions about using Linux guests in VirtualBox.
Post Reply
grahamt
Posts: 7
Joined: 12. Aug 2007, 23:38
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Windows 7 RC; Ubuntu 9.04
Location: UK

The vboxvideo driver causes the mouse pointer to disappear

Post by grahamt »

I am using VirtualBox 1.4.0 under WindowsXP Pro 2002 with SP2. I have installed Ubuntu Linux 7.04 and as installed it is runs at the highest screen resolution of 1024x768. However, my laptop is an Acer Travelmate with a 15.4” widescreen and I am running it at the highest supported screen resolution of 1680x1050. On this the VirtualBox window looks very small. I wanted to run it at a higher resolution of either 1152x864 or 1280x1024.

I have followed the advice in a number of posts on this forum by bodhi.zazen and have successfully completed the following steps:

1) With Ubuntu running and logged in I clicked on Devices > Install Guest Additions... (This successfully mounted the Additions ISO image on the Ubuntu Desktop).

2) Open a Terminal window in Ubuntu

3) Execute the following command:

sudo aptitude install build-essential kernel-header-uname -r

(As noted in the relevant post, the ` is the backtic symbol found on the key just to the left of the “1” key on most keyboards). Executing this command requires you to enter the Adminstrator password, which will normally be your normal login password. Ubuntu sets the root password to yours by default.

4) Execute the following command:

sudo sh /media/cdrom0/VBoxLinuxAdditions.run all

(At this point you will have to reboot).

5) Once Ubuntu is up and running again, execute the following command in a Terminal window:

sudo dpkg-reconfigure -phigh xserver-xorg

(This will start a “graphical” reconfiguration session. “OK” the first option, the type of display driver, vesa is the default, and then on the next option, desired screen resolutions, select the additional ones over and above the defaults of 640x480, 800x600 and 1024x768. I added 1152x864 and 1280x1024). “OK” this new configuration. Once again you need to reboot).

All of these operations appear to have worked successfully. I opened xorg.conf in a text editor and it does appear to have added the additional screen resolutions to the definitions.

However, despite all this, when I went in Ubuntu to System > Preferences > Screen Resolution, the only options offered to me remained 640x480, 800x600and 1024x768.

I then ran Step 5) again and by chance noticed that there was an option of a display device of vboxvideo. When I accepted this device I discovered that on rebooting Ubuntu I now had the missing resolutions. The window assumed the size of the highest available default resolution.

However, now the mouse pointer disappeared from the screen as soon as I clicked within the window. It would only reappear once I had released it with the Host key. As soon as I clicked in the window it disappeared again. However, although the mouse pointer was not visible it clearly was acting within the session window since by moving the mouse around, it was possible to see all of the functions highlighted as the mouse pointer location passed over them.

By hunting around with the mouse and by using the keyboard shortcuts I managed to find System > Preferences > Screen Resolution and changed the resolution back to 1024x768 as it was with the vesa driver, where everything worked. However, the mouse pointer still wouldn't appear. I even set 1024x768 as the default and rebooted but still no mouse pointer. I tried this both in fullscreen mode and windowed mode but it made no difference.

It was only after I had run Step 5) again and changed the driver back to vesa that the mouse pointer again became visible.

The conclusion can only be that there is a bug in the vboxvideo driver that is causing the mouse pointer to disappear, whatever the screen resolution chosen.

I have raised this in the Public Bugtracker as a defect but I would be grateful for any suggestions as to how to resolve this problem.
trekfan1
Posts: 98
Joined: 13. May 2007, 07:22
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux
Location: Italy

Post by trekfan1 »

For take effect on changes on xserver-xorg is NOT necessary reboot, use CTRL-ALT-DEL (on virtualbox press HOST+Backspace) to restart X server and is possible to change resolution (sorry for my english)
grahamt
Posts: 7
Joined: 12. Aug 2007, 23:38
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Windows 7 RC; Ubuntu 9.04
Location: UK

Post by grahamt »

I appear to have uncovered the problem and the solution. On checking xorg.conf I discovered that the Mouse Device was shown as "mouse", not "vboxmouse". The strange thing is that after installing the Guest Additions, xorg.conf had both "vboxmouse" and "vboxvideo" in the respective Devices section.

It would appear that the bug is actually in dpkg-reconfigure. The evidence is that running it with the -phigh switch correctly enables the additional screen resolutions to be set but also, by default, resets the Mouse Device back from "vboxmouse" to "mouse", as it was before installing the Guest Additions. I did realise that you had to select the "vboxvideo" device as well because it presents "vesa" but there is no indication that it also changes the Mouse Device.

Running dpkg-reconfigure without the -phigh switch enables you to run through the entire configuration process but at no point does it offer you an option to set the Mouse Device!

In the end I solved the problem by running the dpkg-reconfigure -phigh xserver-xorg command to set up the Video Driver as "vboxvideo" and select the desired additional screen resolutions and then separately edited the xorg.conf file to put the Mouse Device back to "vboxmouse" as it should have been.

Of course, I could have done all the editing manually. It's just a great pity that dpkg-reconfigure doesn't behave itself!
grahamt
Posts: 7
Joined: 12. Aug 2007, 23:38
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Windows 7 RC; Ubuntu 9.04
Location: UK

Post by grahamt »

First, a correction to the instructions in 3) - the command should read: sudo aptitude install build-essential kernel-header-`uname -r`. I discovered after rereading it that the backtic characters had disappeared!

Now, an update on this problem. It appears that dpkg-reconfigure (or debconf, which it invokes) is actually doing what it is supposed to. It just puts the xorg.conf back to what it thinks it ought to be based on the way it left it. It doesn't know that installing Guest Additions has changed it and so assumes it's a mistake and "corrects" it.

The problem is in the config of the xserver-xorg package. There needs to be a step where you can select the mouse driver, but there isn't.

The solution to this problem that will achieve the correct outcome without resorting to manually editing the xorg.conf file is to run dpkg-reconfigure to select the additional screen resolutions BEFORE installing the Guest Additions. I've tried it and it works.
Post Reply