Asus M51SE video card won't work with 4GB RAM (BIOS bug ?)

Bug #316079 reported by Hugo Grostabussiat
40
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Linux
Fix Released
Medium
linux (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Dapper by Darryl Dixon
Nominated for Hardy by Hugo Grostabussiat
Nominated for Intrepid by Hugo Grostabussiat
Nominated for Jaunty by Hugo Grostabussiat
Nominated for Karmic by Darryl Dixon

Bug Description

A friend of mine has a Asus M51SE laptop shipped with 4 GB of RAM. It has a video card with 256 MB of video RAM (see the attached dmesg.log).
The problem is that the prefetchable 256 MB of video memory are not assigned nowhere, even if the memory range [c0000000:cfffffff] for which the card is configured is marked as free. Strangely, usplash works perfectly while X or directfb application cannot even start.
After searching, I found that the PCI bridge (00:01.0) holding the video card (01:00.0) was configured to use a prefetchable mmio window of [bdf00000, ddefffff], which is clearly more than enough because the video card is the only device behind this bridge. It looks like a BIOS bug.
So I wrote a patch to write the correct iomem window into the bridge's BARs before resource allocation and it seems to work.

Revision history for this message
Hugo Grostabussiat (bonstra) wrote :
Revision history for this message
Hugo Grostabussiat (bonstra) wrote :
Revision history for this message
Hugo Grostabussiat (bonstra) wrote :
Revision history for this message
Hugo Grostabussiat (bonstra) wrote :
Revision history for this message
Hugo Grostabussiat (bonstra) wrote :
Revision history for this message
Hugo Grostabussiat (bonstra) wrote :

Here comes the patch. Just append it to arch/x86/pci/fixup.c
Once you have compiled your kernel with the fix, add "asus-m51se-pci-quirk" to the kernel boot arguments to activate.

Revision history for this message
Onichan (onichan88) wrote :

Hello Hugo, Can you tell if I can use this patch in a 64 bit linux version? if not, can you provide the patch mod for 64 bit version?
Thanks a lot!!!

Revision history for this message
Hugo Grostabussiat (bonstra) wrote :

Hi Onichan,
I couldn't test my patch for a 64 bit kernel, but it should work. Just append the patch content to arch/ia64/pci/fixup.c instead.
Don't forget to add "asus-m51se-pci-quirk" to your kernel commandline or it won't be activated.
If it works, please report it here.
Thanks.

Revision history for this message
Iacopo (iaps79) wrote :

Hi Hugo,
many thanks for your patch. It works great with Ubuntu Intrepid 64-bit (kernel 2.6.27-12).
Cheers

Revision history for this message
Darryl Dixon (esrever-otua) wrote :

I also confirm that the patch works - Asus m51se with 3GB physical memory, patch applied to 2.6.27-11 and 64bit kernel built and installed and booting to full GUI fine now.

Revision history for this message
b4b1z (ssxmaniac) wrote :

Hi Hugo, I try last night your quirks on Ubuntu 9.04 Jaunty 32-bit (kernel 2.6.28.9) recompiled on-the-fly ,
I loading /boot/config-2.6.28-11-generic with "gconfig", set Core2 processor type and preemtible kernel, I copyed quirks at the end of arch/x86/pci/fixup.c, make kernel pakages, install it, works!! WOW :D :D
X server boot up! yeah!

But I have little question, why gnome-system-monitor report only 3 gb ? I more try "sun Virtualbox" and this report 3584 mb of usable ram, (I'ts very strange for my little know) of course I set up virtual memory for my winxp-vm installation and it's rocket speed :)

b4b1z@ssx-maniac:~$ sudo phoronix-test-suite system-info

====================================
Phoronix Test Suite v1.6.0 (TYDAL)
System Information
====================================

Hardware:
Processor: Intel Core 2 Duo CPU T8300 @ 2.40GHz (Total Cores: 2), Motherboard: ASUSTeK M51SE, Chipset: Intel Mobile PM965/GM965/GL960 + ICH8M,
System Memory: 2 x 2048 MB DDR2-667MHz,
Disk: 250GB WDC WD2500BEVS-22UST0,
Graphics: ATI Mobility Radeon HD 3400 Series 256MB (680/500MHz),
Screen Resolution: 1280x800

Software:
OS: Ubuntu 9.04, Kernel: 2.6.28.9core2.4gb-patch (i686),
Desktop: GNOME 2.26.1,
Display Server: X.Org Server 1.6.0,
Display Driver: fglrx 8.60.3, OpenGL: 2.1.8591,
Compiler: GCC 4.3.3, File-System: ext3

b4b1z@ssx-maniac:~$ sudo phoronix-test-suite diagnostics

====================================
Phoronix Test Suite v1.6.0 (TYDAL)
Diagnostics Dump
====================================
End-User Run-Time Variables:
VIDEO_RESOLUTION = 1280x800
VIDEO_CARD = ATI Mobility Radeon HD 3400 Series 256MB
VIDEO_DRIVER = 2.1.8591
OPERATING_SYSTEM = Ubuntu 9.04
PROCESSOR = Intel Core 2 Duo CPU T8300 @ 2.40GHz
MOTHERBOARD = ASUSTeK M51SE
CHIPSET = Intel Mobile PM965/GM965/GL960 + ICH8M
KERNEL_VERSION = 2.6.28.9core2.4gb-patch
COMPILER = GCC 4.3.3
HOSTNAME = ssx-maniac

Environmental Variables (accessible via test scripts):
PTS_TYPE = DESKTOP
PTS_VERSION = 1.6.0
PTS_CODENAME = TYDAL
PTS_DIR = /usr/share/phoronix-test-suite/
FONT_DIR = /usr/share/phoronix-test-suite/pts-core/results-viewer/fonts/
PHP_BIN = php5
NUM_CPU_CORES = 2
NUM_CPU_JOBS = 4
SYS_MEMORY = 3024
VIDEO_MEMORY = 256
VIDEO_WIDTH = 1280
VIDEO_HEIGHT = 800
VIDEO_MONITOR_COUNT = 1
VIDEO_MONITOR_LAYOUT = CENTER
VIDEO_MONITOR_SIZES = 1280x800
OPERATING_SYSTEM = ubuntu
OS_VERSION = 9.04
OS_ARCH = i686
OS_TYPE = Linux
THIS_RUN_TIME = 1241010815

how to do a SYS_MEMORY up to 3024 ? it's really needed?

Best Regards, Ballis Nicola.
(sorry 4 bad english)

Revision history for this message
b4b1z (ssxmaniac) wrote :
Revision history for this message
Hugo Grostabussiat (bonstra) wrote :

Hello b4b1z,

What you describe here is a common problem with 32 bit systems equipped with 4 GB of RAM (or more).
When running in 32 bit mode, the processor only have access to 4 GB of physical memory. The reason why you can only use 3 GB of them is that the last GB of memory is used by PCI devices to provide access to their internal memory (e.g. the video memory of your graphics card).
If you have a look at your /proc/iomem, you can see that there is no System RAM beyond 0xbffa0000 because all the space is used by PCI devices or reserved by the BIOS.
A feature present on most recent processors allow to extend the processor's physical address space up to 64 GB so you can have access to your whole physical memory. It is called Physical Address Extension (PAE) and is supported by Linux.
To enable it, you will need to reconfigure your kernel. Search for "High Memory Support" in "Processor type and features" and select "64 GB" (HIGHMEM64G) some additional configuration options should appear, the interesting one is labeled "PAE (Physical Address Extension) Support", enable it and start the compilation process.

I hope that will help.
Regards.

Revision history for this message
Hugo Grostabussiat (bonstra) wrote :

Confirmed for at least 4 persons.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Hugo Grostabussiat (bonstra) wrote :

I updated the patch so your laptop model gets detected automatically using a DMI rule match. So there's no need to add the asus-m51se-pci-quirk in kernel boot arguments.
The method to patch the kernel didn't changed (append the patch content to arch/[your_arch]/pci/fixup.c).

Revision history for this message
Hugo Grostabussiat (bonstra) wrote :

I updated the patch so your laptop model gets detected automatically using a DMI rule match. So there's no need to add the asus-m51se-pci-quirk in kernel boot arguments.
The method to patch the kernel didn't changed (append the patch content to arch/[your_arch]/pci/fixup.c).

Revision history for this message
Hugo Grostabussiat (bonstra) wrote :

Sorry, as I got an error message when posting, I tried again several times and unfortunately the comments were actually posted even if it returned an error each time.

Revision history for this message
Hugo Grostabussiat (bonstra) wrote :

The fix seems ok to be released. Asus M51Se PCs should work out of the box with it.

Changed in linux (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Hugo Grostabussiat (bonstra) wrote :

I just noticed that I didn't choose the right status.

Changed in linux (Ubuntu):
status: Fix Released → In Progress
Revision history for this message
b4b1z (ssxmaniac) wrote :

Today I try to recompile kernel (using Linux kernel source for version 2.6.28)
whit new patch of Hugo, and support to high memory & PAE,
(follow Yours directives https://bugs.launchpad.net/ubuntu/+source/linux/+bug/316079/comments/13 )
and some others things like 1000hz timing and more removed unused driver module... it's work out perfectly, Ubuntu now fly same as rocket!!! haha :D and seen correct size of ram.

 Many thanks Hugo! :) :) :)

Revision history for this message
Francesco Garosi (franzg) wrote :

Hi, I've been using your patch for months now, on a 8.04 version of Ubuntu (2.6.24-23-generic), because of its LTS status. Do you know whether or not the patch will be applied to that release too in further updates? Thank you.

F.

Revision history for this message
Francesco Garosi (franzg) wrote :

Sorry, just saw you nominated it. I'm still not so used to LP's way...

F.

Revision history for this message
FASTART (kamen-dim) wrote :

Hello.
 Can you explain how to add your patch and compile kernel?
I tried 2 times but get many errors while applyng steps from https://help.ubuntu.com/community/Kernel/Compile#Modify%20the%20source%20for%20your%20needs
Please help me.

Revision history for this message
StalkR (stalkr) wrote :

Works great with ASUS m51se-as018c (3GB ram), ubuntu Jaunty (i686), kernel 2.6.29.4 from kernel.org.
Thank you very much Hugo for your patch.

Revision history for this message
Gianluca Iannella (gianlucaiannella) wrote :

Hi, it works great also with my Asus Asus M51SE-AP042C (3 GB ram) ubuntu JJ 32 bit version with kernel 2.6.28.9 from repository.

@FASTART: hi, try use this http://easylinuxcds.com/blog/?p=3244

Revision history for this message
FASTART (kamen-dim) wrote :

