Showing posts with label nvidia. Show all posts
Showing posts with label nvidia. Show all posts

Wednesday, November 23, 2016

Fix "Cinnamon Just Crashed" on Linux Mint 17.3

A recent update in Linux Mint included the nVidia 367 driver. Even though my HTPC was using integrated graphics, having the driver installed causes Cinnamon to crash with the error message:

Cinnamon just crashed. You are running in fallback mode.

A fix is to remove the nVidia 367 driver completely:

sudo apt-get purge nvidia-367

Reboot and Cinnamon should be running okay again.

Saturday, November 22, 2014

Build Log Followup: Another Gigabyte G1 Gaming

Continuing on from last week's post, while I wanted to track down an MSI GTX970 to try it out, local suppliers were completely out of stock of that card. And then MSY had a 10% off Gigabyte products sale, so...long story short I got a Gigabyte GTX970 G1 Gaming.

The GTX970 G1 Gaming

Couple of points of note for anyone thinking of getting one:

  • The specs say the length is 312mm, but I think this includes both the frame and perhaps a little leeway. I measured 298mm from the inside of the frame to the end, so it might fit in cases where the specs say it shouldn't. Viewer discretion advised.
  • Requires 1x8-pin and 1x6-pin power connectors.
  • I've run it with the Power-Mate Lite for over a week — on the i7-4790K (stock) system the maximum power draw was 316W while gaming.

On the Windows side there were no issues of note compared to the last one I installed, but on Linux it was a different story.

I had a Kubuntu 14.04 install on the same machine with Windows 8.1, which was working perfectly with Intel graphics. After plugging in the GTX970, the Linux install refused to boot. Using "text" or "text nomodeset" override options in grub showed it was hanging at random places during the boot process. Even a live distro off USB failed to get a display. While running off onboard I installed the nvidia-current drivers, which didn't help.

The solution turned out to be installing the latest xorg-edger drivers. The process is described in this forum post by Kade7596, but the brief summary is:

sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-346

Normally I would run "nvidia-xconfig" after installing the drivers, but the 346 drivers don't seem to include this application any more. Since I'd already run it using the older drivers from the Ubuntu nvidia-current target, I had a default xorg.conf written. Not sure if it was necessary.

After installing nvidia-346 the GTX970 now works.

In closing, the G1 Gaming also glows in the dark...

Monday, October 20, 2014

nVidia Tearing Fix in Kubuntu 14.04

Finally got around to revisiting this issue. Last time I tried I black screened the system, but with the TTY consoles successfully in operation that isn't so much of a risk.

Seems the following fix from AskUbuntu (thanks Barafu!) solves the problem. The solution is almost identical to the fix I used for 13.04, but adds an extra line to /etc/profile:

export __GL_YIELD="USLEEP" export __GL_THREADED_OPTIMIZATIONS=1

Not sure why I got the black screen, it may have been something unrelated, as this worked perfectly on two differed Kubuntu+nVidia systems.

Saturday, October 11, 2014

Build Log Addendum: Gigabyte GTX970 G1 Gaming

Update on last week's build log: managed to pick up a Gigabyte GTX970 G1 Gaming for the machine.

The Gigabyte GTX970 G1 Gaming

Installing the card went without issue. It proved to be a nice, quiet card after installing the nVidia drivers (fans were noisy at first boot -- probably as expected -- until the proper driver was installed).

Interestingly, despite the Fractal Design Arc Midi R2 specs saying it only has 290mm clearance for GPUs with the HDD cage installed, the Gigabyte GTX970 just fit (was a squeeze, but I could get it in). So obviously there is some leeway in Fractal Design's specs for this case.

Completed build. This is without the HDD cage -- I left it out in the end for better airflow

To test it out I ran through Unigine Heaven again. At 1920x1080 Ultra 0xAA, it scored 2627 (average FPS: 104.3, min FPS: 29.3, max FPS: 205.3). At Ultra 8xAA, it scored 1786 (average FPS: 70.9, min FPS: 8.8, max FPS: 137.6). A little better than the 10 FPS average of the onboard graphics.

