Tag Archives: NVIDIA

Ubuntu Tech Snippet #12 – Fix the NVIDIA screen flicker bug in Ubuntu

NVIDIA. Oh how we love to hate thee.

NVIDIA and its proprietary graphics drivers have long been a bane of users on Ubuntu. If you needed performance, then you had to use the proprietary drivers, as Nouveau just couldn’t keep up. However, the NVIDIA drivers can be fickle to install and keep up to date, and often cause graphical issues like black screens or, as this post talks about, screen flickering.

This bug has been around since Ubuntu 8.04 Hardy Heron, and is still present in Ubuntu 14.04.1 – this bug refuses to die. This issue cropped up for me and some other users after a recent kernel upgrade.

There have been numerous attempts to fix it, including going so far as to patch Compiz to attempt to fix this. However, I’m going to be showing you a far simpler method.


Solution:

I originally found this solution over on the Ubuntu forums, you can read that post here and the bug (started way back in September of 2008) on Launchpad.

To fix this you’re going to need the CompizConfig Settings Manager software. If you don’t already have it installed, press Ctrl+Alt+T to open a Terminal:

Screenshot from 2015-01-31 10:34:36

Once that terminal is open, enter sudo apt-get install compizconfig-settings-manager and hit enter. You’ll probably need to enter your password, but once you do it will install. Don’t close the terminal.

Once installed, go ahead and enter sudo ccsm. This will launch CompizConfig Settings Manager. It will show you a warning about the program being very powerful, probably say something along the lines of “With Great Power comes Great Responsibility”. Just click okay:

Screenshot from 2015-01-31 10:35:40

Once it comes up, search for workarounds and select the only option that comes up:

CompizConfig Settings Manager_001

Then, scroll down and select the Force full screen redraws (buffer swap) on repaint option:

CompizConfig Settings Manager_002

Once you’ve done that, you can close Settings Manager, and you’re done! This should have helped if not resolved the screen flicker issue for you!

Obviously, this isn’t an actual solution or bug fix, but it’s a workaround that does its job – stops the dreadful NVIDIA redraw bug from doing it’s horrible deed.

 

Advertisements
Tagged , , , , , ,

Fixing the infamous wallpaper and mouse Ubuntu 14.04 bug

I recently blogged about the trial and tribulations of installing the NVIDIA graphics drivers on my Ubuntu 14.04 system. And, although I had much better performance, my ventures into the underground world of drivers and bugs was far from over.

I had been happily using my deskop with my newly installed NVIDIA drivers – no problems whatsoever. I shut down after a while because I was done with what I was doing and left my PC.

I came back a while later, started up the system, logged in, and it just sat there. I waited about 5 minutes and was becoming really worried, because this computer definitely should not take more the 20 seconds tops to log in. All that was showing up was the wallpaper and the mouse – no Unity menus or anything. I rebooted several times, same thing – wallpaper and mouse, but no GUI.

By this time I was freaking out. The last I thing I wanted to deal with was having to reinstall and lose all the time and effort I had spent getting this system where I wanted it. I booted up the LiveUSB stick I always have with me and started looking at solutions online – all of which required terminal access – something I didn’t have.

I tried everything from installing GRUB Repair to the LiveUSB and using that to add the nomodeset flag to GRUB, to using chroot to attempt to run commands off the LiveUSB to affect my system – neither of which worked.

By that point I actually had to go somewhere, so I had to shutdown the computer and leave it be for ~30 minutes. After I came back I started up the computer and, for whatever strange reason, now had access to the TTYs. I had no clue why waiting half an hour changed something – but it did.

This was quite calming because I knew that once I had access to a TTY I could fix basically anything. I started trying out solutions again. I looked at tons of different posts on various sites, namely Ask Ubuntu, but also the Ubuntu Forums and Launchpad.

I ended up coming across this question, here, and worked my way through those solutions.

I tried resetting the desktop as per the first, second, and sixth fixes listed – none of those work.

I then the third solution, purging and reinstalling ubuntu-desktop, compizconfig-settings-manager, upstart, and unity. I did this via sudo apt-get install --reinstall ubuntu-desktop unity compizconfig-settings-manager upstart – but nothing happened.

I then tried the fifth fix, clearing Unity, and that brought some improvement. I rebooted after running those commands and I had desktop icons back! Yay!

However, it still wasn’t totally fixed, and the only solution left was the fourth one.

I had held off on the fourth fix, because the Xorg-edgers PPA is a bleeding edge repository and so it can be dangerous to system stability. I was trying to fix a problem, not make it worse. However, after working through all of the other solutions, and having no results, I was left with the only choice of adding the repository.

So, I added the repository, ran sudo apt-get update and then ran sudo apt-get install nvidia-340. I rebooted, and had a working system. Because of the fact that I had removed all the configuration files previously, I had lost my background and icons that I had pinned to the dash, but that wasn’t an issue.

I removed the Xorg-Edgers PPA via sudo add-apt-repository --remove ppa:xorg-edgers/ppa -y, just to make sure that I didn’t have any updates in the future to break my PC. Hopefully, this is the last of driver derping I’ll have to do for a while.

