7

Today I decided to try Gnome shell 3.10 on Ubuntu 14.04 and I noticed that after every restart my screen resolution is set to maximum which is not desirable. In Unity I don't have such problems. Also if I try to change resolution with nvidia-settings I get this error:

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.)

Graphic card: GeForce 6100 nForce 420/integrated/SSE2/3DNOW!

Is there any fix for this?

10

Probable Cause

I assume that your monitor reports the high screen resolution as being preferred; unfortunately this information is used by GNOME Shell on each login to reset the resolution.

How to Fix

I had the opposite problem: my monitor reported a lower preferred screen resolution (1280x1024) than the one I wanted to use (1600x1200). The fix I have used will hopefully be applicable analogously to your problem, though. Here’s what I did:

I ran xrandr -q to find out what the current preferred screen resolution is and what other screen resolutions (or rather “mode lines”) are available. In the output, the mode line marked with a + is the current prefferred one. It also matched the currently used one (marked with a *). Here’s the output for me (abbreviated):

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  
   …

To override the preferred screen resolution, I have created the file /etc/X11/xorg.conf with the following content:

Section "Monitor"
    Identifier "DVI-1"
    Option "PreferredMode" "1600x1200"
EndSection

As you can see, I took both the monitor identifier DVI-1 and the new preferred mode line name 1600x1200 from the xrandr -q output. You should replace these values according to your own setup.

After a logout (or reboot), the new preferred mode line was automatically used for both my display manager and for GNOME Shell. The new (abbreviated) output of xrandr -q was the following:

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  
   …
  • This helped me with my very tiny lightdm login on 18.04 attached to a 4K monitor. Thanks a lot. – Takkat Jan 5 at 22:46
0

This is an alternative for anyone with the same issue.

There is a file named "monitors.xml" inside the "~/.config" folder. The file was write protected on my system so you may need to sudo.

Make a backup copy of this file.

Modify the resolution specified in The file to the one you desire. Save.

After that just restart the Shell with alt+f2 r. The screen will change resolution to the one specified in the file.

In my case it works even after a reboot and now I don't need to use a script to fix the resolution after login in.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.