Running through Hitman: Absolution in-game benchmark (random game I had available on Steam) it scored Average FPS: 60.2, Min FPS: 50.5, Max FPS: 72.0.

Monday, August 18, 2014

Fix Missing TTY Terminal with nVidia GPU

So I had this long-running problem where as soon as I installed the drivers for an nVidia GPU, I'd lose the terminals (normally accessed by Ctrl-Alt-F1, Ctrl-Alt-F2, etc). The processes were still running, but nothing was visible. This was particularly annoying if I did anything to trash the desktop environment --- couldn't get access to a terminal to fix things.

Turns out the solution though is pretty simple: modify the file /etc/default/grub so that instead of saying "quiet splash" it says "nomodeset" (make a copy of your original grub file first to be safe):

#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX_DEFAULT="nomodeset"

Then run sudo update-grub. Upon reboot, the TTYs will be visible again. Spews out the entire boot log to the screen as well, but that wasn't really a concern at all for me.

Saturday, September 21, 2013

Conky Config

(Update 25-Oct-2014: Slightly updated version posted.

Just installed conky and looked around for some cute configs. This one by asoliverez looked nice, so I grabbed it and started playing around.

It didn't quite work for all values, since I didn't have all the pre-requisite software installed. So I hacked it up a little bit, and came up with the following that works with sensors (I worked out how to do it using this guy's example as a template), nvidia-smi (since I've got an nVidia GPU installed) and my particular file systems setup:

File: .conkyrc

background no
font Sans:size=8
#xftfont Sans:size=10
use_xft yes
xftalpha 0.9
update_interval 5.0
total_run_times 0
own_window yes
own_window_type normal
own_window_argb_visual true
own_window_transparent yes
#own_windiw_class conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# To make conky always on top, swap 'below' in above line to 'above':
#own_window_hints undecorated,above,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 220 5
maximum_width 220
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders yes
default_color CDE0E7
default_shade_color black
default_outline_color green
alignment top_right
gap_x 12
gap_y 35
no_buffers yes
uppercase no # set to yes if you want all text to be in uppercase
cpu_avg_samples 2
override_utf8_locale no

TEXT
${color white}SYSTEM ${hr 1}${color}

Hostname: $alignr$nodename
Kernel: $alignr$kernel
Uptime: $alignr$uptime
MB Temperature: ${alignr}${iconv_start UTF-8 ISO_8859-1}${exec sensors|grep 'Physical id 0'|awk '{print $4}'}${iconv_stop}
CPU Temperature 0: ${alignr}${iconv_start UTF-8 ISO_8859-1}${exec sensors|grep 'Core 0'|awk '{print $3}'}${iconv_stop}
CPU Temperature 1: ${alignr}${iconv_start UTF-8 ISO_8859-1}${exec sensors|grep 'Core 1'|awk '{print $3}'}${iconv_stop}
CPU Temperature 2: ${alignr}${iconv_start UTF-8 ISO_8859-1}${exec sensors|grep 'Core 2'|awk '{print $3}'}${iconv_stop}
CPU Temperature 3: ${alignr}${iconv_start UTF-8 ISO_8859-1}${exec sensors|grep 'Core 3'|awk '{print $3}'}${iconv_stop}
Fan 1: ${alignr}${hwmon 1 fan 1} RPM
Fan 2: ${alignr}${hwmon 1 fan 2} RPM
#Battery: ${alignr}${battery_percent BAT0}%
CPU: ${alignr}${freq} MHz
GPU Temp: ${alignr}${exec nvidia-smi | grep '. ..\% ..C'|awk '{print $3}'}${iconv_start UTF-8 ISO_8859-1}°${iconv_stop}C
Processes: ${alignr}$processes ($running_processes running)
Load: ${alignr}$loadavg

CPU1 ${alignr}${cpu cpu1}%
${cpubar cpu1}
CPU2 ${alignr}${cpu cpu2}%
${cpubar cpu2}
CPU3 ${alignr}${cpu cpu3}%
${cpubar cpu3}
CPU4 ${alignr}${cpu cpu4}%
${cpubar cpu4}

Ram ${alignr}$mem / $memmax ($memperc%)
${membar 4}
swap ${alignr}$swap / $swapmax ($swapperc%)
${swapbar 4}

${color gray}Highest CPU $alignr CPU% MEM%${color}
${top name 1}$alignr${top cpu 1}${top mem 1}
${top name 2}$alignr${top cpu 2}${top mem 2}
${top name 3}$alignr${top cpu 3}${top mem 3}

${color gray}Highest MEM $alignr CPU% MEM%${color}
${top_mem name 1}$alignr${top_mem cpu 1}${top_mem mem 1}
${top_mem name 2}$alignr${top_mem cpu 2}${top_mem mem 2}
${top_mem name 3}$alignr${top_mem cpu 3}${top_mem mem 3}

${color white}Filesystem ${hr 1}${color}

Root: ${alignr}${fs_used /} / ${fs_size /}
${fs_bar 4 /}
Files: ${alignr}${fs_used /files} / ${fs_size /files}
${fs_bar 4 /files}

${color white}NETWORK ${hr 1}${color}

Eth0: ${addr eth0}
Down ${downspeed eth0} k/s ${alignr}Up ${upspeed eth0} k/s
${downspeedgraph eth0 25,107} ${alignr}${upspeedgraph eth0 25,107}
Total ${totaldown eth0} ${alignr}Total ${totalup eth0}

Wlan0: ${addr wlan0}
Signal: ${alignr}${wireless_link_qual wlan0}%
Down ${downspeed wlan0} k/s ${alignr}Up ${upspeed wlan0} k/s
${downspeedgraph wlan0 25,107} ${alignr}${upspeedgraph wlan0 25,107}
Total ${totaldown wlan0} ${alignr}Total ${totalup wlan0}

(Text wrap doesn't work real well...sorry. It should cut and paste okay though if anyone is interested in it).

(Update 23-Dec-2013: Added option to keep conky "always on top").

(Update 27-Sep-2014: Fixed CPU bar always showing same % issue).

Looks pretty good sitting there over in the corner of the screen:

Sunday, September 15, 2013

Fixing Tearing with Kubuntu 13.04 and nVidia 304.88

UPDATE 26th May 2014: I tried this same fix on Kubuntu 14.04, and it black-screened the system. I'd also been tinkering with some other stuff at the same time, so haven't tracked it down exactly (or what the new fix might be), but I suspect it is the GL_YIELD change to /etc/profile below. I don't recommend doing it unless you're ready to rollback/recover the original.. UPDATE 20th Oct 2014: Tried a very similar fix on 14.04 and this time it worked, so not sure what was going on here.

After finding a workaround to fix tearing on Mint 15 Cinnamon, I jumped to Kubuntu 13.04 because there were some strange issues with screen recording in Mint, I assume because of the tearing workaround affected some of the internals in the graphics stack that screen capture uses.

Unfortunately, Kubuntu had the same tearing issue that Xubuntu exhibited. The solution again was a workaround, but different:

  • Install KDE 4.11 as per the instructions at this noobslab article:

    sudo add-apt-repository ppa:kubuntu-ppa/backports
    sudo apt-get update
    sudo apt-get dist-upgrade

    (Not sure if this was actually necessary, but it was one of the other things I tried first).
  • In "Desktop Effects -- KDE Control Module" => Advanced tab, set Compositing type to "OpenGL 3.1" and Tearing Prevention (VSync) to "Re-use screen content".
  • Add:

    export __GL_YIELD="USLEEP"

    To /etc/profile as per this KDE forum post. NOTE: But see above regarding this possibly having problems in more recent versions.

That should fix the tearing.

Note on Fullscreen Games

For some reason, the above worked in the general desktop environment, but fullscreen games were still tearing. The fix that worked in that case was to uncheck "Suspend desktop effects for fullscreen windows". Not sure why that made things better, since I would have thought the other way around would work, but that's the change that fixed it.

Things That Didn't Work

For reference, here are the things I tried that didn't work:

  • Turn off compositing with Alt+Shift+F12 (no effect).
  • Install KDE 4.11 (as noted above, this by itself didn't help, but may be necessary for the workaround).
  • Install compiz. The tearing was perhaps a little better, but still not great, and compiz just doesn't look as good as kwin.

And one last resort I would have tried eventually: Re-compiling KDE with this patch.

Monday, June 17, 2013

Fixing nVidia Graphics Tearing on LinuxMint Cinnamon

So, after installing an nVidia GTX 650TI a while back, I put up with tearing in pretty much all applications because it was easy to install and get going.

But eventually I got sick of it and tried to fix it. After trying about every fix I could find, I jumped to a different distro (from Xubuntu 12.10 to Mint 15) in the hope that might have some effect. It didn't, but I re-tried a fix I thought I'd already tried, and found it eliminated the tearing 100%.

The fix is to add this to the /etc/environment file:

CLUTTER_PAINT=disable-clipped-redraws:disable-culling
CLUTTER_VBLANK=True

This is using the nVidia proprietary driver 304.88. Hope to confirm on other Xubuntu systems whether this fix also works.

Update 20 June 2013:

Unfortunately, the fix only seems to work in Mint/Cinnamon. Title updated to reflect this.

Sunday, March 10, 2013

Asus GTX 650TI on Linux

So after suffering through the (self-inflicted) pain of trying to run an AMD GPU under Linux, I bought an nVidia-based GTX 650ti to try out next.

Asus GTX 650ti

The 650ti doesn't have the best reputation for value (with performance that is similar if not worse than the much cheaper HD7770), but it seemed to go okay in reviews and is realistically already overkill for anything I'm going to use it for.

In box

I narrowed the choices down to an Asus version versus the MSI Power Edition. While I'd heard goods things about the MSI PE cards, in the end it came down to:

  • DVI-D ports (compared to DVI-I).
  • HDMI ports (compared to mini-HDMI. I have plenty of HDMI cables, but no mini ones).
  • Low noise level and temperatures in reviews (though the MSI is similar here anyway).

Ports

Installation

Compared to the troubles I had with the AMD, getting the nVidia card up and running is a breeze. Admittedly, I cheated this time and went straight to the proprietary driver. The open-source driver (nouveau) worked fine straight after installing the card, and I'll probably keep an eye on it (it's apparently made some recent advances in capability). But, I was tired, and just wanted something to work, so I cheated.

Plugged in to motherboard

To see which drivers are installed, you can use:

$ sudo lspci -v

For more (or heaps more) information, you can use -vv or -vvv to the above command. Running with sudo gives you a bit of extra output as well.

Initially you'll see a line something like this in the VGA controller section:

Kernal modules: nouveau, nvidiafb

These are the open-source drivers installed automatically in recent kernels.

To install the proprietary drivers, you can use aptitude to look up the possible targets:

$ aptitude search nvidia

To get going, all you need is to do the following:

$ sudo apt-get install nvidia-current nvidia-settings
$ sudo nvidia-xconfig
$ sudo <reboot>

The xconfig command above writes a default file to /etc/X11/xorg.conf. If all installs correctly, repeating the lspci command above will now output something like:

Kernel modules: nvidia_current, nouveau, nvidiafb

Results

Everything worked without a hitch. Running nvidia-settings lets you set up dual monitors. After rebooting, for the first time the login screen was actually two separate screens, rather than mirrored.

There was no obvious increase in noise levels with the Asus card, which is nice.

It's definitely far from perfect though. There are some noticeable artifacts when watching HD video, for example, and some minor tearing while running the game Dungeon Defenders. But at the moment I'm going to take "everything's working and it was easy to set up" over "pixel perfect display". Maybe if it annoys me enough I'll investigate some more, but I'm happy to run as is for the time being.

Update 15/6/2013:

Some months later, I've still been unable to resolve the tearing issue. It also occurs when scrolling up or down in web pages as well as in games/video, and is frustrating beyond belief that such a trivial action causes screen tearing with vendor-provided drivers.

The issue occurs on multiple computers I've used, all with different hardware and distros, so I can only conclude that nVidia's driver is broken.

Update 3/7/2013:

Forgot to link to it, but I ended up fixing the tearing issue. Unfortunately, I found it only worked with Mint/Cinnamon rather than Xubuntu.