# Failed to set mtrr: Invalid argument



## Slable (May 6, 2015)

Hi FreeBSD forums,

I've followed several tutorials and I've searched the internet for solutions to this issue, but I haven't been able to come to a resolution. I'm trying to configure X and X11 forwarding to get a GUI on a machine, but after I run:
`Xorg -configure`

And then test it:
`X -config /root/xorg.conf.new`

I get the following output:

```
Initializing built-in extension DRI2
Loading extension GLX
failed to set mtrr: Invalid argument
```

It will load a bunch of extensions, but will freeze at the "failed to set mtrr" line. When I run `startx` or `xinit` from the command line I get a similar output:

```
Loading extension GLX
failed to set mtrr: Invalid argument
exec: start: not found
xinit: connection to X server lost

waiting for X server to shut down failed to unset mtrr: No such file or directory
(EE) Server terminated successfully (0). Closing log file.
```
The issue is definitely with the mtrr, I'm just not sure how to set it. Is there a particular line in the X config file I'm to set it in? I'd love a solution, but I also view this as a valuable learning opportunity as well. Any help would be appreciated. I'm using the Aspeed graphics controller that's built into the Supermicro board:

```
vgapci0@pci0:4:0:0:     class=0x030000 card=0x080115d9 chip=0x20001a03 rev=0x30 hdr=0x00
    vendor     = 'ASPEED Technology, Inc.'
    device     = 'ASPEED Graphics Family'
    class      = display
    subclass   = VGA
```
Thanks in advance!


----------



## kusanagiyang (Jun 8, 2016)

Hello Slable,

I have a similar situation like yours
sometimes after startx, on the terminal,

```
...
(==) Using config file: "etc/X11/xorg.conf"
failed to set mtrr: Invalid argument
No protocol specified

waiting for x server to begin accepting connections .
No protocol specified
..
No protocol specified
..
...
```
Searching around did not yield much results.  Do you have any further information?  Interestingly, this error does not always happen.  It goes away after a reboot.  Thanks ahead


----------



## cpm@ (Jun 8, 2016)

Hope this will shed some light here:

https://lists.freebsd.org/pipermail/freebsd-stable/2009-May/050104.html


----------



## chunkymonkey (Sep 2, 2018)

This worked for me in VirtualBox (meta-packages 'xorg' and 'xfce' already installed):

Edit /etc/rc.conf and add the line to the bottom:

```
dbus_enable="YES"
```
Reboot

Once rebooted, I logged in and typed in: startxfce4


----------

