xrandr app for wine?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
Ashboy
Level 2
Level 2
Posts: 21
Joined: Fri May 10, 2013 3:29 pm

xrandr app for wine?

Post by Ashboy »

I'm looking for an app that sets an actual, not-emulated screen resolution for which ever game I'm playing. Step by step, it should do roughly this:

0.
In a separate program, I can manually adjust a configuration file that states which wine games need to be run in which resolution. It also states a default desktop resolution.
-
1. In the window manager, I click on the main menu icon, then browse to the Wine folder and click on a game shortcut.
2. The shortcut links to a small script that detects which Wine program I'm trying to run, and sets the correct screen resolution for it, through the configuration file in step 0:

Code: Select all

$ xrandr --output LVDS --mode 1024x768 --rate 60
*it can also be vga1 or something else instead of LVDS, it's just what applies to me for whatever reason.
3. I quit the game.
4. The script detects that the Wine session has ended and restores the desktop to the default resolution:

Code: Select all

$ xrandr --output LVDS --mode 1280x800 --rate 60
Does something like this exist? It seems rather simple and it would make my life *so* much easier. Would be even better if we could set this in the Wine Configuration GUI, which already assigns certain settings to specific executables.
Ashboy
Level 2
Level 2
Posts: 21
Joined: Fri May 10, 2013 3:29 pm

Re: xrandr app for wine?

Post by Ashboy »

I found this wine registry key called UseXRandR, but enabling doesn't do anything. It seems to imply though there is a xrandr extension for Wine. I can find NO info about it though, can anyone offer any insights?
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: xrandr app for wine?

Post by dimesio »

Wine does not have an app that does what you want. That registry key is to disable Wine's use of xrandr altogether. http://wiki.winehq.org/UsefulRegistryKeys
Ashboy
Level 2
Level 2
Posts: 21
Joined: Fri May 10, 2013 3:29 pm

Re: xrandr app for wine?

Post by Ashboy »

But if it can be disabled, is there something that enables it? It's certainly not on by default!
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: xrandr app for wine?

Post by dimesio »

Yes, it is enabled by default.
Ashboy
Level 2
Level 2
Posts: 21
Joined: Fri May 10, 2013 3:29 pm

Re: xrandr app for wine?

Post by Ashboy »

But why doesn't it work then? I have to do this manually, every time.
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: xrandr app for wine?

Post by dimesio »

Do what manually? Games that allow you to change the resolution normally store the settings in their own configuration file, which is read on startup. If you have a game where this is not working--either the game settings aren't being saved, or aren't being used--that's a bug. But if the game itself doesn't save such settings, then it's not a Wine issue.
Ashboy
Level 2
Level 2
Posts: 21
Joined: Fri May 10, 2013 3:29 pm

Re: xrandr app for wine?

Post by Ashboy »

I have to manually change my resolution with xrandr every time, or whatever game I'm playing. It never goes fullscreen, I even set the xrandr regedit key to Y. It works like this for all the games I have installed at the moment.

- System Shock 2
- Thief Series
- Deus Ex
- Baldur's Gate
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: xrandr app for wine?

Post by dimesio »

Wine version? If it's not the latest development release, upgrade.

Graphics card & driver?

Does it work if you run Wine in an emulated virtual desktop?
Ashboy
Level 2
Level 2
Posts: 21
Joined: Fri May 10, 2013 3:29 pm

Re: xrandr app for wine?

Post by Ashboy »

It's the latest, 1.6-rc4. I also tried the stable version a few week ago, same effect.

I'm using an ATI mobile card (x1250 ME35), but contrary to the usual suspects it doesn't actually run all that badly. The xrandr command for instance work just fine in the console. I could be wrong, but I think it's using the Gallium driver that comes with Xubuntu.

Running it in a virtual desktop makes no difference, xrandr never kicks in.
Ashboy
Level 2
Level 2
Posts: 21
Joined: Fri May 10, 2013 3:29 pm

Re: xrandr app for wine?

Post by Ashboy »

Ashboy wrote:I have to manually change my resolution with xrandr every time, or whatever game I'm playing.
Just to avoid confusion, I had intended to write 'ON whatever game I'm playing'. This isn't an either/or situation, it simply never works.
Last edited by Ashboy on Sat Jul 13, 2013 8:53 am, edited 1 time in total.
Ashboy
Level 2
Level 2
Posts: 21
Joined: Fri May 10, 2013 3:29 pm

Re: xrandr app for wine?

Post by Ashboy »

double post.
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: xrandr app for wine?

Post by dimesio »

What actually happens when you don't use xrandr in the command line?
Ashboy
Level 2
Level 2
Posts: 21
Joined: Fri May 10, 2013 3:29 pm

Re: xrandr app for wine?

Post by Ashboy »

I figured out what was wrong. The 'default settings' graphics configuration in Wine config's Application Settings had a virtual desktop enabled and this somehow blocked xrandr for programs with custom settings. I thought every application manually added to the list with custom settings would override all default settings, but this apparently not the case. Every custom .exe had the virtual desktop disabled, I never saw it while running a game. Hence I never had any reason to think it was still on some level enabled. But I noticed it now and turned everything off in the default configuration. Xrander now works automatically again for every game.

Conclusion: The default settings config does not entirely act as a default, at least one setting spills over a little and affects other games. It shouldn't override graphics settings for other applications if they already have their own custom settings.
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: xrandr app for wine?

Post by dimesio »

Ashboy
Level 2
Level 2
Posts: 21
Joined: Fri May 10, 2013 3:29 pm

Re: xrandr app for wine?

Post by Ashboy »

Wow, it has been around that long?
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: xrandr app for wine?

Post by dimesio »

It's a low priority. Few people even encounter it because virtual desktop is turned off by default, and it's more intuitive to leave it that way and turn it on per app, which works.
Ashboy
Level 2
Level 2
Posts: 21
Joined: Fri May 10, 2013 3:29 pm

Re: xrandr app for wine?

Post by Ashboy »

I can live with that. Thanks again for the help, Dimensio.
Locked