How to fix *ubuntu 12.04 black screen with 4.2.12

Discussions about using Linux guests in VirtualBox.
Post Reply
alexsecret
Posts: 13
Joined: 2. May 2011, 05:32
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Debian, Xubuntu, Windows XP

How to fix *ubuntu 12.04 black screen with 4.2.12

Post by alexsecret »

Hello everyone.

I faced this black screen problem right after the latest 4.2.12 update too. This is the solution that I have checked and verified on 2 vm's and it's working. Just follow the instructions and you'll be fine. The problem is caused by an incompatibility of the new VB additions with the xorg subsystem used in 12.04 and previous releases. Luckily, Canonical has released two packages you can install on your guest systems and update them to use the new xorg subsystem and kernel used in version 12.10 without stopping using 12.04. So, let's go and do it:

BEFORE YOU START DOING ANYTHING, I would strongly recommend you clone your affected vm using vbox's clone feature and work on the clone so that you won't damage your initial vm in case something goes terribly wrong.

UPDATE: After some additional tests, I found out that on vm's that are installed on encrypted partitions or use encrypted home folders, the procedure may fail. In order to avoid this, please follow the instuctions on 1, 2, 3 and then PS 1 since that installation is done after the user has logged in their account and everything is decrypted.

1. Start your guest but hold down the shift button right after the vm startup white screen appears, so that you can interrupt normal boot and view grub options.
2. Select recovery mode and let it load.
3. On the recovery mode's blue screen, enable networking so that you can install packages. That will remount your system as read/write. If this fails for some reason, you must follow a slightly different procedure explained in PS 1 but normally you should be ok.
4. After networking has been enabled successfully, select the option to start a root session.
5. In root mode, type cd /opt/VBoxGuestAdditions-4.2.12.
6. Type ./uninstall.sh. This will uninstall 4.2.12 additions from your guest. You may safely remove the VBoxGuestAdditions-4.2.12 folder too afterwards but it's not necessary.
7. type apt-get update to make sure the guest is updated.
8. type apt-get install linux-generic-lts-quantal xserver-xorg-lts-quantal to install both the new kernel and the new xorg subsystem.
9. After the previous installation is finished successfully, from the "Devices" menu, click "Install Guest Additions". Nothing will happen after that at this point, so don't expect any automatic mounting for example.
10. type mkdir /media/isos and mount /dev/sr0 /media/isos. (sr0 <-- zero) This will mount the guest additions ISO in /media/isos.
11. type cd /media/isos to switch to the vbox additions mount and type sh ./VBoxLinuxAdditions.run to re-install 4.2.12 additions. I do assume that since those additions were installed before this procedure, DKMS is already installed on your guest. If not, please install DKMS first (apt-get install dkms) and then proceed with the additions.

The only remaining thing to do now is to either type reboot to restart your vm or poweroff to close it and re-run it. After you issue either command, the blue recovery screen will appear again but do nothing. Wait for the vm to complete whatever it's doing and restart.

The vm will start, showing you the grub menu after that. Select the first option to start your vm with the new kernel and if everything went fine, it will run perfectly ok and the next time you start it, it will start as it used to.


PS 1
If enable networking failed and the vm is stuck doing nothing, power off the vm and restart it going back to recovery mode.
b1 Start a root session and type mount -o remount,rw / to remount your root partition in read/write mode.
b2 Follow the instructions in No 5 and 6 to uninstall vbox additions.
b3 After they have been removed, type reboot and wait for the vm to reboot.
Now that the additions are gone, the vm will start normally but with a low resolution and you will be able to install the necessary packages using a root terminal. Follow instructions No 7 and 8 for that.
If guest additions are to be installed for the very first time, I always prefer to do that with the vm running in recovery mode in a root session or with xorg stopped. This prevents xorg from crashing after this first installation is complete. VBox additions updates do not cause similar crashes though. You can always try to install them in the same root terminal and see what happens and if it fails, you do it the other way around.
If you need to install the additions in recovery mode, you must reboot your vm after the package installation and go to recovery mode of course and follow the instructions on
b1, 9, 10, 11.

I know it looks quite complicated but it has to be done only once.

Good luck! ;-)
Last edited by alexsecret on 19. Apr 2013, 03:33, edited 4 times in total.
Nothing worth doing is easy!
ABachmann
Posts: 5
Joined: 17. Apr 2013, 17:38

Re: How to fix *ubuntu 12.04 black screen with 4.2.12

Post by ABachmann »

I tried your howto, but I ran into many unresolved dependencies on step 8 (apt-get install linux-generic-lts-quantal xserver-xorg-lts-quantal):

Code: Select all

Reading package lists...
Building dependency tree...
Reading state information...
Reading extended state information...
Initializing package states...
The following NEW packages will be installed:
  libdrm-nouveau2{a} libgl1-mesa-dri-lts-quantal{ab} 
  libgl1-mesa-glx-lts-quantal{ab} libglapi-mesa-lts-quantal{ab} 
  libllvm3.1{a} libtxc-dxtn-s2tc0{a} libxatracker1-lts-quantal{ab} 
  libxrandr-ltsq2{a} linux-generic-lts-quantal linux-headers-3.5.0-27{a} 
  linux-headers-3.5.0-27-generic{a} linux-headers-generic-lts-quantal 
  linux-image-3.5.0-27-generic linux-image-generic-lts-quantal 
  x11-xserver-utils-lts-quantal{a} xserver-common-lts-quantal{a} 
  xserver-xorg-core-lts-quantal{ab} xserver-xorg-input-all-lts-quantal{ab} 
  xserver-xorg-input-evdev-lts-quantal{ab} 
  xserver-xorg-input-mouse-lts-quantal{ab} 
  xserver-xorg-input-synaptics-lts-quantal{ab} 
  xserver-xorg-input-vmmouse-lts-quantal{ab} 
  xserver-xorg-input-wacom-lts-quantal{ab} xserver-xorg-lts-quantal{b} 
  xserver-xorg-video-all-lts-quantal{ab} 
  xserver-xorg-video-ati-lts-quantal{ab} 
  xserver-xorg-video-cirrus-lts-quantal{ab} 
  xserver-xorg-video-fbdev-lts-quantal{ab} 
  xserver-xorg-video-intel-lts-quantal{ab} 
  xserver-xorg-video-mach64-lts-quantal{ab} 
  xserver-xorg-video-mga-lts-quantal{ab} 
  xserver-xorg-video-modesetting-lts-quantal{a} 
  xserver-xorg-video-neomagic-lts-quantal{ab} 
  xserver-xorg-video-nouveau-lts-quantal{ab} 
  xserver-xorg-video-openchrome-lts-quantal{ab} 
  xserver-xorg-video-r128-lts-quantal{ab} 
  xserver-xorg-video-radeon-lts-quantal{ab} 
  xserver-xorg-video-s3-lts-quantal{ab} 
  xserver-xorg-video-savage-lts-quantal{ab} 
  xserver-xorg-video-siliconmotion-lts-quantal{ab} 
  xserver-xorg-video-sis-lts-quantal{ab} 
  xserver-xorg-video-sisusb-lts-quantal{ab} 
  xserver-xorg-video-tdfx-lts-quantal{ab} 
  xserver-xorg-video-trident-lts-quantal{ab} 
  xserver-xorg-video-vesa-lts-quantal{ab} 
  xserver-xorg-video-vmware-lts-quantal{ab} 
