Gnome shell 无法保存屏幕分辨率

Ale*_*len 7 gnome 14.04

今天我决定在 Ubuntu 14.04 上尝试 Gnome shell 3.10,我注意到每次重新启动后我的屏幕分辨率都设置为最大值,这是不可取的。在 Unity 我没有这样的问题。此外,如果我尝试使用 nvidia-settings 更改分辨率,则会出现此错误:

ERROR: Error querying target relations


(nvidia-settings:31370): IBUS-WARNING **: The owner of /home/alen/.config/ibus/bus is not root!
The program 'nvidia-settings' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadValue (integer parameter out of range for operation)'.
  (Details: serial 544 error_code 2 request_code 157 minor_code 25)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
Run Code Online (Sandbox Code Playgroud)

显卡:GeForce 6100 nForce 420/integrated/SSE2/3DNOW!

有什么解决办法吗?

Chr*_*iki 11

可能的原因

我假设您的显示器报告首选高屏幕分辨率;不幸的是,GNOME Shell 在每次登录时都会使用此信息来重置分辨率。

怎么修

我遇到了相反的问题:我的显示器报告的首选屏幕分辨率 (1280x1024) 低于我想要使用的屏幕分辨率 (1600x1200)。不过,我使用的修复程序有望类似地适用于您的问题。这是我所做的:

我跑去xrandr -q找出当前首选的屏幕分辨率是多少,还有哪些其他屏幕分辨率(或者更确切地说是“模式线”)可用。在输出中,标有 a 的模式行+是当前首选的模式行。它还匹配当前使用的(标有*)。这是我的输出(缩写):

Screen 0: minimum 320 x 200, current 1280 x 1024, maximum 8192 x 8192
DVI-0 disconnected (normal left inverted right x axis y axis)
DIN disconnected (normal left inverted right x axis y axis)
DVI-1 connected primary 1280x1024+0+0 (normal left inverted right x axis y axis) 352mm x 264mm
   1280x1024      85.0*+   75.0     60.0  
   1920x1440      60.0  
   …  
   1600x1200      85.0     75.0     70.0     65.0     60.0  
   …
Run Code Online (Sandbox Code Playgroud)

为了覆盖首选的屏幕分辨率,我创建了/etc/X11/xorg.conf包含以下内容的文件:

Section "Monitor"
    Identifier "DVI-1"
    Option "PreferredMode" "1600x1200"
EndSection
Run Code Online (Sandbox Code Playgroud)

如您所见,我从输出中获取了监视器标识符DVI-1和新的首选模式行名称。您应该根据自己的设置替换这些值。1600x1200xrandr -q

注销(或重新启动)后,新的首选模式行会自动用于我的显示管理器和 GNOME Shell。的新(缩写)输出xrandr -q如下:

Screen 0: minimum 320 x 200, current 1600 x 1200, maximum 8192 x 8192
DVI-0 disconnected (normal left inverted right x axis y axis)
DIN disconnected (normal left inverted right x axis y axis)
DVI-1 connected primary 1600x1200+0+0 (normal left inverted right x axis y axis) 352mm x 264mm
   1600x1200      85.0*+   75.0     70.0     65.0     60.0  
   1280x1024      85.0 +   75.0     60.0  
   1920x1440      60.0  
   …
Run Code Online (Sandbox Code Playgroud)

  • 这帮助我在连接到 4K 显示器的 18.04 上进行非常小的 lightdm 登录。多谢。 (2认同)
  • 2023年仍然有效! (2认同)