[Linux] Secondary screen solution used on primary screen #594

Open
blaff23 opened this Issue Jan 22, 2016 · 6 comments

Comments

Projects
None yet
4 participants

blaff23 commented Jan 22, 2016

Hi

I have 2 screens:
left: 1920x1200 (16:10), 60Hz, secondary
right (gaming): 1920x1080 (16:9), 144Hz, primary

I use Ubuntu Gnome 15.10.
I always use Fullscreen settings
This problem may have to do with the different aspect ratios of my screens.
When I start the game, the drawn surface has an offset, so I can not press any button. (Play, Inventory, etc. are not visible) -> see screenshot

I tried the following (the result is always the same):

  • Different positions of the secondary screen (left, right, upper. each with different offsets)
  • Changing DVI-inputs of both screens
  • setting sdl_displayindex "1" (also tried with "0") (gets often overwritten with 0 when starting a game)
  • setting launch options -w, -h
  • setting launch options -x, -y

These things "resolve" the problem:

  • turn off secondary screen
  • move it to the secondary (16:10) screen
  • show gnome-window-overview (Activities overview), drag the window to the secondary screen, release mousebutton, drag back again to primary screen. when maximised again, everything is fine. (sometimes the game starts on the secondary. then i have first drag it primary, then secondary and primary again)
  • this script, when window is in background:
#!/bin/sh
windowName="Counter-Strike: Global Offensive - OpenGL"
wmctrl -r "$windowName" -e 0,1921,0,1920,1080
wmctrl -a "$windowName"

the problem comes back again when minimizing the window or move it in the background and activate it again. after this, the window must be corrected again.
so after minimizing i have to run this script again to have the correct window size.

Do you need any more testing/data?

Thanks for your support! You really do great work (valve/steam/cs:go) and really appreciate all your effort (especially on linux ;) ).

dual_screen

@davidw-valve davidw-valve self-assigned this Jan 23, 2016

This comment has been minimized.

Show comment Hide comment
@davidw-valve

davidw-valve Jan 23, 2016

Contributor

While I don't have access to a setup like yours so I couldn't reproduce your exact problem, I have created a fix which I think should make it so using sdl_displayindex will work for you. This will ship with the game's next update.

Contributor

davidw-valve commented Jan 23, 2016

While I don't have access to a setup like yours so I couldn't reproduce your exact problem, I have created a fix which I think should make it so using sdl_displayindex will work for you. This will ship with the game's next update.

This comment has been minimized.

Show comment Hide comment
@blaff23

blaff23 Jan 23, 2016

Thank you! I will report back after the next update

blaff23 commented Jan 23, 2016

Thank you! I will report back after the next update

This comment has been minimized.

Show comment Hide comment
@blaff23

blaff23 Feb 3, 2016

Hi!
I am sorry to say, but the update changed nothing. sdl_displayindex is also overwritten ingame (not always but often, deathmatch more often than in other modes), so setting this does not work either.
I tweaked my nvidia settings a bit and changed my monitor frequency from auto to 60Hz. I also tried out different resolutions. Now I have the picture in the correct position - but the mouse still has the old window position. I think there are already bugs for this.
There is a area where my mouse pointer simply can not reach the bottom of the screen. I have a screenshot to mark the position where it stops. Everything else is still the same. This happens on startup - where it automatically gets minimized, and when switching windows. I still need the script to switch back to cs:go.
dual_screen2

blaff23 commented Feb 3, 2016

Hi!
I am sorry to say, but the update changed nothing. sdl_displayindex is also overwritten ingame (not always but often, deathmatch more often than in other modes), so setting this does not work either.
I tweaked my nvidia settings a bit and changed my monitor frequency from auto to 60Hz. I also tried out different resolutions. Now I have the picture in the correct position - but the mouse still has the old window position. I think there are already bugs for this.
There is a area where my mouse pointer simply can not reach the bottom of the screen. I have a screenshot to mark the position where it stops. Everything else is still the same. This happens on startup - where it automatically gets minimized, and when switching windows. I still need the script to switch back to cs:go.
dual_screen2

This comment has been minimized.

Show comment Hide comment
@penetal

penetal Feb 18, 2016

I dont have the same problems with switching to the game window, but I do have the problem of being able to reach the bottom of the screen (where you drew the red line).

I am wondering if this is because we both have our gaming monitor (2560x1440@144Hz) on the right and another, secondary monitor (2560x1600@60Hz) on the left.

To be able to reach the bottom of the screen this does not work for me:

show gnome-window-overview (Activities overview), drag the window to the secondary screen, release mousebutton, drag back again to primary screen. when maximised again, everything is fine. (sometimes the game starts on the secondary. then i have first drag it primary, then secondary and primary again)

But running the command wmctrl -r "Counter-Strike: Global Offensive - OpenGL" -e 0,2560,0,1600,1200 lets me reach the bottom of the screen for a while (I know at least chainging map reverts it and I have to run the command again).

System Information:

Linux ArcherBase 4.4.1-2-ARCH #1 SMP PREEMPT Wed Feb 3 13:12:33 UTC 2016 x86_64 GNU/Linux

HW as reported by steam:

Processor Information:
    Vendor:  GenuineIntel
    CPU Family:  0x6
    CPU Model:  0x3c
    CPU Stepping:  0x3
    CPU Type:  0x0
    Speed:  4000 Mhz
    8 logical processors
    4 physical processors
    HyperThreading:  Supported
    FCMOV:  Supported
    SSE2:  Supported
    SSE3:  Supported
    SSSE3:  Supported
    SSE4a:  Unsupported
    SSE41:  Supported
    SSE42:  Supported

Network Information:
    Network Speed:  

Operating System Version:
    "Arch Linux" (64 bit)
    Kernel Name:  Linux
    Kernel Version:  4.4.1-2-ARCH
    X Server Vendor:  The X.Org Foundation
    X Server Release:  11800000
    X Window Manager:  GNOME Shell
    Steam Runtime Version:  steam-runtime-release_2015-06-12

