以不同的分辨率和声音开始第二个 X 会话

Oli*_*Oli 7 xorg wine pulseaudio

我有两个屏幕与 twinview 连接在一起。一些应用程序将其视为一个 3840*1200 的大面板,但这在第一人称射击游戏中非常不受欢迎,因为您的视线最终会落在两个屏幕之间的间隙中。

所以我通常在 1920*1200px 的窗口中运行 Wine 游戏。窗口管理器使其在一个屏幕上全屏显示,这对某些游戏非常有用。然而,有些游戏滞后,这会导致鼠标飞出 Wine 窗口的一侧,导致我的播放器像吸毒的狐狸一样旋转。

还有一大堆没有良好窗口模式的原生游戏(X3、OpenArena、Quake4、QuakeWars 等)。在 X3 上使用窗口模式会导致鼠标变得超级敏感。

如果我可以在仅使用一个屏幕的新 X 会话中启动一些游戏,那不是很好吗?!

它会。我已经为 Steam 做到了这一点:

#!/bin/sh

X :3 -ac & nvidia-settings --load-config-only
sleep 10 # wait for X to catch up

cd ~/.wine/drive_c/Program\ Files/Steam/
DISPLAY=:3 WINEDEBUG=-all wine "Steam.exe"
Run Code Online (Sandbox Code Playgroud)

现在这在技术上使用两个屏幕,但是当游戏在已设置为 1920*1200 后以全屏模式启动时,它们似乎适应并使用我的 xorg.conf 元模式之一。如果我能在这个可执行文件中明确说明模式会更好。有没有办法做到这一点?

也没有声音。我有 WinePulse 补丁,所以我只需要让 PulseAudio 连接到这个会话中(反之亦然),我认为现在我很高兴。

编辑:拉尔夫了解了一些事情,但错过了(或误解了)其他一些事情。这可能归结为我过于冗长的问题。尽管帖子很长,但我只有两个问题。

以下是我在简洁设置中的问题:

  • 如何以指定的分辨率启动新的 X 会话?我最好在调用 X 时指定现有的元模式或确切的分辨率。

  • 如何让新 X 会话上的应用程序与正确的 PulseAudio 服务器通信?目前,他们似乎没有排队。我已经用 进行了测试totem,而不仅仅是 Wine 应用程序。

Ral*_*alf 3

更具体地回答你的问题。您可以使用 nvidia-settings 更改元模式。来自 nvidia-settings --help 的片段:

-a, --assign=[ASSIGN]
  The ASSIGN argument to the '--assign' commandline option is of the form:

    {DISPLAY}/{attribute name}[{display devices}]={value}

  This assigns the attribute {attribute name} to the value {value} on the X
  Display {DISPLAY}.  {DISPLAY} follows the usual {host}:{display}.{screen}
  syntax of the DISPLAY environment variable and is optional; when it is
  not specified, then it is implied following the same rule as the
  --ctrl-display option.  If the X screen is not specified, then the
  assignment is made to all X screens.  Note that the '/' is only required
  when {DISPLAY} is present.

  {DISPLAY} can additionally include a target specification to direct an
  assignment to something other than an X screen.  A target specification
  is contained within brackets and consists of a target type name, a colon,
  and the target id.  The target type name can be one of "screen", "gpu",
  "framelock", "vcs", "gvi", or "fan"; the target id is the index into the
  list of targets (for that target type).  The target specification can be
  used in {DISPLAY} wherever an X screen can be used, following the syntax
  {host}:{display}[{target_type}:{target_id}].  See the output of
  `nvidia-settings -q all` for information on which target types can be
  used with which attributes.  See the output of `nvidia-settings -q
  screens -q gpus -q framelocks -q vcs -q gvis -q fans` for lists of
  targets for each target type.

  The [{display devices}] portion is also optional; if it is not specified,
  then the attribute is assigned to all display devices.

  Some examples:

    -a FSAA=5
    -a localhost:0.0/DigitalVibrance[CRT-0]=0
    --assign="SyncToVBlank=1"
    -a [gpu:0]/DigitalVibrance[DFP-1]=63
Run Code Online (Sandbox Code Playgroud)