Ubuntu 10.04 LiveCD and screen resolution?

Discussions about using Linux guests in VirtualBox.
Post Reply
avih
Posts: 13
Joined: 3. Jan 2010, 16:59
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Win, Linux, other
Contact:

Ubuntu 10.04 LiveCD and screen resolution?

Post by avih »

How can I use Ubunto 10.04 as a Live CD within VB and have a screen resolution higher than 800x600?

On 9.04 I had to start it in safe-mode, then edit /etc/X11/xorg.conf and add to the "Monitor" section: "HorizSync 31-67" and then "sudo restart gdm", but in 10.04 there isn't safe-mode anymore (so xorg.conf isn't available), and also, isn't it time that 2 great projects such as Ubuntu and VBox would work together right out of the box? Working only in 800x600 doesn't really cut it IMHO, and Live CD is a viable option when trying new distros. Installing the host additions doesn't work in such environment because it requires restart, which cancels the install when using a Live CD.

What's needs to change and where, such that Ubuntu recognizes more capabilities of the VBox display without the host additions?
Browse smoothly with the SmoothWheel extension for Firefox.
Machine spec.: E8400/4G/GTX260+/XP32/SP3
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Ubuntu 10.04 LiveCD and screen resolution?

Post by Perryg »

but in 10.04 there isn't safe-mode anymore
Sure there is. Hold the left shift down while booting

Running a live CD is always going to be small unless or until the guest additions are included in the live CD. That would be the responsibility of the OS. Seek them out and request they be included.
avih
Posts: 13
Joined: 3. Jan 2010, 16:59
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Win, Linux, other
Contact:

Re: Ubuntu 10.04 LiveCD and screen resolution?

Post by avih »

Perryg wrote: Sure there is. Hold the left shift down while booting
...
I can get to the boot menu, it just doesn't have the "safe-graphics-mode" option (which was previously available at the F4 menu from the boot menu). IIRC I read somewhere that I can add to the boot command "-single", but that didn't work for me either with 10.04 beta1. If you can describe the complete sequence to have a functional /etc/X11/xorg.conf file after booting, I'd appreciate it.

Perryg wrote: Running a live CD is always going to be small unless or until the guest additions are included in the live CD. That would be the responsibility of the OS. Seek them out and request they be included.
Not necessarily IMHO. There are other distros that can detect the display capabilities of VBox and offer the choice of various resolution. Puppy Linux comes to mind as one that offers to select a resolution/mode as the first thing you see after booting into X. It's definitely not the only one, however, most/all Ubuntu based distros don't.

Obviously, Ubuntu is unable to recognize the display capabilities without the guest additions installed, and I was wondering about 2 things:

1. Why? (i.e. Ubuntu bug? VBox bug? VBox exposes capabilities via a non-standard interface? deprecated/unsupported display bios? etc).

2. Can something be done on the VBox side of things? (needs compiling? editing config files? other user-settings? etc).

Testing A Live CD is a much more rapid and viable option than installing a distro just to test a single aspect of it, but being limited to 800x600 resolution severely limits the experience. I'd prefer it worked out of the box, and I'm willing to jump through some hoops to get it working, but currently I just can't make it work...

Any help would be appreciated (by more than just me I think - after all, Ubuntu/Virtualbox are probably the most popular apps within their domains in the OSS world... ).

I believe both would benefit if this works out of the box..
Browse smoothly with the SmoothWheel extension for Firefox.
Machine spec.: E8400/4G/GTX260+/XP32/SP3
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Ubuntu 10.04 LiveCD and screen resolution?

Post by Perryg »

While booting hold down the left shift to get grub. Then either select recovery mode or press e to enter edit mode and add your Kern Parms there.
avih
Posts: 13
Joined: 3. Jan 2010, 16:59
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Win, Linux, other
Contact:

Re: Ubuntu 10.04 LiveCD and screen resolution?

Post by avih »

What params should I enter to have a functional xorg.conf file after Ubuntu loads?

And besides, the other questions are more interesting I think...
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Ubuntu 10.04 LiveCD and screen resolution?

Post by Perryg »

10.04 does not have an xorg.conf file.
They have stopped using it as well as hal.
avih
Posts: 13
Joined: 3. Jan 2010, 16:59
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Win, Linux, other
Contact:

Re: Ubuntu 10.04 LiveCD and screen resolution?

Post by avih »

Thanks. So that's a "No" to safe-mode on Ubuntu 10.04 then?

