# Xorg Configuration: xrandr "Can't open display output" error



## mallniya (May 3, 2016)

Hey forum,
I have a box with Intel i3-2365M and according to https://wiki.freebsd.org/Graphics it should work with FreeBSD 10.3 just fine. So as usual I took https://www.freebsd.org/doc/handbook/x-config.html and without problems get to "5.4.6. Monitors" (`startx` works). At this point a problem is `xrandr` under root yields "Can't open display output".
Digging through forum and googling didn't give a clue what is wrong.
I tried to define BusID according to `pciconf` -- did not help. I tried to use xorg.conf in /usr/local/etc/X11/ which was generated by `Xorg -configure` (attached) -- same result.
I feel like I'm missing something essential. Please, help.
Xorg.0.log attached.


----------



## wblock@ (May 3, 2016)

"A box" does not narrow it down much.  Please be more specific, as some models have hybrid graphics with multiple GPUs.

Please do not attach files.  Small files like X configuration files should be included inline in code tags.  Put large files like log files on the web somewhere (pastebin.com, for example) and post a link.

Finally, show the output of `xrandr`.  Note: xrandr(1) must be used as the user running X.  This should not be root.


----------



## Phishfry (May 3, 2016)

The i3-2365 is a low voltage BGA chip. Chances are this is a tablet or UMPC. I would doubt it has a secondary graphics adapter.
I do see Lenovo, Asus and Acer laptops used them.


----------



## mallniya (May 3, 2016)

Phishfry said:


> The i3-2365 is a low voltage BGA chip. Chances are this is a tablet or UMPC. I would doubt it has a secondary graphics adapter.
> I do see Lenovo, Asus and Acer laptops used them.


Phishfry, you are right -- target box is Acer Iconia W700, tablet (please let alone WHY I want run FreeBSD on it). So, wblock@, there is no hybrid graphic.
`xrandr` output (both for root and user, which I add to the wheel group) is "Can't open display output".
Sorry for attachments, here is my first xorg configuration made by hand:

```
Section "Device"
   Identifier "Card0"
#   Driver     "vesa"
   Driver "intel"
   BusID "PCI:0:2:0"
EndSection
```
And there is automatically generated xorg.conf (which I also tried to use):

```
Section "ServerLayout"
   Identifier  "X.org Configured"
   Screen  0  "Screen0" 0 0
   InputDevice  "Mouse0" "CorePointer"
   InputDevice  "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
   ModulePath  "/usr/local/lib/xorg/modules"
   FontPath  "/usr/local/share/fonts/misc/"
   FontPath  "/usr/local/share/fonts/TTF/"
   FontPath  "/usr/local/share/fonts/OTF/"
   FontPath  "/usr/local/share/fonts/Type1/"
   FontPath  "/usr/local/share/fonts/100dpi/"
   FontPath  "/usr/local/share/fonts/75dpi/"
EndSection

Section "Module"
   Load  "glx"
EndSection

Section "InputDevice"
   Identifier  "Keyboard0"
   Driver  "kbd"
EndSection

Section "InputDevice"
   Identifier  "Mouse0"
   Driver  "mouse"
   Option    "Protocol" "auto"
   Option    "Device" "/dev/sysmouse"
   Option    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
   Identifier  "Monitor0"
   VendorName  "Monitor Vendor"
   ModelName  "Monitor Model"
EndSection

Section "Device"
  ### Available Driver options are:-
  ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
  ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
  ### <percent>: "<f>%"
  ### [arg]: arg optional
  #Option  "NoAccel"     # [<bool>]
  #Option  "AccelMethod"     # <str>
  #Option  "Backlight"     # <str>
  #Option  "DRI"     # <str>
  #Option  "ColorKey"     # <i>
  #Option  "VideoKey"     # <i>
  #Option  "Tiling"     # [<bool>]
  #Option  "LinearFramebuffer"    # [<bool>]
  #Option  "SwapbuffersWait"     # [<bool>]
  #Option  "TripleBuffer"     # [<bool>]
  #Option  "XvPreferOverlay"     # [<bool>]
  #Option  "HotPlug"     # [<bool>]
  #Option  "ReprobeOutputs"     # [<bool>]
  #Option  "XvMC"     # [<bool>]
  #Option  "ZaphodHeads"     # <str>
  #Option  "TearFree"     # [<bool>]
  #Option  "PerCrtcPixmaps"     # [<bool>]
  #Option  "FallbackDebug"     # [<bool>]
  #Option  "DebugFlushBatches"    # [<bool>]
  #Option  "DebugFlushCaches"     # [<bool>]
  #Option  "DebugWait"     # [<bool>]
  #Option  "BufferCache"     # [<bool>]
   Identifier  "Card0"
   Driver  "intel"
   BusID  "PCI:0:2:0"
EndSection

Section "Screen"
   Identifier "Screen0"
   Device  "Card0"
   Monitor  "Monitor0"
   SubSection "Display"
     Viewport  0 0
     Depth  1
   EndSubSection
   SubSection "Display"
     Viewport  0 0
     Depth  4
   EndSubSection
   SubSection "Display"
     Viewport  0 0
     Depth  8
   EndSubSection
   SubSection "Display"
     Viewport  0 0
     Depth  15
   EndSubSection
   SubSection "Display"
     Viewport  0 0
     Depth  16
   EndSubSection
   SubSection "Display"
     Viewport  0 0
     Depth  24
   EndSubSection
EndSection
```
Link to the Xorg.0.log: http://pastebin.com/fyxmW66m


----------



## wblock@ (May 4, 2016)

Please don't use an autogenerated xorg.conf.

The root user usually can't do X stuff because the DISPLAY variable is not set.  Nor should it be.

I would delete /etc/X11/xorg.conf and /usr/local/etc/X11/xorg.conf.  Then, as the normal user, not root, `startx`, then type `xrandr`.


----------



## mallniya (May 4, 2016)

That worked (even with autogenerated xorg.conf), but with one additional stupid little detail -- I typed `xrandr` in an xterm inside x-session instead one of system terminals. Why can't I reach same result from system terminal? And why such peculiarity doesn't noted in handbook...
Anyway, thank you.


----------



## wblock@ (May 4, 2016)

xrandr(1) requires X to be running.  It might work from a terminal console if DISPLAY is set, but it never occurred to me to try.


----------

