Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Steam (for Linux) Primary Screen (nvidia TwinView) Problem
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
229566
Tux's lil' helper
Tux's lil' helper


Joined: 16 Aug 2010
Posts: 127

PostPosted: Fri Mar 06, 2015 11:08 am    Post subject: Steam (for Linux) Primary Screen (nvidia TwinView) Problem Reply with quote

Hello,

I have a problem with Steam for Linux on nvidia w\ TwinView, two screens, a DVI-I-1 1920x1080 and a VGA-0 1280x1024. I'm using the DVI one as primary.

No matter what I set as primary in MATE display configuration, or with nvidia-settings, saving to xorg.conf, to ~/.nvidia-settings.rc, no matter if I reboot, restart, force nvidia-settings --load-config-only in .xinitrc, starting a game (eg. Serious Sam BFE) always shuts down the DVI screen and plays in VGA one.

Even if I disable the VGA one through MATE display settings (because I don't want to play with two screens, just through the primary), running the game will do exactly the opposite - will enable the VGA and disable the DVI. I thought maybe the game autoconfigured the first time and chose VGA (by forcing 1280x1024 resolution) but I reconfigured it for 1920x1080 and it still does the same (which kinda breaks as the game is apparently rendering for 1920 on 1280 and everything is off...)

Now, I'm sure this very same machine ran this very game in the DVI primary screen properly on Ubuntu, so I'm guessing it's a configuration issue. But I'm clueless as to what to do.

Code:

$ uname -a
Linux deltalabs 3.18.7-gentoo #2 SMP PREEMPT Thu Feb 26 20:36:47 CET 2015 x86_64 AMD Phenom(tm) II X2 555 Processor AuthenticAMD GNU/Linux

$ cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module  340.76  Thu Jan 22 12:11:08 PST 2015
GCC version:  gcc version 4.8.3 (Gentoo 4.8.3 p1.1, pie-0.5.9)


So this is an amd64 system, and I installed Steam from steam-overlay with steamruntime. BTW, despite what the wiki said, Steam w/ steamruntime did not require nor install linux emul packages, Steam works, and this game works just fine performance-wise even if in the wrong screen.

My xorg.conf is autoconfigured with nvidia-xconfig, except I added the TwinView options as I saw in some forum, and I reordered metamodes to have DVI first, because xconfig had VGA first. However, I tried everything - with these, without these, default nvidia-xconfig, with xinerama, without it (btw, I have xinerama use flag on, but xorg.conf disables it and MATE works just fine and as expected, eg. fullscreening a window acknowledges the screen it is in, as opposed to the LiveDVD KDE which though my desktop was 3200px wide, oblivious to individual screens).

Code:

$ cat /etc/X11/xorg.conf
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 340.76  (buildmeister@swio-display-x86-rhel47-01)  Thu Jan 22 12:12:24 PST 2015

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 340.76  (buildmeister@swio-display-x86-rhel47-01)  Thu Jan 22 12:12:09 PST 2015

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

Section "Files"
EndSection

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"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"

    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Samsung SyncMaster"
    HorizSync       30.0 - 81.0
    VertRefresh     56.0 - 75.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTS 250"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "TwinView" "True"
    #Option         "nvidiaXineramaInfoOrder" "DFP-0"
    Option         "TwinViewXineramaInfoOrder" "DVI-I-1, VGA-0"
    Option         "TwinViewOrientation" "VGA-0 RightOf DVI-I-1"
    Option         "metamodes" "DVI-I-1: 1920x1080 +0+0, VGA-0: 1280x1024_75 +1920+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
Back to top
View user's profile Send private message
dweezil-n0xad
Apprentice
Apprentice


Joined: 30 Oct 2006
Posts: 156
Location: Ostend, Belgium

PostPosted: Fri Mar 06, 2015 3:45 pm    Post subject: Reply with quote

I have 2 Dell U2414H monitors.

HDMI-0 connected 1920x1080+0+0 and DVI-I-1 connected 1920x1080+1920+0.

I do not use a global xorg.conf file. My nvidia card is configured in /etc/X11/xorg.conf.d/20nvidia.conf
Code:
Section "Device"
   Identifier  "Card0"
   Driver      "nvidia"
   Option      "MetaModes"          "DFP-1: nvidia-auto-select, DFP-2: NULL"   
EndSection
I don't use twinview or xinerama options. X doesn't start when I enable both monitors in MetaModes (the error is: MetaMode "DFP-1:nvidia-auto-select,DFP-2:nvidia-auto-select" exceeds hardware capabilities; discarding."). So I start X on one monitor and I use xrandr to start the second monitor.
Code:
xrandr --output DVI-I-1 --auto --pos 1920x0


I use xrandr to turn off the second monitor when it's not in use.
Code:
xrandr --output DVI-I-1 --off


anyway, if there are games that start on the wrong screen, I use xrandr to switch the screens.

Code:
$ uname -a
Linux msi 3.19.0-gentoo #8 SMP PREEMPT Thu Feb 12 10:52:20 CET 2015 x86_64 Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz GenuineIntel GNU/Linux
$ cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module  346.47  Thu Feb 19 18:56:03 PST 2015
GCC version:  gcc version 4.9.2 (Gentoo 4.9.2 p1.1, pie-0.6.2)

_________________
i7-4790K | 16GB DDR3 | GTX 970 | 500GB SSD
ASUS N56VV | i7-3630QM | 12GB DDR3 | GT 750M | 256GB SSD
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 6968

PostPosted: Sat Mar 07, 2015 12:07 pm    Post subject: Reply with quote

You need to define metamodes that would allow what monitor is running on what resolution, something like
Option "MetaModes" "1024x768, 1024x768 ; null, 640x480 ; 1280x1024, null"

So this way, setting game resolution in 2048x768 will use both screen, setting game resolution to 640 will use monitor2, setting 1280 will use monitor one.
Back to top
View user's profile Send private message
229566
Tux's lil' helper
Tux's lil' helper


Joined: 16 Aug 2010
Posts: 127

PostPosted: Sun Mar 08, 2015 6:35 pm    Post subject: Reply with quote

krinn wrote:
You need to define metamodes that would allow what monitor is running on what resolution, something like


Isn't that what I already have (see my xorg.conf up there)? I got it from nvidia-xconfig, but originally it placed VGA-0 (wrong) entry first, so I swapped places.

Anyway, I managed to find a way for one game (Serious Sam BFE), there's an option to force the default screen (GPU Device). XCOM switched when I forced the proper resolution.

Speaking of which, it seems I spoke too soon about good performance. Am I out of my mind or do (Steam) Linux versions of the games exhibit poor performance compared to Windows? I have to play Serious Sam BFE on Linux in "low" quality mode, opposed to "high" on Windows, but that's basically back to 320x200 era, that kind of pixelization. XCOM also, loading screens freeze (disk I/O blocking rendering), animation is stuttering and seriously out of sync with audio (because glitches), framerate drops occasionally, and I have to play it on low quality settings. Left 4 Dead drops performance to unplayable rates after about a minute or so.

I boot Windows 8.1 on the same machine from another disk only for Steam, and I can compare them with identical settings on the same hardware.

I had the very same performance in Ubuntu 14.10 which I was testing out on this same machine, but I thought older nvidia driver versions were to blame. I see running latest drivers doesn't fix the issue. I run steam with "steamruntime" which basically pulls in Ubuntu crap. Should I attempt the effort to compile the runtime with "-steamruntime"? Would that make any difference?

Is this the Steam Linux gaming experience?
Back to top
View user's profile Send private message
Linubie
Apprentice
Apprentice


Joined: 11 Jun 2004
Posts: 255

PostPosted: Sun Mar 08, 2015 10:39 pm    Post subject: Reply with quote

Iam using the same Steam from the same overlay.

First monitor 1680x1050 and second 1920x1080 using KDE

Code:
cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module  346.47  Thu Feb 19 18:56:03 PST 2015
GCC version:  gcc version 4.8.3 (Gentoo 4.8.3 p1.1, pie-0.5.9)


Code:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 346.35  (buildmeister@swio-display-x86-rhel47-09)  Sat Jan 10 21:58:11 PST 2015

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 340.24  (buildmeister@swio-display-x64-rhel04-07)  Wed Jul  2 15:50:31 PDT 2014

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

Section "Files"
EndSection

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"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"

    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "HP"
    ModelName      "HP w2207"
    HorizSync       24.0 - 83.0
    VertRefresh     48.0 - 76.0
    Option         "DPMS"
EndSection

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

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "CRT-0"
    Option         "metamodes" "nvidia-auto-select +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    Option         "NoLogo" "1"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection


Check metamodes
Code:
  Option         "metamodes" "nvidia-auto-select +0+0"


I can easily turn on/off one of my both monitors with nvidia-settings, having a great Steam gaming experince.
Today I found out to link wine games to the steam client and everything works as expected!
Have fun!
_________________
Mircosoft software is like having sex with a stranger, you always have to be careful not to get infected with something...
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 6968

PostPosted: Sun Mar 08, 2015 11:19 pm    Post subject: Reply with quote

GrueXYZ wrote:
krinn wrote:
You need to define metamodes that would allow what monitor is running on what resolution, something like


Isn't that what I already have (see my xorg.conf up there)? I got it from nvidia-xconfig, but originally it placed VGA-0 (wrong) entry first, so I swapped places.

No, pay attention to my entries.

You define "metamodes" "monitor1: a, monitor2: b"
And i shown you "metamodes" "monitor1: a, monitor2: b ; monitor1: c, monitor2: null ; monitor1: null, monitor2: d"

There's a difference, if you try to set the resolution define as c, then monitor1 will use the resolution you have set and monitor2 will be off.
You can also seek all metamodes in X using ctrl+alt+(+ or -) key. So if you want turn off monitor2, hit <ctrl><alt><+> and you'll jump on next mode, the monitor1: c, monitor2: off...
What a, b, c and d are is left to you. It is even possible to use c & d with the same resolution, but i'm unsure how the driver will determine what metamodes to use then, but if c & d are different, the driver will have no doubt about what mode you are trying to use (for the alt+ctrl++- key it's just next/previous mode, but for game, it depend on the chosen resolution, hence why if they are both the same it may get harder to know the one to use, i suppose it might just be a first seen first used.

So, like i said with my example:
Option "MetaModes" "1024x768, 1024x768 ; null, 640x480 ; 1280x1024, null"
If you ask a game to use 2048x768 it will switch to first metamode and use the two monitors
If you ask a game to use 640x480, it will use the "null, 640x480" so monitor1 will be turn off (by the null entry)
And if you ask a game to use 1280x1024, monitor1 will be 1280x1024 and monitor2 will be turn off.

Clearer?
Back to top
View user's profile Send private message
dweezil-n0xad
Apprentice
Apprentice


Joined: 30 Oct 2006
Posts: 156
Location: Ostend, Belgium

PostPosted: Mon Mar 09, 2015 4:19 pm    Post subject: Reply with quote

GrueXYZ wrote:
Speaking of which, it seems I spoke too soon about good performance. Am I out of my mind or do (Steam) Linux versions of the games exhibit poor performance compared to Windows? I have to play Serious Sam BFE on Linux in "low" quality mode, opposed to "high" on Windows, but that's basically back to 320x200 era, that kind of pixelization. XCOM also, loading screens freeze (disk I/O blocking rendering), animation is stuttering and seriously out of sync with audio (because glitches), framerate drops occasionally, and I have to play it on low quality settings. Left 4 Dead drops performance to unplayable rates after about a minute or so.

I boot Windows 8.1 on the same machine from another disk only for Steam, and I can compare them with identical settings on the same hardware.

I had the very same performance in Ubuntu 14.10 which I was testing out on this same machine, but I thought older nvidia driver versions were to blame. I see running latest drivers doesn't fix the issue. I run steam with "steamruntime" which basically pulls in Ubuntu crap. Should I attempt the effort to compile the runtime with "-steamruntime"? Would that make any difference?

Is this the Steam Linux gaming experience?
I don't play Serious Sam or L4D but I can smoothly play XCOM:EW on highest quality in 1920x1080 on my Gentoo desktop and laptop. But yes it's true that the recommended system requirements for those games are higher for Linux. I hope that will change when SteamOS becomes more popular.

I have a great Steam Linux gaming experience. fwiw, my DE is Xfce 4.12 w/ compton compositor and nvidia-drivers 346.47. I run steam with the steamruntime.
_________________
i7-4790K | 16GB DDR3 | GTX 970 | 500GB SSD
ASUS N56VV | i7-3630QM | 12GB DDR3 | GT 750M | 256GB SSD
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