This makes my other questions even more relevant...
Browse smoothly with the SmoothWheel extension for Firefox.
Machine spec.: E8400/4G/GTX260+/XP32/SP3
whit
Posts: 27
Joined: 20. Mar 2010, 20:39
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 10.04

Re: Ubuntu 10.04 LiveCD and screen resolution?

Post by whit »

Perryg wrote:10.04 does not have an xorg.conf file.
They have stopped using it as well as hal.
To be more precise, it's no longer required. But if you put one there, it will still be used. This is a separate thing than moving from HAL, and IIRC was in place earlier than 10.04. However, since my other systems have gone through upgrade cycles that kept their previous xorg.conf's, I've never learned the new way, and still rely on them.

The way to get full screen resolution is to have it include something like:
Section "Device"
    Identifier "Configured Video Device"
    Driver "vboxvideo"
    BusID "PCI:0:2:0"
EndSection

Section "Monitor"
    Identifier "Configured Monitor"
EndSection

Section "Screen
   Identifier "Default Screen"
   Monitor "Configured Monitor"
   Device "Configured Video Device"
   DefaultDepth 24
   Subsection "Display"
        Depth 24
        Modes "1024x600"
   EndSubsection
EndSection
For "Modes" of course put what's reasonable to choose from for your screen.

I believe only the Driver line is truly critical. I believe it defaults to "vesa", which doesn't have a full range of modern screen resolutions available to it.

Update: But the vboxvideo driver's probably one of the guest additions. Still, you should be able to go to shell, put in an xorg.conf file to work with your sync line as before, and then restart X.
whit
Posts: 27
Joined: 20. Mar 2010, 20:39
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 10.04

Re: Ubuntu 10.04 LiveCD and screen resolution?

Post by whit »

avih wrote:Testing A Live CD is a much more rapid and viable option than installing a distro just to test a single aspect of it, but being limited to 800x600 resolution severely limits the experience. I'd prefer it worked out of the box
The way Ubuntu seems to be set up is it drops to VESA with 800x600 if after running through its tests it can't suss out anything better after cycling through some drivers and modes. You can see that progress if you check the log at /var/log/Xorg.0. Not sure which drivers it attempts by default. It may be that adding a line to load a different module to grub would solve the problem, in the way hinted at by the moderator here. Then the question would be whether one of the stock modules with the Ubuntu live CD actually works with VB - which would have to be one that's available, but not attempted by default. Not sure if that's an empty set or not on the live CD.
whit
Posts: 27
Joined: 20. Mar 2010, 20:39
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 10.04

Re: Ubuntu 10.04 LiveCD and screen resolution?

Post by whit »

whit wrote:Still, you should be able to go to shell, put in an xorg.conf file to work with your sync line as before, and then restart X.
You can do that in a terminal within an X session by entering (as root, which you can do by first invoking "sudo -i")

ps aux | grep X | grep -v grep

which will show you which process id /usr/bin/X is running with. Then "kill ###" where ### is the first number in the line that that gave you, right after "root".

That will stop your current X session, which triggers gdm to start a new X session, and you should be in business.
avih
Posts: 13
Joined: 3. Jan 2010, 16:59
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Win, Linux, other
Contact:

Re: Ubuntu 10.04 LiveCD and screen resolution?

Post by avih »

Thanks whit :)

Actually, your biggest hint was that it still relates to xorg.conf if one exists. It seems it even has a file /etc/X11/xorg.conf.failsafe which only needs copying to xorg.conf at the same dir, and then add the sync line I noted on my 1st post. To restart x, Ubuntu provides an easy command: "restart gdm" (as root) and that's it.

Creating the xorg.conf file from the failsafe file + the sync line gives many resolutions - enough for tests (640x480 - 1600x1200), including 1680x1050 for a wide screen. Still doesn't cover my entire monitor, but that's definitely good enough :)

Still, it would have been nice if it would be able to offer the resolutions out of the box without tinkering with the config file. Is it possible that VB and Ubuntu guys solve this issue together?

Regardless, thx again for your help :)

FYI, the working xorg.conf file (with the modification) is:

Code: Select all

Section "Device"
    Identifier "Configured Video Device"
    Driver     "Vesa"
EndSection

Section "Monitor"
    Identifier  "Configured Monitor"
    HorizSync   31-67
EndSection

Section "Screen"
    Identifier  "Default Screen"
    Monitor     "Configured Monitor"
    Device      "Configured Video Device"
