dimkr / rlsd

A lightweight, retro Linux-libre distro
http://rlsd.dimakrasner.com
MIT License
72 stars 7 forks source link

No drivers for *some* virtual GPUs #35

Closed dimkr closed 10 years ago

josefnpat commented 10 years ago

+1, would love to try this in virtualbox!

dimkr commented 10 years ago

I added several virtual GPU drivers. If the next snapshot doesn't fix this issue, re-open the issue.

ghost commented 10 years ago

Tried snapshot rlsd-18092014-x86_64-bios on VirtualBox. The issue is not fixed. Suggested solution in #36 still works.

dbohdan commented 10 years ago

@peterhull90: same for me on VirtualBox. What has changed is that it now works under QEMU 1.6 when it didn't use to.

ghost commented 10 years ago

Any idea where the problem lies? - Isolinux or the kernel itself (the recent fix was to the kernel config, wasn't it?). I've booted plan9, netbsd, haiku, other linuxes with VB and never had this, so I don't know where to look

dimkr commented 10 years ago

It's all about missing drivers. There is a possibility that VMs require out-of-tree drivers for KMS under VirtualBox - I'll do another round of research.

dimkr commented 10 years ago

Just found http://www.phoronix.com/scan.php?page=news_item&px=MTAxOTk - it seems KMS support is provided by the guest additions, as I suspected. I remembered it tries to build some kernel module when you install them, while VMWare's solution is a big bunch of pre-built binaries.

Interesting, maybe we can take the driver code from https://www.virtualbox.org/browser/vbox/trunk#src/VBox/Additions/linux/drm and integrate it into the kernel source (under video/).

ghost commented 10 years ago

I agree, that is the best way to go, to get optimum video performance. But, I think it should be possible for RLSD to fall back to using generic VESA framebuffer support.

It must be nearly there, because

I do want to help but I need some advice on where to start. Any idea where I could ask?

dimkr commented 10 years ago

When you add the "video=" parameter, it enables the generic VESA framebuffer. Are you sure DSL works fine in VirtualBox without this?

ghost commented 10 years ago

I tried DSL 4.4.10 (ISO) with VirtualBox 4.3.12. Without any tweaking from me it shows a graphical boot screen, then boots into X.

On Fri, Sep 19, 2014 at 3:49 PM, Dima Krasner notifications@github.com wrote:

When you add the "video=" parameter, it enables the generic VESA framebuffer. Are you sure DSL works fine in VirtualBox without this?

— Reply to this email directly or view it on GitHub https://github.com/dimkr/rlsd/issues/35#issuecomment-56187203.

dimkr commented 10 years ago

Try to remove "vga=791". As far as I understand, it won't work without this parameter.

EDIT: I'm trying to get the patch from http://www.murga-linux.com/puppy/viewtopic.php?t=78993 to work. It's ugly and hacky C to my taste, though.

dimkr commented 10 years ago

My first attempt doesn't seem to work - it enables a framebuffer console with the maximum resolution and depth (as it should), but then the kernel hangs. I'm compiling another kernel, this time with fixes for several bugs I found just by reading my code, after (some) sleep.

dimkr commented 10 years ago

See 62a7d41616d4f794645757f5ea4f9508bfe90ae0. I built the minimal flavor and booted it on my Eee PC, with "i915.modeset=0". Unlike a normal kernel, this one enabled a framebuffer console with the maximum resolution automatically. It also worked on Qemu, but I cannot test it against VirtualBox at the moment, because I'm on a Celeron (VTX incapable) machine.

I changed the daily build cycle so the next build (20092014) is being built right now. Can you test it once it's available, please?

EDIT: I tested the 64-bit 20092014 against my UEFI laptop, in both UEFI and legacy boot. It seems to work fine. However, under VirtualBox, it sets up a framebuffer console and X starts (yay!), but the color depth is low (below 16-bit) and everything looks way too retro :)

ghost commented 10 years ago

Tried with rlsd-21092014-i686-bios.iso

Result: it does boot graphically - I see the penguin logo then it goes into X, but it isn't the best mode that it's capable of - looks almost like VGA (dithered pixels, low resolution). I've had a look at /var/log/messages and there seem to be some differences between the 'auto' case, and using an explicit vga=nnn parameter.

I will report further (no time now, sorry)

rlsd

dbohdan commented 10 years ago

Same result with rlsd-21092014-i686-bios.iso.

dimkr commented 10 years ago

Great! That's good progress.

Can you boot an older version with "vga=ask" and send me a screenshot of the output? I need that list of modes.

EDIT: I'll note this so you don't waste your time for nothing - it must be an older version, since yesteday's (20092014) and later versions perform automatic probing with "vga=ask".

EDIT 2: I'm currently testing a second version of the patch, which ignores all text modes (where mi->depth is 0) and picks the mode with the biggest ID. I want to make sure this approach makes sense, that's why I need your vga=ask output.

EDIT 3: wow, VirtualBox is a tough nut. Tried four different approaches and all produce the same result: a small resolution with a low color depth. Time for heavier debugging.

dimkr commented 10 years ago

OK, I finally found out why this happens, after hours of debugging (it's almost 1 AM here) - the VirtualBox VESA BIOS reports it supports only 640x480 at 8bpp.

Does the trick at http://superuser.com/questions/478901/change-macos-x-guest-screen-resolution-for-virtualbox work for you? For me, it doesn't (under Ubuntu 14.04).

ghost commented 10 years ago

Probably too late, but: rlsd2

dimkr commented 10 years ago

Thanks! Same as the output on my VirtualBox.

It seems the magical resolution guessing function sees only 640x480x8. Any idea why this could happen?

EDIT: I think I found the problem - I think it's a typo. I feel ashamed.

EDIT 2: problem solved. I'll commit once I test it on two physical machines, VirtualBox and Qemu.

ghost commented 10 years ago

Great, thanks working on this. Can you let me know, which is the first build that will have this applied? I will test it too.

dimkr commented 10 years ago

The next one (23092014) should be the first to incorporate this fix.

dbohdan commented 10 years ago

rlsd-23092014-i686.iso runs at 1600x1200 for me.

new screenshot

ghost commented 10 years ago

Also 1600x1200@32 for me.