Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Cannot change resolution in 14.01.1 (nvidia)

  1. #1
    Join Date
    Apr 2009
    Beans
    64
    Distro
    Ubuntu

    Cannot change resolution in 14.01.1 (nvidia)

    I just upgraded from 13.10 to 14.04.1; I'm using the nvidia drivers.

    My monitor is LG Flatron W1943S, 1440x900. Already in 13.10 after booting the corners of the display were not visible; I had to run nvidia-settings -> X Server Display Configuration -> Resolution -> Auto -> Apply and only then the corners of the display were aligned with the corners of the screen. (Saving into configuration files had no effect, I had to do this every time after startup.)

    I upgraded hoping this issue would have been fixed.

    To my dismay I discovered that it's actually worse: I still have the display problem, but running the procedure outlined above ends with the following error message:

    Code:
    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 538 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.)
    So after upgrading I'm stuck with a badly displaying screen. Of course, all applications display badly, too. (E.g. portions of buttons are hidden.)

    What should I do? Thanks in advance!

  2. #2
    Join Date
    Feb 2008
    Beans
    5

    Re: Cannot change resolution in 14.01.1 (nvidia)

    No solution, but you are not alone. I'm in the same boat atm. Tried using xrandr to set the config to no avail. Good luck and godspeed!

    Just wondering, is your computer booting into "nomodeset" from the GRUB? Mine was and now that I've changed it to quiet splash, rebooted, and set the Nvidia driver (340), logged out, I have more settings to chose from!
    Last edited by cfultz; October 5th, 2014 at 07:36 PM.

  3. #3
    Join Date
    Apr 2009
    Beans
    64
    Distro
    Ubuntu

    Re: Cannot change resolution in 14.01.1 (nvidia)

    Quote Originally Posted by cfultz View Post
    Just wondering, is your computer booting into "nomodeset" from the GRUB? Mine was and now that I've changed it to quiet splash, rebooted, and set the Nvidia driver (340), logged out, I have more settings to chose from!
    Mine has been set to quiet splash for a long time now. I thought it just meant I wouldn't see many starting messages?

    Nvidia-settings, apart from telling me "error querying target relations" on start but starting anyway, does show me a lot more options than in 13.10.

    Thanks to your pointer I did find out that my installation is using a 'legacy binary driver' from nvidia, 304. The highest option in the 'software & updates' -> 'proprietary drivers' menu is 331.38. I will choose that and see what happens.
    Last edited by Elwro; October 5th, 2014 at 08:50 PM.

  4. #4
    Join Date
    Apr 2009
    Beans
    64
    Distro
    Ubuntu

    Re: Cannot change resolution in 14.01.1 (nvidia)

    PARTIAL SUCCESS: namely,things are back to how they were in 13.10. In my case setting the drivers to 331.38, rebooting and running nvidia-settings again had the effect of it displaying

    ** Message: PRIME: No offloading required. Abort
    ** Message: PRIME: is it supported? no


    but starting anyway; then I set the display to 'Auto', hit 'apply' and I now have a nice-looking screen. I 'save it to the default configuration file'. We'll see if it works after a reboot. Fingers crossed.

    edit: nope, the change is not remembered. I'll have to do this every time after reboot again.

    Another bit of info: right after reboot xrandr reports the dimensions of the screen to be "410mm x 260mm". After the screen is 'fixed', xrandr reports "410mm x 256mm". This has to be wrong, since I see that initially the screen is too wide and according to xrandr the change is only in the vertical dimension. Anyway, it would be good to know how to make the system remember the "410mm x 256mm" information.

    So now my 2 questions are:

    1) What the correct way of saving the video configuration after changing the resolution? (Which file is the one to write to?) /etc/X11/xorg.conf is not it.
    2) Suppose I know the precise dimensions of my screen (e.g. from nvidia-settings -> X Screen 0 or from xrandr) in milimeters. Is there a way of 'hardcoding' this information into some configuration file?


    I hope you'll have some progress with you issue too, cfultz! Fingers crossed!


    (Incidentally, the clock again appears in the top bar about every second reboot (instead of always). Even that hasn't been fixed, and it's 14.04.1 already!)
    Last edited by Elwro; October 5th, 2014 at 09:06 PM.

  5. #5
    Join Date
    Apr 2009
    Beans
    64
    Distro
    Ubuntu

    Re: Cannot change resolution in 14.01.1 (nvidia)

    I hope I'll be forgiven for making another post on this.

    So, I inserted the '410 256' screen dimensions by hand to xorg.conf (section Monitor, option DisplaySize). No change.
    Right after startup, xrandr reports dimensions as 410x260, while nvidia-settings reports them as 381x238. Weird!

    So to repeat my current question: what is the graphical config file read by 14.04.1 on startup when a proprietary nvidia driver is in use?


    edit: there seems to be something wrong with how nvidia-settings writes to config files! Namely, whenever I xave the data to file 'a', a NEW FILE 'a.backup' is created WITH THE NEW INFORMATION while the old file 'a' is left intact! I found out while editing the XF86Config file; unfortunately, this isn't it, too.
    Last edited by Elwro; October 6th, 2014 at 08:02 AM.

  6. #6
    Join Date
    Apr 2009
    Beans
    64
    Distro
    Ubuntu

    Re: Cannot change resolution in 14.01.1 (nvidia)

    So yeah, I guess in this thread I will be documenting my fascinating adventures into the mess which is the nvidia relationship with X.

    Today I learned that the system has an X log file (yeah, I'm a newbie I guess), in 14.04.1 it is /var/log/Xorg.0.log. Now, this file can tell you for example which config file is used:
    Code:
    [    20.668] (==) Using config file: "/etc/X11/xorg.conf"
    So at least I know that. Of course, I don't know what to write there.

    But then there's another bit of info: when finally I set the screen properly using nvidia-settings, the log file contains the following line:
    Code:
    [  1070.108] (II) NVIDIA(0): Setting mode "DPY-1:nvidia-auto-select+0+0"
    So now the question is: where is a config file which contains a place in which I can write "DPY-1:nvidia-auto-select+0+0" so that the change is persistent?

    edit: I see that in xorg.conf the Screen section does contain the following:
    Code:
    Option         "metamodes" "nvidia-auto-select +0+0"
    edit2: the command
    Code:
    nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0"
    is doing the trick; however, I put it in ~/.xinitrc and it does not seem to be executed on starting X!

    ALRIGHT! THIS IS THE COMMAND! But I have completely no idea where to put it so it would be ran when starting X. I tried ~/.xinitrc; I also even put it inside /etc/X11/xinit/xinitrc even though I felt like a sinner doing so. Anyway, it still does not work. What should I do?


    edit3: I created a file 73nvidia-setup consisting of that single command and put it in /etc/X11/Xsession.d directory, because I thought Xsession would, on starting X, execute it. But it didn't. Any pointers would be greatly appreciated.

    The way I'm restarting X is
    Code:
    sudo restart lightdm
    Last edited by Elwro; October 7th, 2014 at 09:17 AM.

  7. #7
    Join Date
    Apr 2009
    Beans
    64
    Distro
    Ubuntu

    Re: Cannot change resolution in 14.01.1 (nvidia)

    OK, the issue is solved for me. In a dirty way.

    If someone has a similar problem like, here's what I did:
    1) created a file correctvideomode.sh (it can be whenever you want) consisting solely of the following line
    Code:
    nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0"
    2) made it executable
    Code:
    chmod +x correctvideomode.sh
    (ran from the folder with the file)
    3) Found "Startup Applications" using the Windows key on my keyboard and typing the name; clicked "Add" and then under 'command' the following:
    Code:
    bash /path/to/my/file/correctvideomode.sh
    Then my new 'startup application' went right to the top of the list and I couldn't do anything about it; I thought it should be after Nvidia X Server Setup but hey, it worked: because right now AFTER EACH LOGIN my screen looks correct.


    Why is it 'dirty'? Because really the command should be ran everytime X starts, not everytime I login. But I spent a few hours trying to figure out how to make lightdm run it when starting an X session - with no result. So hey, at least I found out something that gives the correct result for me in a 'primitive' way. Who knows, maybe someone will benefit from this in the future.
    (The key was looking at the end of the X log file after setting the mode correctly using nvidia-settings and discovering the command was listed as a 'metamode' in xorg.conf.)

  8. #8
    Join Date
    May 2010
    Location
    uk
    Beans
    9,249
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Cannot change resolution in 14.01.1 (nvidia)

    Hi

    Quote Originally Posted by Elwro View Post
    Why is it 'dirty'? Because really the command should be ran everytime X starts, not everytime I login. But I spent a few hours trying to figure out how to make lightdm run it when starting an X session - with no result.
    Check out the link below, specifically the section on system hooks.

    https://wiki.ubuntu.com/LightDM

    Point display-setup-script to your script.

    Kind regards
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

  9. #9
    Join Date
    Apr 2009
    Beans
    64
    Distro
    Ubuntu

    Re: Cannot change resolution in 14.01.1 (nvidia)

    Quote Originally Posted by matt_symes View Post
    Hi



    Check out the link below, specifically the section on system hooks.

    https://wiki.ubuntu.com/LightDM

    Point display-setup-script to your script.

    Kind regards
    Thank you, but I did that (in /etc/lightdm/lightdm.conf), and unfortunately it didn't work. (There was no difference in screen behaviour after logging out and back in.)
    Last edited by Elwro; October 7th, 2014 at 10:44 AM.

  10. #10
    Join Date
    May 2010
    Location
    uk
    Beans
    9,249
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Cannot change resolution in 14.01.1 (nvidia)

    Hi

    Quote Originally Posted by Elwro View Post
    Thank you, but I did that (in /etc/lightdm/lightdm.conf), and unfortunately it didn't work. (There was no difference in screen behaviour after logging out and back in.)
    Oh. That's a surprise.

    Did you try this hook ?

    Code:
    session-setup-script
    Also try rebooting just in case.

    Kind regards
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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