Make sure to leave a comment saying what you thought of this post, and tell any experiences you’ve had with drivers and NVIDIA with Ubuntu!

Tagged , , , , , ,

Installation of proprietary NVIDIA drivers on Ubuntu 14.04.1

I recently built a brand new PC – which was awesome – with an i5-4690k, 8GB RAM, and a EVGA GeForce GTX 750 Ti GPU.

Now, for basic work, the open source Nouveau drivers work just fine. However, this system was made to be a high performance video editing & graphics rig – so I wanted to have the best performance possible; and NVIDIA’s proprietary drivers provide the best performance.


Normally, one could simply open up the Additional Drivers tab in Software & Updates, but my system, strangely, said there were no drivers available:

Screenshot from 2014-12-16 17:50:06

This was very strange, as I knew that there should be something listed there.

So, I took to Stack Exchange. The Stack Exchange network, in this case specifically Ask Ubuntu, is an amazing tool and has helped me countless times. I was talking with a couple of more advanced Ubuntu users (if you’re on Ask Ubuntu – Seth & Mateo) and we managed to find a solution – though it was rather hacky to say the least.


Tricks, Traps, and Hackery

When I say the solution was hacky, it’s not hacky in the form that I was piecing together drivers and compiling my own kernel – it’s that it was hacky because of the amount of steps it took to complete what should have been relatively simple.

First off, I tried running updates. That should be the first thing you do when debugging an issue, unless of course there is a known issue with an update that’s even worse. Then you might want to skip the update. That didn’t help any, still nothing was shown.

Next up, I looked around at other solutions to the same problem. As I soon found out, this is actually a fairly common bug in 14.04, with the NVIDIA drivers not showing up. Most of the solutions involved enabling the Xorg-Edgers PPA – something I wasn’t totally comfortable with, since the Xorg-Edgers PPA is a bit bleeding edge and I didn’t want to mess with the black screen bugs it has been known to cause.

So, I went on and decided just to go with the drivers straight from NVIDIA. Granted, they aren’t as community tested as the ones from Ubuntu, but they’d do the trick. So, I downloaded the newest¬†stable .run file from NVIDIA for my GPU (you can access it here, if you need to – I believe this is the page with the newest drivers.)

Once the driver installer had downloaded I tried to run it from a terminal (Ctrl+Alt+T), but got this:

Screenshot from 2014-12-21 13:36:18

Obviously, I had to run the command when an X server wasn’t running. Pretty simple stuff – just pull up a TTY, kill lightdm, and you’re golden! Right? Wrong.

For whatever reason, there was/is a bug with the Nouveau drivers I had that meant I couldn’t access a TTY (nothing displayed), unless I booted with the GRUB flag nomodeset. Again, big deal. Just add the flag and reboot. Well, it’s not that simple. Turns out that when I added nomodeset I did get the TTYs…but my GUI was all messed up. So, I removed the GRUB flag nomodeset and rebooted. No TTYs but a working GUI. I guess it was choose your own poison day at Canonical.

This is where the awesome guys on Ask Ubuntu come in. I popped on over there and we started working together to figure it out.

The first solution that was suggested was running the command sudo init 1 command, which was supposed to take me into single user mode with just a command line – nothing else. However, for reasons unbeknownst to me and the other users trying to help me, I was simply being shown the Ubuntu boot splash and nothing else. Yet another issue.

So, that theory went out the window.

Now, you’re probably wondering – why didn’t you just boot with the nomodeset GRUB flag, install the drivers, and the remove the nomodeset flag? Honestly, I don’t know why I didn’t do that. After trying a few other things with init I booted with that flag, killed lightdm via sudo killall lightdm, and ran the installer. There was actually a warning that came up saying that a script had failed – but I ignored that (one of the other users said they’d had the same thing & just ignored it – no problems).

I removed the nomodeset flag, rebooted, and had a working desktop with decent FPS. Actually, quite awesome FPS – especially compared to my old laptop. Just to give you an idea of the performance increase it gave me – remember that I had said I wasn’t getting more than 20 FPS in Minecraft? Well, a picture is worth a thousand words:

fps

That’s with the render distance set to 14 and the graphics cranked all the way up. I had just barely loaded up the world and so was having lots of chunk updates. Once the world had fully loaded I could get well over 150 FPS stable on render distance 25 & everything fancy.

Now, I know that Minecraft isn’t exactly the crown gem of gaming prowess – far from it actually – but it’s what I had. I don’t game much, so my library is very limited and I don’t have any intensive games.

But yeah, that’s my experience/process with/that I took installing NVIDIA graphic drivers on Ubuntu 14.04.1. Not sure if it’ll help anyone much, but it’s what I had to do and I figured I’d blog about it!

Now, this didn’t actually fix the bug with the Additional Drivers not showing up correctly – I actually had another issue occur later on with Unity not loading correctly (I think I must have rebooted at an…inopportune time) and the solution for that (which I’m also going to be writing about) actually fixed it.

Make sure to comment below with any experiences you’ve had with graphic drivers and tell me what you thought about the post!

Tagged , , , , , ,
%d bloggers like this: