I had a similar problem after I installed Xubuntu 11.10 on my computer. I didn't see the flashing between text mode and blank, but after the bootloader started to load the OS, the graphical splash screen suddenly disappeared, to be replaced by text-mode output on the boot process. I don't remember if I saw the could not write bytes message, but the final message written on the screen before the process froze was * Checking battery state...
I googled for help, and found this post: http://ubuntuforums.org/showthread.php?t=1859820
The solution given on that page was to do the following:
- Press Ctrl+Alt+F1 to get to a text-mode login prompt.
- Log in.
- Command
sudo apt-get install --reinstall nvidia-173
- Command
startx
When I did this, I got to the graphical login screen, and everything worked thereafter -- but only up to the next boot. My computer has an Nvidia graphics card, and for some reason, the drivers that come with the Xubuntu 11.10 distribution don't play well with it. (Someone on the ubuntuforums thread claims that it's due to "the kernel update from 2.8 to 3.0".)
As I said, this worked only up to the next time I booted; then I got the text-mode boot process display again, ending with the line * Checking battery state..., and then had to perform again the actions listed above.
Just now, I just read the ubuntuforums thread again, and noticed that someone advises that for 64-bit machines, such as mine, one should also reinstall the package nvidia-current. If that is the case (and perhaps in any case), you should probably try this:
- Press Ctrl+Alt+F1 to get to a text-mode login prompt.
- Log in.
- Command
sudo apt-get install --reinstall nvidia-current
- Command
sudo apt-get install --reinstall nvidia-173
- Command
startx
However, before I tried that, I solved the problem with my machine like this (note: this is in addition to reinstalling package nvidia-173):
- I edited the file
/etc/default/grub, and removed the comment character # from the start of the line #GRUB_TERMINAL=console. This will make GRUB2 use text mode instead of graphics mode when using the display. (I did this because GRUB2 was confused about how many lines were available for it in graphics mode, causing the text to scroll only after plenty of lines were "displayed" below the bottom edge of the screen.)
- I'm not sure if this has something to do with the solution, but earlier, I had already commented out the lines
GRUB_HIDDEN_TIMEOUT=0 and GRUB_HIDDEN_TIMEOUT_QUIET=true in /etc/default/grub, in order to get the GRUB2 menu appear in the first place.
- I commanded
sudo update-grub (necessary to take into use the changes done to /etc/default/grub).
- I rebooted.
For some reason, the boot problem went away.
If you see this answer, please try it and let us know if it helped you.