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
Bookmarks