Video Card:
    Driver:  NVIDIA Corporation GeForce GTX 780 Ti/PCIe/SSE2

    Driver Version:  4.5.0 NVIDIA 361.18
    OpenGL Version: 4.5
    Desktop Color Depth: 24 bits per pixel
    Monitor Refresh Rate: 144 Hz
    VendorID:  0x10de
    DeviceID:  0x100a
    Number of Monitors:  2
    Number of Logical Video Cards:  1
    Primary Display Resolution:  2560 x 1440
    Desktop Resolution: 5120 x 1600
    Primary Display Size: 23.54" x 13.23"  (26.97" diag)
                                            59.8cm x 33.6cm  (68.5cm diag)
    Primary Bus: PCI Express 16x
    Primary VRAM: 3072 MB
    Supported MSAA Modes:  2x 4x 8x 16x 

Sound card:
    Audio device: 

Memory:
    RAM:  32128 Mb

Miscellaneous:
    UI Language:  English
    LANG:  en_US.utf8
    Microphone:  Not set
    Total Hard Disk Space Available:  913694 Mb
    Largest Free Hard Disk Block:  453880 Mb

Installed software:

Recent Failure Reports:

penetal commented Feb 18, 2016

I dont have the same problems with switching to the game window, but I do have the problem of being able to reach the bottom of the screen (where you drew the red line).

I am wondering if this is because we both have our gaming monitor (2560x1440@144Hz) on the right and another, secondary monitor (2560x1600@60Hz) on the left.

To be able to reach the bottom of the screen this does not work for me:

show gnome-window-overview (Activities overview), drag the window to the secondary screen, release mousebutton, drag back again to primary screen. when maximised again, everything is fine. (sometimes the game starts on the secondary. then i have first drag it primary, then secondary and primary again)

But running the command wmctrl -r "Counter-Strike: Global Offensive - OpenGL" -e 0,2560,0,1600,1200 lets me reach the bottom of the screen for a while (I know at least chainging map reverts it and I have to run the command again).

System Information:

Linux ArcherBase 4.4.1-2-ARCH #1 SMP PREEMPT Wed Feb 3 13:12:33 UTC 2016 x86_64 GNU/Linux

HW as reported by steam:

Processor Information:
    Vendor:  GenuineIntel
    CPU Family:  0x6
    CPU Model:  0x3c
    CPU Stepping:  0x3
    CPU Type:  0x0
    Speed:  4000 Mhz
    8 logical processors
    4 physical processors
    HyperThreading:  Supported
    FCMOV:  Supported
    SSE2:  Supported
    SSE3:  Supported
    SSSE3:  Supported
    SSE4a:  Unsupported
    SSE41:  Supported
    SSE42:  Supported

Network Information:
    Network Speed:  

Operating System Version:
    "Arch Linux" (64 bit)
    Kernel Name:  Linux
    Kernel Version:  4.4.1-2-ARCH
    X Server Vendor:  The X.Org Foundation
    X Server Release:  11800000
    X Window Manager:  GNOME Shell
    Steam Runtime Version:  steam-runtime-release_2015-06-12

Video Card:
    Driver:  NVIDIA Corporation GeForce GTX 780 Ti/PCIe/SSE2

    Driver Version:  4.5.0 NVIDIA 361.18
    OpenGL Version: 4.5
    Desktop Color Depth: 24 bits per pixel
    Monitor Refresh Rate: 144 Hz
    VendorID:  0x10de
    DeviceID:  0x100a
    Number of Monitors:  2
    Number of Logical Video Cards:  1
    Primary Display Resolution:  2560 x 1440
    Desktop Resolution: 5120 x 1600
    Primary Display Size: 23.54" x 13.23"  (26.97" diag)
                                            59.8cm x 33.6cm  (68.5cm diag)
    Primary Bus: PCI Express 16x
    Primary VRAM: 3072 MB
    Supported MSAA Modes:  2x 4x 8x 16x 

Sound card:
    Audio device: 

Memory:
    RAM:  32128 Mb

Miscellaneous:
    UI Language:  English
    LANG:  en_US.utf8
    Microphone:  Not set
    Total Hard Disk Space Available:  913694 Mb
    Largest Free Hard Disk Block:  453880 Mb

Installed software:

Recent Failure Reports:

This comment has been minimized.

Show comment Hide comment
@blaff23

blaff23 May 16, 2016

hi

in the meantime i have another workaround. i just turn off the second screen in the startupcommand of cs:go. i do this with
xrandr -s 1920x1080
and reset it with
xrandr -s 0
As already mentioned, my smaller screen is my primary.

You can integrate these commands in your Steam startup parameters of cs:go:
xrandr -s 1; %command%; xrandr -s 0
(if you already got some flags in there: just write them between %command% and its following ;

The drawback of this method is, that you only have one monitor while you run cs:go. So if you alt-tab out of it, it will not switch back.

regards

blaff23 commented May 16, 2016

hi

in the meantime i have another workaround. i just turn off the second screen in the startupcommand of cs:go. i do this with
xrandr -s 1920x1080
and reset it with
xrandr -s 0
As already mentioned, my smaller screen is my primary.

You can integrate these commands in your Steam startup parameters of cs:go:
xrandr -s 1; %command%; xrandr -s 0
(if you already got some flags in there: just write them between %command% and its following ;

The drawback of this method is, that you only have one monitor while you run cs:go. So if you alt-tab out of it, it will not switch back.

regards

@Tele42 Tele42 added the Linux label Jun 26, 2016

This comment has been minimized.

Show comment Hide comment
@Tele42

Tele42 Jun 26, 2016

Contributor

This is probably a side effect of #60.

Contributor

Tele42 commented Jun 26, 2016

This is probably a side effect of #60.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment