Results 1 to 9 of 9

Thread: Can X do this?

  1. #1
    Join Date
    Nov 2008
    Posts
    69

    Default Can X do this?

    Hi all,

    I've just been speaking to one of the Wine devs about being stuck at a low resolution when a fullscreen game crashes. He said that Windows has a concept of a temporary resolution change (CDS_FULLSCREEN flag), which will reset the resolution if the app crashes. Does xrandr/xserver have anything like this, if not, why not?

    Luke.

  2. #2
    Join Date
    Nov 2008
    Posts
    755

    Default

    I don't think so. But this feature could be handled within wine.

    If a wine program crashes, there's still wineserver running, and that should be able to do the needed cleanup work. If you want this feature, I suggest investigating there first.

  3. #3
    Join Date
    Nov 2008
    Posts
    69

    Default

    Sorry I should have been clearer, Wine can be patched to handle this situation, but the same thing happens with native games too. It would be something very useful for X to have, I'm just wondering why it doesn't already.

  4. #4
    Join Date
    Feb 2008
    Location
    Linuxland
    Posts
    4,729

    Default

    Open shell, type xrandr --auto
    Or, ctrl-alt-keypadplus

  5. #5
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    983

    Default

    There's an open request for this, but no action on it yet:
    https://bugs.freedesktop.org/show_bug.cgi?id=14255

  6. #6
    Join Date
    Jan 2009
    Posts
    117

    Default

    Easy scripting solution:
    Code:
    #usage: give program and it parameters as argument
    XRANDR_PARAMS="-s 1024x768"
    
    $*
    
    if [ $? ]
    then
        xrandr $XRANDR_PARAMS
    fi
    Of course it could be possible to parse xradr output for current mode and pass that as argument instead of preset argument list

  7. #7
    Join Date
    Nov 2008
    Posts
    755

    Default

    if you're going for workarounds, the best workaround is to run the games in a second, independent X server. That way, you can still switch between game and desktop. For example:

    Code:
    xinit ut2004 -- :1 -br
    or if you'd like to setup the second X server, just create a simple script to pass to xinit, i.e.:

    Code:
    #!/bin/bash
    
    nvidia-settings --config="~/ut2004_nvidia-settings-rc" --load-config-only
    xmodmap ~/.Xmodmap
    ut2004

  8. #8
    Join Date
    Nov 2008
    Posts
    69

    Default

    Those workarounds are cool but I was more interested in whether X had something similar and apparently it doesn't, it's a shame this isn't seen as a more important issue by the devs because it's annoying enough for someone experienced in Linux to be left at a crappy resolution if a game crashes, but plain alienating to a newbie. I might look into writing a patch if/when I have some time...

  9. #9
    Join Date
    Nov 2007
    Posts
    1,024

    Default

    Quote Originally Posted by Kazade View Post
    Those workarounds are cool but I was more interested in whether X had something similar and apparently it doesn't, it's a shame this isn't seen as a more important issue by the devs because it's annoying enough for someone experienced in Linux to be left at a crappy resolution if a game crashes, but plain alienating to a newbie. I might look into writing a patch if/when I have some time...
    I'm not sure X is where this needs to be done. It perhaps is a better task for the desktop environment, which should already have bits for dealing with xrandr.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •