Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
xorg.conf improvements
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message

Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Tue Jun 28, 2016 2:29 pm    Post subject: xorg.conf improvements Reply with quote

Hi, I appreciate any suggestions or hints.

I have a notebook. I'd like to have always the internal screen set as primary display device.

For some reason the external monitor, VHT PV1710, does not report properly the vertical refresh rate. When the power is not plugged in even the resolution is wrong, 1024x768 instead of desired 1280x1024.


So when I have connected my external monitor and start my login manager, lxdm, the external screen is selected with a too high vertical refresh rate and the screen is black.


A workaround is to plug in the monitor after I have logged in via lxdm.
Than I configure the setup wtih nvidia-settings temporarily


This is the suggestion of nvidia-settings

S# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 367.27  (portage@ASUS-G75VW)  Di 28. Jun 09:00:47 CEST 2016

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"

Section "Files"

Section "InputDevice"
    # generated from data in "/etc/conf.d/gpm"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol"
    Option         "Device" "/dev/input/mice"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Chi Mei Optoelectronics corp."
    HorizSync       44.0 - 67.0
    VertRefresh     40.0 - 60.0
    Option         "DPMS"

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 660M"

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "LVDS-0: nvidia-auto-select +1024+0, VGA-0: 1024x768_72 +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24



*) internal screen, called lvds always as primary display device

I wonder where in this premade config from the nvidia-settings tool defines the primary device.

*) external screen only when its connected and the descriptor fits 1280x1024 or 1024x768


Only when the external USB mouse is not connected should the internal touchpad be activated.

While typing on the internal keyboard the touchpad should be temporarily disabled. (I wonder how?)

I disable with a keycombo the touchpad manually via i3config

#toggle the touchpad
bindsym XF86TouchpadToggle exec " if [ $(synclient -l | grep TouchpadOff | awk '{print $3}') == 1 ] ; then synclient touchpadoff=0; else  synclient touchpadoff=1; fi "


How can I set mednafen fullscreen only at my external screen?

Alternatively if I could incresae the window size a bit I would be happy. I tried a bit but nope.

As workaround i use the external screen in 1024x768 instead of 1280x1024.

IT seems to be a feature to set the window size ( Video Mode: 720 x 480 x 32 bpp) but no idea how.

Starting Mednafen
 Build information:
   Compiled with gcc 5.3.0
   Compiled against zlib 1.2.8, running with zlib 1.2.8(flags=0x000000a9)
   Compiled against SDL 1.2.15, running with SDL 1.2.15
   Running with libsndfile-1.0.26
 Base directory: /home/roman/.mednafen
 Internal emulation modules: nes snes gb gba pce pce_fast lynx md pcfx ngp psx vb wswan sms gg cdplay demo
 External emulation modules:
 Loading settings from "/home/roman/.mednafen/mednafen-09x.cfg"...
  Loaded 2966 valid settings and 0 unknown settings.
 Initializing joysticks...
  Joystick 0 - Jess Tech Dual Analog Pad - Unique ID: *removed, maybe unique hardware id **
 Loading **** ...
  Applying IPS file "**"...
   Failed: Error opening file "./**": No such file or directory
  Using module: gba(GameBoy Advance)
   Loading override settings from "/home/roman/.mednafen/gba.cfg"...
    Failed: Error opening file "/home/roman/.mednafen/gba.cfg": No such file or directory
   Loading override settings from "***"...
    Failed: Error opening file "***": No such file or directory

   ROM:       16384KiB
   ROM CRC32: 0x748f73c8
   ROM MD5:   0xcf57ab4d143b4a77022f2bb5fbd95a9c

  Loading custom palette from "/home/roman/.mednafen/palettes/gba.pal"...
   Error: Error opening file "/home/roman/.mednafen/palettes/gba.pal": No such file or directory

  Loading cheats from /home/roman/.mednafen/cheats/gba.cht...
   Error opening file "/home/roman/.mednafen/cheats/gba.cht": No such file or directory
 Initializing video...
  Video Driver: OpenGL
  Video Mode: 720 x 480 x 32 bpp
  Pixel shader: none
  Fullscreen: No
  Special Scaler: None
  Scanlines: Off
  Destination Rectangle: X=0, Y=0, W=720, H=480
  OpenGL Implementation: NVIDIA Corporation GeForce GTX 660M/PCIe/SSE2 4.5.0 NVIDIA 367.27
  Checking extensions:
   GL_ARB_texture_non_power_of_two found.
   GL_ARB_sync found.
  Using non-power-of-2 sized textures.
  Checking maximum texture size...
   Apparently it is at least: 16384 x 16384
  Using GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV for texture source data.


I play with my gamepad on my external screen and read webpages on my primary screen.

Possible configuration options are xorg.configs or via i3wm.config maybe.


My configs:

ASUS-G75VW roman # cat /etc/X11/xorg.conf.d/20opengl.conf
Section "Files"
   ModulePath "/usr/lib32/xorg/modules"
   ModulePath "/usr/lib64/opengl/nvidia"
   ModulePath "/usr/lib64/xorg/modules"
ASUS-G75VW roman # cat /etc/X11/xorg.conf.d/nvidia.conf
Section "Device"
         Identifier  "nvidia"
         Driver      "nvidia"
         Option "Coolbits" "28"
         Option "NoLogo" "True"

# This is a trailing line, it is needed so that End Section is not the last line

wgetpaste /var/log/Xorg.0.log
Your paste can be seen here:


This is an ASUS G75VW notebook. GPU is directly connected to the LVDS, VGA, minidisplayport, hdmi. The intel gpu crap is not used and not wired. Thanks god.


I am quite sure when I add those monitor sections the external screen may work.

How does the x-server knows that I want to use the internal screen as primary screen?

I have to look up later on how to improve my setup.

Maybe someone can give me a hint / insight or another point of view on how to solve this.



If the driver does not properly detect a second monitor, you can force it to do so with ConnectedMonitor.

Section "Monitor"
Identifier "Monitor1"
VendorName "Panasonic"
ModelName "Panasonic MICRON 2100Ex"
HorizSync 30.0 - 121.0 # this monitor has incorrect EDID, hence Option "UseEDIDFreqs" "false"
VertRefresh 50.0 - 160.0
Option "DPMS"

Section "Monitor"
Identifier "Monitor2"
VendorName "Gateway"
ModelName "GatewayVX1120"
HorizSync 30.0 - 121.0
VertRefresh 50.0 - 160.0
Option "DPMS"

Section "Device"
Identifier "Device1"
Driver "nvidia"
Option "NoLogo"
Option "UseEDIDFreqs" "false"
Option "ConnectedMonitor" "CRT,CRT"
VendorName "NVIDIA Corporation"
BoardName "GeForce 6200 LE"
BusID "PCI:3:0:0"
Screen 0

Section "Device"
Identifier "Device2"
Driver "nvidia"
Option "NoLogo"
Option "UseEDIDFreqs" "false"
Option "ConnectedMonitor" "CRT,CRT"
VendorName "NVIDIA Corporation"
BoardName "GeForce 6200 LE"
BusID "PCI:3:0:0"
Screen 1

The duplicated device with Screen is how you get X to use two monitors on one card without TwinView. Note that nvidia-settings will strip out any ConnectedMonitor options you have added.


edit 2:


edit 3:

Gaming using TwinView

In case you want to play fullscreen games when using TwinView, you will notice that games recognize the two screens as being one big screen. While this is technically correct (the virtual X screen really is the size of your screens combined), you probably do not want to play on both screens at the same time.

For OpenGL, add the appropriate Metamodes to your xorg.conf in section Device and restart X:
Option "Metamodes" "1680x1050,1680x1050; 1280x1024,1280x1024; 1680x1050,NULL; 1280x1024,NULL;"
Another method that may either work alone or in conjunction with those mentioned above is starting games in a separate X server.

=> NULL parameter


edit 4

Option "ConnectedMonitor" "string"
Allows you to override what the NVIDIA kernel module detects is connected to your graphics card. This may be useful, for example, if you use a KVM (keyboard, video, mouse) switch and you are switched away when X is started. In such a situation, the NVIDIA kernel module cannot detect which display devices are connected, and the NVIDIA X driver assumes you have a single CRT.

Valid values for this option are "CRT" (cathode ray tube), "DFP" (digital flat panel), or "TV" (television); if using TwinView, this option may be a comma-separated list of display devices; e.g.: "CRT, CRT" or "CRT, DFP".

It is generally recommended to not use this option, but instead use the "UseDisplayDevice" option.

NOTE: anything attached to a 15 pin VGA connector is regarded by the driver as a CRT. "DFP" should only be used to refer to digital flat panels connected via a DVI port.

Default: string is NULL (the NVIDIA driver will detect the connected display devices).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum