Linux: only one screen res option, forces across 2 monitors, help?

Discussion in 'Bugs' started by Must Register To Post, Jan 11, 2012.

  1. As it says in the title. Linux newbie. The game only gives me one option in the launcher: 3280x950, which splits the game across both my screens. No other options. I'm using a GeForce8800 with two monitors (a Dell and a HannsG), and Nvidia X Server, TwinView, because that's the only setting that lets me use both screens simultaneously.

    I'd love to play this game. I paid for it! But all it will run is a stupidly wide resolution that obviously doesn't work for crap across two screens. Any idea on how to force it to run windowed ***WITH OPTIONS FOR SCREEN RESOLUTION*** or make it run fullscreen in one or the other monitor?
     
  2. Bugari

    Bugari Member

    Acutally, I'd like to sign at the same problem. It's completely impossible to play this way. If there would be a way to force resolution as command line argument, or something similar - that would help many of us...
     
  3. catpants

    catpants Member

  4. Bugari

    Bugari Member

    Well thank you very much, that did help :D
     
  5. That helps with the one-off instructions, but even though I added the Modelines to my xorg.conf, they don't seem to be "remembered" on reboot. Suggestions?
     
  6. ssokolow

    ssokolow Member

    For anyone who's wondering, it's also possible to let games turn off one of your monitors on an nVidia TwinView setup so you get fullscreen behaviour without spanning across multiple monitors. I prefer my games windowed, but my brother is proof that some people don't.

    Just add a line like this to your xorg.conf Device section:

    Option "Metamodes" " 1280x1024,1280x1024; 1280x1024, NULL"

    All the SDL-based games I've had experience with will prefer a single-monitor resolution if they can get it. If your monitor actually listens to instructions from the GPU to scale while preserving aspect ratio, you can also toss in other resolutions for games which are picky about their aspect ratios.

    Option "Metamodes" " 1280x1024,1280x1024; 1280x1024, NULL; 1280x960, NULL; 1280x720, NULL"

    The same applies if your GPU can't handle 3D at full resolution and you want your monitor to scale things up for you. Just add resolutions like 800x600 to the list.
     
  7. Cool! Thanks, ssolkolow.

    ssolkolow, catpants, or anyone else: any idea why xorg.conf isn't loading the Modelines I added upon Linux boot? I added two (1200x950, the native resolution of the monitor, then also 1024x768 when I realized that the monitor's toolbar cut off the bottom of the screen in full-screen resolution). Thanks so much, guys!
     
  8. ssokolow

    ssokolow Member

    Modelines aren't really something I have much experience with. Until this thread, I'd only thought of of them as a bad workaround for poor autodetect that I had to copy-paste from an autodetection tool in the days of Mandrake Linux 6.0. (Back when I was a raw noob with no idea what I was doing)

    However, I can think of two potential reasons, both related to X.org's recent focus on autodetect:

    First, it's possible that you made a mistake in your xorg.conf and your Modelines directive isn't applying because NOTHING in that Monitor section is applying. (Prior to the autodetect enhancements, this would be obvious because your GUI wouldn't start. Now, some mistakes in xorg.conf just result in autodetect being silently used instead. For example, if your typo makes X.org conclude that your instructions are for a secondary monitor that'll be plugged in later, like a wall projector on a laptop.)

    Second, it may be that the xorg.conf parser is stricter about modelines than xrandr and ignores your modeline because the video driver doesn't report it as a supported resolution. If that's the case, you can just tell your desktop to run the xrandr commands on login. (I can be more specific if you can tell me what desktop environment you're using)

    Have you checked /var/log/Xorg.0.log for clues about what's going wrong? You're looking for either error/warning messages or relevant harmless messages like this example from mine:

    [130037.687] (==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
     
  9. I'm on Mint Linux 11, and understand about 50% of what you said. :)

    The Modelines seem to match what were in the above article 100% -- I followed the process fairly closely. In Xorg.0.log, there don't seem to be many relevant lines except for:

    [ 23.791] (**) NVIDIA(0): Option "MetaModes" "CRT-0: nvidia-auto-select +0+0, CRT-1: nvidia-auto-select +1600+0"

    which seems relevant to the above, and

    [ 24.809] (II) NVIDIA(0): Validated modes:
    [ 24.809] (II) NVIDIA(0):
    [ 24.809] (II) NVIDIA(0): "CRT-0:nvidia-auto-select+0+0,CRT-1:nvidia-auto-select+1600+0"
    [ 24.809] (II) NVIDIA(0): Virtual screen size determined to be 3280 x 1050

    which seems to indicate that it's only found the one mode (from MetaModes, Modeline, or ???) and is using the 1600-width one (which is fine, in general).

    [ 24.854] (II) NVIDIA(0): Setting mode
    [ 24.854] (II) NVIDIA(0): "CRT-0:nvidia-auto-select+0+0,CRT-1:nvidia-auto-select+1600+0"

    seems kind of applicable too.

    I really don't know what I'm doing, though.
     
  10. ssokolow

    ssokolow Member

    Could be worse. I'm on Lubuntu 11.10, so it shouldn't be excessively different.

    Which parts didn't you understand? I'm pretty good at explaining things clearly when I know more explanation is needed.

    Those are all MetaModes-related. (The "NVIDIA(0)" at the beginning is generally a good clue.) They have nothing to do with Modelines.

    Can you put your xorg.conf and Xorg.0.log up on a site like pastebin.com so I can take a look?
     
  11. ssokolow

    ssokolow Member

    No biggie. I don't see anything notably odd and your config file is fairly typical of the mess nvidia-settings leaves behind.

    For comparison, my xorg.conf does basically the same thing but uses the modern method of relying on X.org autodetection so replacing monitors or even video cards will Just Work™. (Replace "DFP-1" with "CRT-1", since I'm using DVI and you're using VGA, and my config would probably do the exact same thing as yours on your hardware.)

    I'm honestly not sure why it's not working. I'll let you know if I figure anything out when I try to set up some modelines myself, but it could be weeks or even months before I get up the resolve to close down the stuff on my desktop and reboot. (I've had updates which need restarts accumulating for weeks already.)

    For now, it'd probably be easier to just set your desktop to run those two xrandr lines on login. If Google isn't lying to me, you're probably running GNOME 2.32 as your desktop environment, correct?
     
  12. GNOME 2.32.1, yeah.

    No rush on this -- I'll peek at this forum periodically.
     
  13. ssokolow

    ssokolow Member

    Ok, it's fairly simple to do that then. Just create a file with contents like these (replace the ellipses, of course) and put it somewhere it won't get in your way:

    Code:
    #!/bin/sh
     
    xrandr --newmode ...
    xrandr --addmode ...
    Then, set it executable (either using the Properties dialog or "chmod +x /full/path/to/the/file" in a terminal).

    Finally, follow this handy guide to adding commands to the list of things that run on login. (You'll need to use the full path to that script you created unless you put it in /usr/local/bin)

    (You have to create a script rather than just adding both xrandr calls separately because it's the simplest way to ensure that they're run in that specific order)

    Let me know if you have any trouble.
     
  14. Mal Haak

    Mal Haak Member

    New NVIDIA driver has caused more issues.

    On laptops it only shows native resolution for the display. That's it. Also any attempts to change or add new resolutions are met with furious anger from xrandr. (Mind you the new nvidia driver actually supports xrandr 1.3 so that is a plus. But yeah.. It's looking like
    Might be the best ONLY course of action :S
     
  15. ssokolow

    ssokolow Member

    Yeah. Dredmor has insisted on 2560x1024 on my desktop for a month or two now. I've been too busy to find a workaround.

    Have you tried using the Metamodes option in xorg.conf to add alternate resolution options?

    My TwinView desktop has always defaulted to only offering 2560x1024 and I know that using Metamodes used to work. (I don't use it because I don't approve of games changing my desktop resolution and squashing together my sticky notes)

    Unfortunately, I've already tried that. Xephyr doesn't support OpenGL and Dredmor segfaults. Furthermore, I couldn't get the version of Xephyr with OpenGL pass-through to build.

    I'm currently studying for an exam, but once June rolls around, I'm going to experiment with patching SDL so it lies about which resolutions are available and always offers stuff like 640x480, 800x600, 1024x768, etc. up to the largest 4:3 resolution that'll fit in your actual one. (The idea being that, if Dredmor asks for one of the lying resolutions and DOESN'T ask for windowed mode, it gets it anyway)

    I'll probably prototype my SDL patch as an LD_PRELOAD hook so it's easy to add without rebuilding SDL. (Basically, a form of runtime patching. KGtk uses it to attempt to add KDE Open/Save dialogs to GTK+ apps)
     
  16. Mal Haak

    Mal Haak Member

    Metamodes aren't working right.
    One of the changes in the driver seems to be the cause


    I'm going to do some more work to see if I can make it happy.
     
  17. This does not work for me, v1.1.3 from humble bundle
    but game list only the 2880x1620 resolution in the select box.
    Laptop with Nvidia Optimus.

    Xorg:
     
    Last edited: Sep 13, 2016