EndSection
Browse smoothly with the SmoothWheel extension for Firefox.
Machine spec.: E8400/4G/GTX260+/XP32/SP3
avih
Posts: 13
Joined: 3. Jan 2010, 16:59
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Win, Linux, other
Contact:

Re: Ubuntu 10.04 LiveCD and screen resolution?

Post by avih »

Also, for anyone interested, the same issue exists with Fedora (12) Live CD, and can be solved in a similar (but not identical) manner.

This xorg.conf file can be used in both Fedora (tested only version 12) and Ubuntu (10.04 and earlier), but it only allows resolutions up to 1280x1024. I guess that someone who understands more than me can easily make it work with higher res too. The previous file I posted allows higher resolutions but only works with Ubuntu.

Instructions for how to apply it are are available as comments at the beginning of the file.

Code: Select all

# Xorg configuration created by system-config-display
#avih:
#   1. fedora root: 'su -', OR, ubuntu: 'sudo su'
#   2. create this file: 'gedit /etc/X11/xorg.conf'
#     OR download it from a server (assuming the server is 10.0.0.1 and the file is the root file) :
#       fedora: 'curl 10.0.0.1  > /etc/X11/xorg.conf'
#       ubuntu: 'wget 10.0.0.1 -O /etc/X11/xorg.conf' (note the capital O)
#   3. restart X: Fedora: log off, Ubuntu (as root) 'restart gdm'

Section "ServerLayout"
    Identifier     "single head configuration"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Monitor"
    Identifier  "Configured Monitor"
    HorizSync   31-67
EndSection

Section "InputDevice"
# keyboard added by system-config-display
    Identifier  "Keyboard0"
    Driver      "kbd"
    Option      "XkbModel" "pc105+inet"
    Option      "XkbLayout" "us"
EndSection

Section "Device"
    Identifier  "Videocard0"
    Driver      "vesa"
#    Modes       "1024x768" "1280x1024" "1680x1050"
EndSection

Section "Screen"
    Monitor         "Configured Monitor"
    Identifier "Screen0"
    Device     "Videocard0"
    DefaultDepth     16
    SubSection "Display"
        Viewport    0 0
        Depth       24
    EndSubSection
    SubSection "Display"
        Viewport    0 0
        Depth       16
    EndSubSection
EndSection
Browse smoothly with the SmoothWheel extension for Firefox.
Machine spec.: E8400/4G/GTX260+/XP32/SP3
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Ubuntu 10.04 LiveCD and screen resolution?

Post by Sasquatch »

You might get what you need if you install the package virtualbox-ose-guest-x11 and restart X with /etc/init.d/gdm restart. This should work without the need of a full reboot, which as you said, would reset the whole thing.
There are also instructions in how to create your own live disc and you could integrate the package there. You can always do what Perry said and take it out to Lauchpad and create a wishlist item so the X modules are integrated in the live environment. Though the past has taught us that the OSE GA don't always work properly on a PUEL version or version mismatch (GA being newer than the VB version).
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
avih
Posts: 13
Joined: 3. Jan 2010, 16:59
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Win, Linux, other
Contact:

Re: Ubuntu 10.04 LiveCD and screen resolution?

Post by avih »

Thanks Sasquatch.

Your suggestions would probably work (along with other solutions suggested on this thread, e.g. the xorg.conf solution which is also now tested to work on the latest VB3.2.10 host with Ubuntu 10.10 live CD guest), however once possible solutions were found, the main remaining issue was the out-of-the-box experience for all those who don't search this forum and just expect it to work.

At Ubuntu's forums the issue was also raised, at least here and here (about GA, beyond just the resolution).

I still believe the best solution would be that the VB and Ubuntu guys discuss the issue, find exactly why Ubuntu doesn't allow resolutions more than 800x600 as VB guest, while other distros do (some better than others, i.e. Knoppix detects up to 1024x768, puppy allows anything, Fedora is similar to Ubuntu, etc), and possibly modify a config file or two such that it just works out of the box.

One solution I can think of is that if Ubuntu detects it's running as a VB guest, it would just create an xorg.conf file along the lines of the ones I posted earlier. This, however, won't solve the issue with other distros.

Another might be that the VB devs understand why it isn't detected properly on some distros and possibly change something at the VGA bios (I'm guessing here) such that it works better for a wider variety of guests. IMHO that would be the best solution.
Browse smoothly with the SmoothWheel extension for Firefox.
Machine spec.: E8400/4G/GTX260+/XP32/SP3
Post Reply