It’s been roughly 7 years since I started using Linux. My first distro was Ubuntu, and I remember spending two weeks of my summer before college trying to get it to work on my Dell Latitude. The problems back then were my Broadcom wireless card and Nvidia graphics card.
Fast-forward to now, I’m again using Ubuntu for my lab computer. Internet/wireless is no longer a problem (good job Canonical!). Nvidia remains a huge problem.
Ubuntu 14.04, Nvidia GTX-760
Using the proprietary Nvidia-331, I was able to get dual-monitor to work. However, a few minor (not affecting Matlab usage for work), but extremely annoying problems were present:
1) The first problem was I am not able to log-out. Clicking the log-out button would result in a blackscreen.
2) Upon force rebooting after this blackscreen, Ubuntu would complain about an internal error: “soft lockup – CPU#0 for 22s!”. There have been some bug reports about this, but my kernel seemed to be stable.
3) I also cannot boot into any of my tty1-6. Ctrl-Alt-F1 through F6 just gives me a black screen similar to what happens after I log out. Recognizing potential similarity, I continuously hit Ctrl-Alt-F7 until X comes back up again. And voila, the same “soft lockup” error occurs.
4) In dmesg, I would see errors related to Nvidia as well, such as:
[ 22.493961] nvidia: module license 'NVIDIA' taints kernel.
[ 22.498143] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[ 664.524208] init: nvidia-persistenced main process (23947) terminated with status 1
NVRM: Your system is not currently configured to drive a VGA console
Jun 25 23:39:52 localhost kernel: [ 19.420832] NVRM: on the primary VGA device. The NVIDIA Linux graphics driver
Jun 25 23:39:52 localhost kernel: [ 19.420834] NVRM: requires the use of a text-mode VGA console. Use of other console
Jun 25 23:39:52 localhost kernel: [ 19.420835] NVRM: drivers including, but not limited to, vesafb, may result in
Jun 25 23:39:52 localhost kernel: [ 19.420836] NVRM: corruption and stability problems, and is not supported.
Seems like Nvidia is making my computer sad. Not exactly sure why this problem keeps happening, but switching to the open-source Nouveau driver solved the problem. I have yet to see a big performance difference (but again, I mainly do non-graphics intensive processing in Ubuntu on this box).
After Nouveau, I can now log out, boot to tty, and not lock up at all!
My dual monitor had a problem of one monitor having shit resolution. Ubuntu’s native display setting does not detect resolution for my second monitor above 800×600.
Arandr does not detect the correct resolution either. Xrandr for the rescue, the following lines get my dual monitor working:
cvt 1680 1050
returns the following screen mode setup
# 1680x1050 59.95 Hz (CVT 1.76MA) hsync: 65.29 kHz; pclk: 146.25 MHz
Modeline "1680x1050_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync
// Create the new mode
xrandr --newmode "1680x1050_59.95" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync
// Add this new mode to my desired monitor, named "DVI-I-1", found through "xrandr -q"
xrandr --addmode DVI-I-1 "1680x1050_59.95"
// Use this new resolution
xrandr --output DVI-I-1 --mode 1680x1050
However, this does not persist after login-out, and arandr still does not detect the changes, which is strange. Google suggests two solutions:
1) Put the steps used to configure dual monitor from before into “/etc/rc.local”, the startup script; or
2) Edit “/etc/X11/xorg.conf”, which I absolutely despite.
Turns out my xorg.conf file was generated by nvidia-settings, and somehow only included one monitor. Upon deleting the file and rebooting, arandr correctly detects my monitor setup.