portal2
portal2 copied to clipboard
[Linux] cannot select main screen on dual screen system
on other Linux Steam games, like TF2 and Portal, it is possible to select the main screen. This option is under Video mode, where in case of several screens you get "fullscreen(n)" option per screen (where n is the screen id, starting with 0).
There is no 'option' for multi-display screen selection, but you can still select which display to run on (windowed or full screen), and the selection will be remembered for the next time you start up.
Simply move the game window (must be a windowed version to do this) to the display you would like to use as your main screen, and select full screen and apply (in fact you can change any video option as long as you apply the settings which will save the display index the window is currently using).
I can move the windowed (both with and without border) presentation to the desired screen, but when switching back to "fullscreen" mode, the presentation returns to the default screen.
I have tried reducing the resolution to make sure the window is well within the desired screen.
Be interesting to know what command line you're running and what hardware setup you have, and whether if you leave the game in windowed mode, change resolution, apply, quit and restart, if the window appears on the same display or the default screen, and does this happen whatever screen you've quit from? Also, to confirm which version of Portal2 you're running. Thanks.
I run Ubuntu 13.10, to launch Portal2 I use the steam application, but it actually executes these commands: $ ps xa|grep Portal 6455 ? S 0:00 /bin/sh -c "/localarch/SteamLibrary/SteamApps/common/Portal 2/portal2.sh" -game portal2 -steam 6456 ? S 0:00 /bin/bash /localarch/SteamLibrary/SteamApps/common/Portal 2/portal2.sh -game portal2 -steam 6459 ? Sl 0:22 /localarch/SteamLibrary/SteamApps/common/Portal 2/portal2_linux -game portal2 -steam
here is my graphics card detail: $ sudo lspci -s 4:0 -vv 04:00.0 VGA compatible controller: NVIDIA Corporation GT216 [GeForce GT 220](rev a2) (prog-if 00 [VGA controller]) Subsystem: Point of View BV Device 29d3 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0 Interrupt: pin A routed to IRQ 16 Region 0: Memory at fa000000 (32-bit, non-prefetchable) [size=16M] Region 1: Memory at c0000000 (64-bit, prefetchable) [size=256M] Region 3: Memory at de000000 (64-bit, prefetchable) [size=32M] Region 5: I/O ports at dc00 [size=128] [virtual] Expansion ROM at fbf00000 [disabled] [size=512K] Capabilities: [60] Power Management version 3 Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME- Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+ Address: 0000000000000000 Data: 0000 Capabilities: [78] Express (v2) Endpoint, MSI 00 DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s unlimited, L1 <64us ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset- DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported- RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+ MaxPayload 128 bytes, MaxReadReq 512 bytes DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend- LnkCap: Port #0, Speed 5GT/s, Width x16, ASPM L0s L1, Latency L0 <256ns, L1 <4us ClockPM+ Surprise- LLActRep- BwNot- LnkCtl: ASPM Disabled; RCB 128 bytes Disabled- Retrain- CommClk+ ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt- LnkSta: Speed 5GT/s, Width x16, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt- DevCap2: Completion Timeout: Not Supported, TimeoutDis+ DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -6dB Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- Compliance De-emphasis: -6dB LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1- EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest- Capabilities: [b4] Vendor Specific Information: Len=14 > Capabilities: [100 v1] Virtual Channel Caps: LPEVC=0 RefClk=100ns PATEntryBits=1 Arb: Fixed- WRR32- WRR64- WRR128- Ctrl: ArbSelect=Fixed Status: InProgress- VC0: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans- Arb: Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256- Ctrl: Enable+ ID=0 ArbSelect=Fixed TC/VC=ff Status: NegoPending- InProgress- Capabilities: [128 v1] Power Budgeting > Capabilities: [600 v1] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?> Kernel driver in use: nvidia
my CPU detail: $ sudo lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 1 Core(s) per socket: 4 Socket(s): 1 NUMA node(s): 1 Vendor ID: AuthenticAMD CPU family: 16 Model: 2 Stepping: 3 CPU MHz: 1250.000 BogoMIPS: 5022.67 Virtualization: AMD-V L1d cache: 64K L1i cache: 64K L2 cache: 512K L3 cache: 2048K NUMA node0 CPU(s): 0-3
With 4Gb of total RAM.
(operation requested in next comment)
I followed these steps: launched portal, changed to windowed, changed resolution, applied, moved window to desired screen, changed resolution, apply, quit.
Upon restart portal appeared windowed with latest resolution centred in the default screen.
When doing the same, but instead moving the window to another location WITHIN the default screen the same happened: last resolution window centred on the default screen.
according to Steam the current BuildID is 222738
Did you set it to fullscreen or just changed resolution after moving it to the desired screen?
no, but that was my first test, with no results.
What is your screen layout like, eg. the output ofr 'xrandr'?
$ xrandr
Screen 0: minimum 8 x 8, current 3840 x 1080, maximum 8192 x 8192
DVI-I-0 disconnected (normal left inverted right x axis y axis)
VGA-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 476mm x 268mm
1920x1080 60.0_+
1680x1050 60.0
1440x900 59.9
1280x1024 75.0 60.0
1280x960 60.0
1280x800 59.8
1280x720 60.0
1152x864 75.0
1024x768 75.0 70.1 60.0
800x600 75.0 72.2 60.3 56.2
640x480 75.0 59.9
HDMI-0 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 476mm x 268mm
1920x1080 60.0_+
1680x1050 60.0
1440x900 59.9
1280x1024 75.0 60.0
1280x960 60.0
1280x800 59.8
1280x720 60.0
1152x864 75.0
1024x768 75.0 70.1 60.0
800x600 75.0 72.2 60.3 56.2
640x480 75.0 59.9
Actually I'm seeing similar behavior where switching to fullscreen always goes to my right monitor, no matter where the Portal2 window is placed. Maybe the code is getting confused by two identical screen sizes..
Seems that SDL may not be reporting the displayIndex appropriately, (or there is something about the configuration that doesn't allow it to) since that is what's used to determine the display you're using when the video settings are 'applied', and is the value that gets saved.
To see if this is the case, look in the config.cfg file, and search for sdl_displayindex. With a two monitor setup, this should be "0" or "1". It should be different depending on which display you saved the settings. [You could also try changing the value manually if it isn't].
It could also be that the fix never made it to that build (it was a late Beta fix).
I've tried some things, bottom line: sdl_displayindex is always "0". Even when I change it manually to "1", then start the program, it seems to ignore it (still on default screen) and when I quit it is changed back to "0".
Ah, so seems that SDL does not play nice with XRandR (looking at your settings, it's clear you have one virtual desktop 3840x1080, and the second monitor @ HDMI1 is just at an offset (1920,0) from the origin of that). SDL must be reporting one single display index.
We actually initialize SDL without support for XRandR (and XVidMode) (SDL2 defaults to disabling XRandR too due to window manager issues). Of the X11 extensions, we initialize SDL with support for Xinerama only - is it possible/not too painful to try that?
I have a working configuration. I'll try to find some time to safely test it.
When in console the cursor can be moved out of the game, right? So go to the console, and use Alt key to move the window to a separate screen. (Hold alt, hold click on the window and move to the other screen). This feature worked at least in Gnome 2 when I used it years ago, and works now in KDE 4.
Maybe the code is getting confused by two identical screen sizes.
Can't be. I've got 3x 1920x1200 and 1x 2560x1440 setup.
I'm using stock Ubuntu Unity. The cursor can be moved out of the game whenever there is a menu (initial menu, sub menus, or paused game). On unity it did not work.
I can confirm this issue. In my dual screen setup I have to disable my second screen to play portal 2. Else fullscreen resolution in video settings is wrong and mouse clicks are ignored in menus.
I can confirm this issue. In my dual screen setup I have to disable my second screen to play portal 2. Else fullscreen resolution in video settings is wrong and mouse clicks are ignored in menus.
Note that everything is working fine with the last update of portal2 and vulkan rendering enabled (-vulkan command line parameter).
Had the same issue first launch -vulkan
solved it. Thanks!