ValveSoftware / portal2

Issues for the Linux port of Portal 2
145 stars 11 forks source link

5760x1080 Nvidia base mosaic will only run 1920x1080 #222

Open DaMadOne opened 10 years ago

DaMadOne commented 10 years ago

I am running 3 1080p monitors on 2 nvidia gtx 580's, configured as one virtual desktop with base mosaic. I cannot get P2 to run at anything larger than 1920x1080 with Full screen, windowed or borderless window. If I manually set res to 5760x1080 it will reset it to 1920x1080.

After looking through these bug reports I thought maybe it was SDL as it seems to be having problems with multi monitor setups and xrandr. I however compiled a small SDL2 test app and was able to create both a normal and borderless window at 5760x1080, though when set to full screen it acted the same as P2 and would only use one monitor.

So why wont P2? The only games I have had problems getting to span 5760x1080 are Source Engine games as this is a problem for me with the entire Half Life franchise as well.

DaMadOne commented 10 years ago

Just as a followup I ran into trouble with other things that use SDL2. Doom3 and Dolphin the GC/Wii emulator. Knowing about the xrandr limitation on SDL2 by default I recompiled SDL2 and enabled xrandr support and now both Doom3 and Dolphin work as expected and I am able to set the res to 5760x1080 using a window. So I thought my source games were going to start working as well.. nope. Still the same behavior. So I can only assume that the source engine is using a call to check available resolutions that is not seeing the 5760x1080 virtual resolution and then because it does not see it as a possibility it will not even allow you to force it with -w 5760 -h 1080. I would think this to be a trivial fix by allowing to force it.. even with a -force argument would be acceptable.

davidw-valve commented 10 years ago

Do other Valve games such as TF2 allow you to run in your desired resolution?

DaMadOne commented 10 years ago

I have not tried tf2. Intsalling now and will report back.

DaMadOne commented 10 years ago

same behavior as others with TF2. I noticed when I went to try manually editing the config for my res that it looks like it runs as a mod from the hl2 binary. Half-life 1, Half-life 2 and the episodes, portal 2 and now TF2 all suffer the same problem.

EDIT* just tried Portal 1 just to try it. It doesn't work either.

I really hope this can be resolved. I am trying to get as many things away from windows as possible. All of the games I own that have native linux versions other than my source engine games work fine with my 5760x1080 res in linux. All the mentioned source games work at 5760x1080 with windows, so i know they are capable of it.

drwyrm commented 10 years ago

Bump!

Please fix.

CreamyCookie commented 10 years ago

I had to choose Widescreen to be able to set my screen size (1920x1080), which I find to be a weird design. It would be better to just show all the resolution in the dropdown menu.

@davidw-valve Also, could the game not auto-detect the native resolution?

Anyway, thanks for the port! :) I have bought Portal 2, because of this :+1:

DaMadOne commented 10 years ago

snappy666, I had to do the same to get 1920x1080. That is not the problem here though. No matter what settings I choose or manually edit in the cfg it WILL NOT goto 5760x1080, it ignores my res setting in the cfg and will even change it back to 1920x1080 in the cfg as soon as I run the game if I don't set it to read only. Not that it matters because it does what it wants even if I set the cfg to read only. Also like I said before 5760x1080 works just fine in windows so I know the engine is 100% capable of it.. I just needs to allow one to FORCE a res whether the game thinks it's a good idea or not.

davidw-valve commented 10 years ago

@DaMadOne: Try running the game with these parameters: -w 5760 -h 1080

DaMadOne commented 10 years ago

-noborder -w 5760 -h 1080 <-- copy/paste from my current launch options in steam. Dont take this as rude because that's not my intention.. but ive been there done that so to speak =) It still just does what it wants and runs at 1920x1080 =(

EDIT* I am use to having to "fiddle" with configs for games on linux to get them to run at my res and most need to be run in a window which is no big deal.. but nothing I have tried seems to work on the source games

EDIT2* Also the source engine games are the only games I have ran into that when run in a window will not allow me to manually resize the window by dragging the corners. The arrow to resize comes up when I goto the corner if i run a normal window without the -noborder option but it just moves the window around and won't resize.

drwyrm commented 10 years ago

Made no comment earlier, just a bump. But please notice that this also affects me on Team Fortress 2 and Left 4 Dead 2. No matter what I do, I can't get resolutions higher than 1920x1080 working on Source Engine games on Linux. The game just changes it back as soon as I run it. This is a real bug, not a user support thing. Have already tried the commandline arguments, changing the conf file directly and even making the conf file read-only. Nothing helps.

My setup is a bit different than DaMadOne's, I have a single GTX660 with 3 1920x1080 monitors, and I'm not using Base Mosaic.

DaMadOne commented 10 years ago

drwyrm, i got it to work.. its a workaround as Ive got to start the x server with a modified xorg.conf because this is not what I want for normal use. THIS STILL NEEDS TO BE FIXED VALVE.. I shouldnt have to do it this way.

the nvidia settings tool will not allow me to set both xinerama and base mosaic. But.. I ended up manually adding Option “Xinerama” “1” to the serverlayout section and also Option “nvidiaXineramaInfoOverride” “5760×1080+0+0″ to the screen section. This basically forces x to see nothing but one huge monitor and nothing else.

Im not home now, but if you need me to post up that xorg conf let me know and ill pastebin it for you when I get home. I don't use a DM so it's very easy for me to just choose which config is used when I startx/xinit. It seems you know what you're doing but if you need help don't hesitate to ask.

EDIT* http://pastebin.com/EFzNsDXQ <-- my xorg-game.conf

oh and those caps are not me yelling =) I just wanted to make sure it was seen as I didn't want this to get marked as solved.

DaMadOne commented 10 years ago

I actually just figured out another way. I don't know how many times I read through the multi monitor section of the Nvidia driver readme before this finally clicked. This is less a universal solution since it doesn't work with all WM's.. but since the only sane reason to want functionality like this is for gaming and I only use openbox for that purpose then this works great! No need for a second xorg.conf either since xfwm4 must get its mulitmonitor boundaries from randr and not xinerama. With openbox it is the opposite, it uses xinerama and not randr. So if we deprive it of that info it is forced to treat it as one large screen with no individual monitor boundaries, and xfwm4 doesnt care if it doesn't get this info because it uses randr anyways. To do this just add Option "nvidiaXineramaInfo" "False" in Section "Screen". Everything you fullscreen in openbox will span all the monitors. We'll see if I find any oddities while using xfce.. if I do ill just have to go back to 2 xorg confs.

DaMadOne commented 10 years ago

davidw-valve, I put the other report in the source 1 games issues list because it has a list of bugs for a bunch of source games, but there is also one specific to Portal 2 btw.