Bug 45066

Summary: 'failed to set mtrr: No space left on device' is printed on some systems during xorg startup
Product: xorg Reporter: Yuri <yuri>
Component: Lib/pciaccessAssignee: Adam Jackson <ajax>
Status: RESOLVED MOVED QA Contact: Xorg Project Team <xorg-team>
Severity: major    
Priority: medium CC: jeremyhu, matthieu.herrb
Version: unspecified   
Hardware: x86 (IA32)   
OS: FreeBSD   
Whiteboard: 2012BRB_Reviewed
i915 platform: i915 features:

Description Yuri 2012-01-21 20:03:41 UTC
I find this message in kdm.log on FreeBSD-9.0 when I try to start kde4.

Investigating a bit, I got this information:

This message is printed by package libpciaccess-0.12.1, file
src/freebsd_pci.c in it. Rebuilding this package doesn't help.

The error 'failed to set mtrr: No space left on device' results from
system call ioctl(fd, MEMRANGE_SET, &mro) @ freebsd_pci.c:146.
fd there is the fd for /dev/mem
Parameters of this ioctl call are (mro.r.mr_base=40000000
mro.r.mr_len=10000000 mro.r.mr_flags=2 mro.r.mr_owner="pciacces"
mro.mo_arg[0]=0 mro.mmo_arg[1]=0)

This system only has 1GB memory, mr_base=40000000 is already at 1GB, so
mr_len=10000000 makes it out of range? That's why it maybe failed.


This issue is also mentioned in FreeBSD PR#ports/164350

libpciaccess-0.12.1
Comment 1 Jeremy Huddleston Sequoia 2012-06-12 03:33:41 UTC
ajax, can you take a look at this.
Comment 2 Adam Jackson 2012-07-19 22:32:51 UTC
I'm not a FreeBSD person, but I'd expect -ENOSPC to mean that you're already out of MTRRs.
Comment 3 Matthieu Herrb 2012-08-12 17:24:06 UTC
Seeing that too on OpenBSD with a thinkpad X220. I confirm that it's caused by the MTRR table beeing full already (filled by BIOS) when starting X.
Comment 4 GitLab Migration User 2018-08-10 20:18:32 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/lib/libpciaccess/issues/2.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.