0 packages upgraded, 46 newly installed, 0 to remove and 0 not upgraded.
Need to get 67.8 MB of archives. After unpacking 234 MB will be used.
The following packages have unmet dependencies:
 xserver-xorg-video-cirrus-lts-quantal : Conflicts: xserver-xorg-video-cirrus but 1:1.3.2-4build1 is installed.
 xserver-xorg : Conflicts: xorg-renamed-package which is a virtual package.
                Conflicts: xserver-xorg-renamed which is a virtual package.
 xserver-xorg-input-all-lts-quantal : Conflicts: xserver-xorg-input-all but 1:7.6+12ubuntu2 is installed.
 xserver-xorg-video-neomagic-lts-quantal : Conflicts: xserver-xorg-video-neomagic but 1:1.2.5-2build2 is installed.
 libxatracker1-lts-quantal : Conflicts: libxatracker1 but 8.0.4-0ubuntu0.4 is installed.
 xserver-xorg-input-synaptics-lts-quantal : Conflicts: xorg-driver-synaptics which is a virtual package.
                                            Conflicts: xserver-xorg-input-synaptics but 1.6.2-1ubuntu1~precise2 is installed.
 xserver-xorg-video-vmware-lts-quantal : Conflicts: xserver-xorg-video-vmware but 1:12.0.1-1ubuntu1.1 is installed.
 xserver-xorg-video-sis-lts-quantal : Conflicts: xserver-xorg-video-sis but 1:0.10.3-3build2 is installed.
 xserver-xorg-core-lts-quantal : Conflicts: xserver-xorg-core but 2:1.11.4-0ubuntu10.12 is installed.
 xserver-xorg-input-evdev-lts-quantal : Conflicts: xserver-xorg-input-evdev but 1:2.7.0-0ubuntu1.2 is installed.
 xserver-xorg-input-wacom-lts-quantal : Conflicts: xserver-xorg-input-wacom but 1:0.14.0-0ubuntu2.1 is installed.
 xserver-xorg-video-trident-lts-quantal : Conflicts: xserver-xorg-video-trident but 1:1.3.4-2build2 is installed.
 libgl1-mesa-glx-lts-quantal : Conflicts: libgl1 which is a virtual package.
                               Conflicts: libgl1-mesa-glx but 8.0.4-0ubuntu0.4 is installed.
 xserver-xorg-video-r128-lts-quantal : Conflicts: xserver-xorg-video-r128 but 6.8.1-5build2 is installed.
 xserver-xorg-video-siliconmotion-lts-quantal : Conflicts: xserver-xorg-video-siliconmotion but 1:1.7.5-1build2 is installed.
 xserver-xorg-video-all-lts-quantal : Conflicts: xserver-xorg-video-all but 1:7.6+12ubuntu2 is installed.
 libgl1-mesa-dri-lts-quantal : Conflicts: libgl1-mesa-dri but 8.0.4-0ubuntu0.4 is installed.
 xserver-xorg-video-sisusb-lts-quantal : Conflicts: xserver-xorg-video-sisusb but 1:0.9.4-2build2 is installed.
 libglapi-mesa-lts-quantal : Conflicts: libglapi-mesa but 8.0.4-0ubuntu0.4 is installed.
 xserver-xorg-lts-quantal : Conflicts: libgl1-mesa-dri (>= 0~) but 8.0.4-0ubuntu0.4 is installed.
                            Conflicts: libgl1-mesa-glx (>= 0~) but 8.0.4-0ubuntu0.4 is installed.
                            Conflicts: libglapi-mesa (>= 0~) but 8.0.4-0ubuntu0.4 is installed.
                            Conflicts: libxatracker1 (>= 0~) but 8.0.4-0ubuntu0.4 is installed.
                            Conflicts: xserver-xorg but 1:7.6+12ubuntu2 is installed.
                            Conflicts: xserver-xorg-core (>= 0~) but 2:1.11.4-0ubuntu10.12 is installed.
                            Conflicts: xserver-xorg-input-all (>= 0~) but 1:7.6+12ubuntu2 is installed.
                            Conflicts: xserver-xorg-video-all (>= 0~) but 1:7.6+12ubuntu2 is installed.
 xserver-xorg-video-ati-lts-quantal : Conflicts: xserver-xorg-video-ati but 1:6.14.99~git20111219.aacbd629-0ubuntu2 is installed.
 xserver-xorg-video-savage-lts-quantal : Conflicts: xserver-xorg-video-savage but 1:2.3.3-1ubuntu1 is installed.
 xserver-xorg-video-s3-lts-quantal : Conflicts: xserver-xorg-video-s3 but 1:0.6.3-4build2 is installed.
 xserver-xorg-video-mach64-lts-quantal : Conflicts: xserver-xorg-video-mach64 but 6.9.0-1build2 is installed.
 xserver-xorg-video-nouveau-lts-quantal : Conflicts: xserver-xorg-video-nouveau but 1:0.0.16+git20111201+b5534a1-1build3 is installed.
 xserver-xorg-video-fbdev-lts-quantal : Conflicts: xserver-xorg-video-fbdev but 1:0.4.2-4ubuntu2 is installed.
 xserver-xorg-video-vesa-lts-quantal : Conflicts: xserver-xorg-video-vesa but 1:2.3.0-7build2 is installed.
 xserver-xorg-input-vmmouse-lts-quantal : Conflicts: xserver-xorg-input-vmmouse but 1:12.9.0-0ubuntu0.1 is installed.
 xserver-xorg-video-intel-lts-quantal : Conflicts: xserver-xorg-video-intel but 2:2.17.0-1ubuntu4.3 is installed.
 libgl1-mesa-glx : Conflicts: libgl1 which is a virtual package.
 xserver-xorg-video-openchrome-lts-quantal : Conflicts: xserver-xorg-video-openchrome but 1:0.2.904+svn1050-1 is installed.
 xserver-xorg-video-tdfx-lts-quantal : Conflicts: xserver-xorg-video-tdfx but 1:1.4.3-4build2 is installed.
 xserver-xorg-video-mga-lts-quantal : Conflicts: xserver-xorg-video-mga but 1:1.4.13.dfsg-4build2 is installed.
 xserver-xorg-input-synaptics : Conflicts: xorg-driver-synaptics which is a virtual package.
 xserver-xorg-video-radeon-lts-quantal : Conflicts: xserver-xorg-video-radeon but 1:6.14.99~git20111219.aacbd629-0ubuntu2 is installed.
 xserver-xorg-input-mouse-lts-quantal : Conflicts: xserver-xorg-input-mouse but 1:1.7.1-1build3 is installed.
The following actions will resolve these dependencies:

      Keep the following packages at their current version:                     
1)      libgl1-mesa-dri-lts-quantal [Not Installed]                             
2)      libgl1-mesa-glx-lts-quantal [Not Installed]                             
3)      libglapi-mesa-lts-quantal [Not Installed]                               
4)      libxatracker1-lts-quantal [Not Installed]                               
5)      x11-xserver-utils-lts-quantal [Not Installed]                           
6)      xserver-common-lts-quantal [Not Installed]                              
7)      xserver-xorg-core-lts-quantal [Not Installed]                           
8)      xserver-xorg-input-all-lts-quantal [Not Installed]                      
9)      xserver-xorg-input-evdev-lts-quantal [Not Installed]                    
10)     xserver-xorg-input-mouse-lts-quantal [Not Installed]                    
11)     xserver-xorg-input-synaptics-lts-quantal [Not Installed]                
12)     xserver-xorg-input-vmmouse-lts-quantal [Not Installed]                  
13)     xserver-xorg-input-wacom-lts-quantal [Not Installed]                    
14)     xserver-xorg-lts-quantal [Not Installed]                                
15)     xserver-xorg-video-all-lts-quantal [Not Installed]                      
16)     xserver-xorg-video-ati-lts-quantal [Not Installed]                      
17)     xserver-xorg-video-cirrus-lts-quantal [Not Installed]                   
18)     xserver-xorg-video-fbdev-lts-quantal [Not Installed]                    
19)     xserver-xorg-video-intel-lts-quantal [Not Installed]                    
20)     xserver-xorg-video-mach64-lts-quantal [Not Installed]                   
21)     xserver-xorg-video-mga-lts-quantal [Not Installed]                      
22)     xserver-xorg-video-modesetting-lts-quantal [Not Installed]              
23)     xserver-xorg-video-neomagic-lts-quantal [Not Installed]                 
24)     xserver-xorg-video-nouveau-lts-quantal [Not Installed]                  
25)     xserver-xorg-video-openchrome-lts-quantal [Not Installed]               
26)     xserver-xorg-video-r128-lts-quantal [Not Installed]                     
27)     xserver-xorg-video-radeon-lts-quantal [Not Installed]                   
28)     xserver-xorg-video-s3-lts-quantal [Not Installed]                       
29)     xserver-xorg-video-savage-lts-quantal [Not Installed]                   
30)     xserver-xorg-video-siliconmotion-lts-quantal [Not Installed]            
31)     xserver-xorg-video-sis-lts-quantal [Not Installed]                      
32)     xserver-xorg-video-sisusb-lts-quantal [Not Installed]                   
33)     xserver-xorg-video-tdfx-lts-quantal [Not Installed]                     
34)     xserver-xorg-video-trident-lts-quantal [Not Installed]                  
35)     xserver-xorg-video-vesa-lts-quantal [Not Installed]                     
36)     xserver-xorg-video-vmware-lts-quantal [Not Installed]                   

      Leave the following dependencies unresolved:                              
37)     libgl1-mesa-glx-lts-quantal recommends libgl1-mesa-dri-lts-quantal (>= 7
38)     xserver-xorg-core-lts-quantal recommends libgl1-mesa-dri-lts-quantal (>=
39)     xserver-xorg-lts-quantal recommends libgl1-mesa-dri-lts-quantal         
40)     xserver-xorg-video-nouveau-lts-quantal recommends libgl1-mesa-dri-lts-qu


Accept this solution? [Y/n/q/?] 
The OS is Xubuntu 12.04 32 bit. None of the alternative solutions seems to be better. How do you pass this step?
alexsecret
Posts: 13
Joined: 2. May 2011, 05:32
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Debian, Xubuntu, Windows XP

Re: How to fix *ubuntu 12.04 black screen with 4.2.12

Post by alexsecret »

Hi,

This is strange. One of the two vm's I upgraded, was exactly the same as yours and everything went just fine. Are you sure you updated your system using apt-get update before starting installing those two packages? If yes, try apt-get dist-upgrade before installing them just to make sure all the necessary dependencies are installed.

A vm reboot might be needed after the dist-upgrade and before you install those two packages but you won't be informed about that in recovery mode so reboot your vm anyway just to be on the safe side. Install the upgrade packages afterwards.

Try that and tell my if it worked. ;-)
Nothing worth doing is easy!
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: How to fix *ubuntu 12.04 black screen with 4.2.12

Post by Perryg »

ABachmann
Posts: 5
Joined: 17. Apr 2013, 17:38

Re: How to fix *ubuntu 12.04 black screen with 4.2.12

Post by ABachmann »

Thank you, the 4.2.13 ISO works fine. :)
alexsecret
Posts: 13
Joined: 2. May 2011, 05:32
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Debian, Xubuntu, Windows XP

Re: How to fix *ubuntu 12.04 black screen with 4.2.12

Post by alexsecret »

ABachmann wrote:Thank you, the 4.2.13 ISO works fine. :)
If by saying "4.2.13 ISO" you mean some new Virtualbox version, where exactly did you find it? I certainly still see 4.2.12 as the latest one.
Nothing worth doing is easy!
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: How to fix *ubuntu 12.04 black screen with 4.2.12

Post by noteirak »

uneven number for the last part are used for beta/test versions, and only compiled and given out to non-dev people to test if a specific bugs is solved. A link to it is present in the bug ticket.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: How to fix *ubuntu 12.04 black screen with 4.2.12

Post by mpack »

noteirak wrote:A link to it is present in the bug ticket.
And also in the v4.2.12 discussion thread.
alexsecret
Posts: 13
Joined: 2. May 2011, 05:32
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Debian, Xubuntu, Windows XP

Re: How to fix *ubuntu 12.04 black screen with 4.2.12

Post by alexsecret »

noteirak wrote:uneven number for the last part are used for beta/test versions, and only compiled and given out to non-dev people to test if a specific bugs is solved. A link to it is present in the bug ticket.
Wow. Thank you very much. I didn't know that. :)
Nothing worth doing is easy!
Matt Cord
Posts: 1
Joined: 26. Apr 2013, 00:25

Re: How to fix *ubuntu 12.04 black screen with 4.2.12

Post by Matt Cord »

Thanks for the fix! :D
devops_ninja
Posts: 1
Joined: 7. May 2014, 22:11

Re: How to fix *ubuntu 12.04 black screen with 4.2.12

Post by devops_ninja »

Thanks a lot! I spent last four hours figuring this out until I found this post!!
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: How to fix *ubuntu 12.04 black screen with 4.2.12

Post by mpack »

The current version of VirtualBox is 4.3.10. It never crossed your mind to upgrade to one of the later versions (*) which would have included the fix? Instead you go looking for an old beta fix?

(*) 4.2.14, 4.2.16, 4.2.18, 4.2.20, 4.2.22, 4.2.24, 4.3.0, 4.3.2, 4.3.6, 4.3.8, 4.3.10.
Post Reply