Thank you Ianella Gianluca. This is work greatly! I am with ASUS M51SE-AP066 (4GB RAM) and now it`s just work :) I attached screen of my desktop :)

Revision history for this message
Gianluca Iannella (gianlucaiannella) wrote :

Here is a guide for those who are beginners to apply a patch.
http://www.bellaboratories.altervista.org/?p=85

Revision history for this message
Lucea (ubuntu-lucea) wrote :

Thank you very much.
I folowed this guide and everything goes well now.
I just had a problem with nvidia-common when compiling the kernel.
I just use: sudo apt-get purge nvidia-common and it works (see Bug #303795 https://bugs.launchpad.net/ubuntu/+source/nvidia-common/+bug/303795)

Asus M51SE-AS128C

Revision history for this message
xado (xado) wrote :

Hi Hugo,
sorry my question, which now has become repetitive, but when you plan to include the patch in the main branch of the kernel? It is becoming stressful recompile all times :(

tags: added: asus bios pci video
summary: - Asus M51SE's video card won't work with 4GB RAM (BIOS bug ?)
+ Asus M51SE video card won't work with 4GB RAM (BIOS bug ?)
tags: added: hw-specific
Changed in linux (Ubuntu):
status: In Progress → Confirmed
Changed in linux:
status: Unknown → In Progress
Revision history for this message
Hugo Grostabussiat (bonstra) wrote :

Hello xado,
to be honest, I don't know when this fix will be released. I think things will speed-up when someone of the Kernel Bugs team notice this bug.
On another side, a similar bug report exists upstream with another fix, but it's still in progress.

Revision history for this message
xado (xado) wrote :

hi hugo, ok, then I continue to wait and hope that the wait is short. thanks a lot for your Availability.

Revision history for this message
StalkR (stalkr) wrote :

Hello,
Thank you Hugo for the update. As xado, I am eager to see this issue solved in the kernel.
I'm using your patch on Ubuntu Jaunty for 3 month now, with proprietary ATI drivers (fglrx), and it works perfectly.

Revision history for this message
xado (xado) wrote :

Hi Hugo,
I asked and they answered that it'll be released into kernel 2.6.31

Revision history for this message
Hugo Grostabussiat (bonstra) wrote :

xado: That's good news, this means that the problem will more than certainly be fixed in Ubuntu Karmic.

Revision history for this message
xado (xado) wrote :

well, read here in the bug page http://bugzilla.kernel.org/show_bug.cgi?id=11103

Revision history for this message
Hugo Grostabussiat (bonstra) wrote :

I tested the Ubuntu 9.10 beta live CD, the issue seems fixed.
Enjoy.

Revision history for this message
Gianluca Iannella (gianlucaiannella) wrote :

I upgraded from 9.04 to 9.10 and the result is.... all seems working. No need Patching :)

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Per comment #45 from Hugo (the original bug reporter) I'm marking this Fix Released against Karmic. Thanks.

Changed in linux (Ubuntu):
status: Confirmed → Fix Released
Changed in linux:
status: In Progress → Incomplete
Changed in linux:
status: Incomplete → Fix Released
Changed in linux:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.