Showing posts with label Nvidia. Show all posts
Showing posts with label Nvidia. Show all posts

Saturday, January 29, 2011

Observations on using the Nouveau driver

A few weeks back I made a post about switching back to the open-source nouveau drivers for my Nvidia graphics card. The main upside was that the suspend and hibernate functionality now worked - something that did not happen with the binary drivers from Nvidia. This is a concern for me, since I now have a Home Theatre PC running continuously and I would like to make some power savings with my main computer.

After running for a few weeks, here are some things I have noticed:

Artifacts on screen after coming out of suspend. They usually take the form of a vertical line of red pixels, spaced apart. They disappear after a reboot, so it is not permanent, but it is mildly annoying.

OpenGL performance much reduced. I was able to bring some of it back by installing libgl1-mesa-dri-experimental, found in the Ubuntu repositories. They bring a few extra modules for using OpenGL, and allows programs like Google Earth to run again (more about this next). The modules in the repository are a fairly early build - people have had more success using current-build versions of the Gallium3D driver. I haven't tried them yet, not sure if I will.

Google Earth problems. In linux, Google Earth makes use of OpenGL to draw its graphics on screen. The implementation in the binary Nvidia drivers is quite good, in the open-source drivers it is lagging behind somewhat. Before installing libgl1-mesa-dri-experimental, Google Earth would not run at all, simply putting up a message box asking you to update your drivers. After installing, it now runs, albeit slowly.

I'm still in two minds about whether to keep these drivers or go back to the binary versions. I'll probably see how things go for a while - how much I make use of suspend (which is sooo much quicker to resume from than booting from scratch - the AHCI manager takes forever to read the drives in the BIOS) will probably determine things. It might even be worth trying an ATI card to see how the drivers are with that. I'm quite impressed by the open source radeon drivers in my laptop. I don't really use my desktop now for MythTV since building the HTPC, so VDPAU performance isn't so much a priority.

I'll update in time, whenever a decision is made.

Tuesday, January 11, 2011

A MythTV box for the lounge room: Part 3: The build

In part 2 of this series, I went over the decision process for choosing the hardware used in the MythTV box. To sum up, I went with a Zotac IONITX-A, due to the low-power Intel Atom/Nvidia ION CPU/graphics combination, inbuilt wireless, and an included laptop-style power supply. I could also use some of the DDR2 RAM sticks that I already had.

Other items bought for the box included two more ASUS U3100 mini USB TV tuners. These supplemented the one I already had (sadly I couldn't use the PCI tuner card I had in my main PC, due to the board not having any PCI slots). I picked up a 2 terabyte Samsung ecogreen hard drive as the system and storage disk. These have had good reports of being low noise, low power consumption items.

The remote control chosen was a Hauppauge unit, as described in an earlier post.

The choice of case was driven by stock availability more than anything - initially I had chosen a Mini-ITX case from Aywun (known as Apex in some countries) but none would be arriving in stock until mid January - so I still would have been waiting. Since I wanted this to be completed as a Christmas holiday project, I looked elsewhere and found the Lian Li PC-Q07 - a rather minimal-looking aluminium case. It was a tad larger than the spot I had originally planned to put the box, but I was able to do some re-arranging inside the cabinet (like removing the video recorder - won't be needing that relic any more!) and it fits nicely.

Observations from assembly
One thing noticed when putting the various parts together is that the TV tuners would not fit together when pugged into adjacent USB slots at the back of the motherboard. Their chunky plastic bodies meant you could not plug much into a neighbouring slot. This was solved by picking up some USB extension cables and hanging the tuners off those. Using the cables also meant that I could run the tuners out the back of the cabinet into free air, rather than let them warm up the inside of the cabinet. They do get surprisingly warm during use.

To connect them to the aerial, I purchased a three-way digital TV splitter. I was concerned about losing too much signal with three plugged in, but in use the strength has been around 66-70%, enough to give trouble-free viewing.

The PC-Q07 case has nowhere inside it to allow for additional fan mounting, but it was designed to take full-sized PC components, like normal ATX power supplies, full-sized DVD drives and the like. Since there was no need for a PSU to be put in it (the motherboard I chose had its own laptop-style power brick that could sit out behind the cabinet), I rigged up a 92 mm fan in the gap where a power supply would normally go. It is set up so it is drawing in air from behind the case, supplying a stream of fresh air to the other, smaller fan on the CPU/GPU, as well as the hard drive. I just used one of the power supply mounting holes  - it seems to be holding in place just fine. To stop air short-circuiting too much straight out the back, I cut up a small piece of cardboard and used that to blank off the remainder of the gap in the power supply hole.

To get a better supply of air to the box, I borrowed a holesaw, attached it to my drill, and cut a couple of extra air holes in the back of the TV cabinet. This also provided some extra paths to lead cables from.

The infrared sensor from the remote was on a fairly long cable, so I was able to lead that out the back of the cabinet to a spot that is higher up, easier for the remote to reach.

Finally, I've left the wireless receiver for the keyboard and mouse plugged into the back for convenience - I can just bring them down from the other room if some typing or clicking is needed.

Findings from the first weeks of use
First of all, and the biggest relief, is that the Wife Acceptance Factor (WAF) is very high - she loves it. We both love having the power to watch what we want, when we want, being able to skip the ads if we've recorded a show earlier. Playback is flawless - any glitches we have aren't any worse than what we previously encountered with our HD set top box. It can handle 1080i playback perfectly smoothly. The only stutters are related to the hard drive when it is working particularly hard, like the other night when we found ourselves in the situation of recording four shows simultaneously (two were on different sub-channels on the same network, so one tuner could record them both) while watching a recording of a previous program. You could see the hard drive light blinking away pretty furiously. Oh yes, it would have also been flagging commercials at the same time. All these things can be tweaked and tuned, I've set it to only run one job at a time to give the little atom CPU some breathing room. Commercial flagging has been set to begin as soon as recording starts - I changed that from the default of waiting until a show has finished recording. So far, it hasn't slowed things down noticeably.

For the playback settings in MythTV, I have chosen the VDPAU Normal profile. I haven't tried the High Quality setting yet, the GPU may struggle with that, and Normal looks just fine to me.

Mythbuntu:
I decided to used the MythTV-oriented version of Ubuntu for this project, Mythbuntu. This runs the XFCE desktop, using less resources than Gnome would. Setup was quite simple, and I was pleased to find that Mythweb was installed by default - something I had never bothered with before on my previous desktop PC Myth install.

I would recommend this to anyone else considering a dedicated HTPC build. It is quite stripped back, however, so it is not much use for other purposes (although there is a facility to enable it to be reconfigured as a regular desktop through the Mythbuntu control panel).

CPU Use:
One CPU-hungry process I have noted is upconverting the audio stream to 5.1 Dolby Digital. Remotely logging in and checking CPU use during playback shows that with regular stereo passthrough to the optical output, usage is around 12-14%. With upconversion enabled at best quality, CPU use shoots up to around 63%.

Memory:
Memory-wise, I have followed recommendations posted elsewhere on the web and run two sticks of RAM, enabling dual-channel operation. This provides better bandwidth for the GPU in particular, improving playback performance.

I have two, one-gigabyte sticks of DDR2-800 ram installed, with the graphics set in BIOS to use the maximum 512MB. This has been quite sufficient, and I dare say that 1 GB would be enough if it weren't for the onboard graphics using some of the memory.

Power consumption:
I have a power meter (discussed in an earlier post on my other blog) connected to the wall outlet, measuring the power use of the PC, as well as the VGA-component transcoder. When idle, the unit consumes 44 Watts. Watching live TV, it uses 47 Watts. When 5.1 upconversion was enabled, it used 49 Watts, reflecting the extra CPU usage.

These figures are quite a bit higher than what I've seen elsewhere on the web - I saw a picture of a system playing a blu-ray disc using 30W. And this machine doesn't have an optical drive installed. All I can think of is the extra power draw of the TV tuners, the fan, and the fact that linux may not make the best use of power saving features of the CPU compared with windows 7. The other factor could be the power meter being out, something I'm finding quite likely. It does give pretty high voltage readings, which would as a result give an inflated Watt reading.

Final thoughts:
I'm glad the system build went off without a hitch. Performance is fine, although had I gone with a core i3 system it could have handled many more concurrent jobs like commercial flagging without breaking a sweat. Power use would have been higher, too, as too the cost.

The wireless signal is not the best, with the antenna located at the back of the motherboard hidden away at the back of the TV unit. I may try an external antenna, to let it get a better signal than the 40-ish percent it now gets. It makes copying movie files pretty slow, the way it is at the moment.

I'm wondering whether to put in a solid-state hard drive to have the operating system partition located on, to free up the workload of the storage drive. There is sometimes a delay of a few seconds when starting playback of a show. This isn't a major priority - it will probably inherit the Intel X25-V from my main system whenever I upgrade that.

Friday, January 7, 2011

Switched back to nouveau graphics driver - suspend now works!

As part of the process of building the separate MythTV box (as seen in my last few posts), I no longer needed the VDPAU acceleration for TV playback on my main PC. I also wanted to see if the suspend and hibernate functionality worked with the open source nvidia drivers (nouveau), as opposed to the proprietary binary ones. Booting the system with an Ubuntu live CD, which uses the nouveau drivers by default, let me suspend the computer and resume correctly - something it did not do with nvidia's binary drivers.

So under System -> Administration -> Additional Drivers, I disabled the proprietary drivers, which re-installed the nouveau driver. Rebooting, the screen came back up, but only one of them (I have two), and at the wrong resolution. The cause of this was a fix I had applied earlier to make the boot screen look right with the Nvidia drivers, as described at the end of this earlier post. Once I removed the extra text from the grub boot command, everything worked fine. Suspend and hibernate both worked, although I found hibernate to be a little pointless - it took about the same length of time as a normal boot.

The only downside was the compiz desktop effects no longer worked, although I believe if you use a more current version of the nouveau drivers it may do so. 3D performance is nowhere near what the binary drivers provide either, but that isn't so much of an issue since I dual boot with windows. Games can be played there.

Tuesday, January 4, 2011

A MythTV box for the lounge room: Part 2: Choosing the box to build

Making sure that I could get something displaying on my TV was the main stumbling block with the build of the MythTV PC. Since it was overcome in my last post, I was now free to get on with speccing up a machine. The major requirements for this were:
  • It had to use a minimal amount of power, as it would likely be running 24/7 (the nvidia binary driver means suspend doesn't usually work).
  • It had to be able to handle 1080i playback of recorded or live TV, flawlessly
  • It needed to have an S/PDIF output, either optical or coaxial to connect to my existing receiver
  • It needed a wireless network connection, as it was at the opposite end of the house to where my router was.
  • The overall cost had to be similar to the price of buying a DVR + IceTV subscription
This meant I had a few different options, which are detailed below.

Option 1 - Mini-ITX, using an Intel Atom/Nvidia ION board
Motherboard: Zotac IONITX-A
CPU: Intel Atom 330 Dual core 1.6GHz
Graphics: Onboard Nvidia 9400
DDR2 ram slots
Onboard Wireless-N adapter
90W Power supply included (laptop-style)
Case: Lian Li PC-Q07

Pros:
Lowest power usage of all options
Everything integerated on the board
Power supply included, and can be located away from PC case - less heat
Small size will fit into TV cabinet
Can use existing DDR2 RAM I already have

Cons:
Not useful for much else if this project doesn't work out
Not the cheapest option

Option 2 - Separate CPU/Motherboard, budget option
Motherboard: Gigabyte G41M-combo
CPU: Intel Pentium E5400 2.7GHz
Graphics: Nvidia GT210
DDR2 ram slots
Case: Antec NSK3480 (with PSU)

Pros:
Better performance than Atom CPU
Can be used as general purpose PC later
Cheaper than option 1
Can use existing DDR2 RAM I already have

Cons:
More power use than option 1
Will need an S/PDIF bracket for optical out
Takes up more room with full-size case
Need separate Wifi card

Option 3 - Separate CPU/Motherboard - higher end
Motherboard: Gigabyte GA-H55N-USB3 Mini-ITX
CPU: Intel Core i3-540
Graphics: Nvidia GT210
DDR3 RAM slots
Case: Lian Li PC-Q07
PSU: Corsair VX450

Pros:
Best performance of all, no problems handling all jobs, even concurrent ones
Good power efficiency
Same small form factor as ION

Cons:
More power use than option 1 (maybe not much more)
Need separate Wifi card
Lots more expensive than other options
Newer CPUS now out (Sandy Bridge)

Of all these options, I went with Option 1 - the Atom/ION combination. It had the best compromise of the three, with the lowest power usage. That is important to me, as I wanted to reduce the ongoing costs as much as possible. That's what eliminated option 2 as well, along with the fact that a larger case would have to sit behind the TV cabinet, in amongst the already messy tangle of cables. Option 3 was the most attractive performance-wise, but was really getting quite expensive compared to the others, and getting a little hard to justify the price for something that is just for watching TV, after all.

In the next part, I will go over the build of the box, setting it up and what my experiences have been with it.

Tuesday, December 28, 2010

A MythTV box for the lounge room - Part 1: getting the display to work

The first hurdle:

After a number of years trying to get a picture on my extremely fussy lounge room TV from the computer, I finally bit the bullet and ordered a VGA to component transcoder - an Audio Authority 9A60A. This is because I am still using a Panasonic TX-76PW200A CRT TV, with only component inputs. Also, since it is not in the USA, the refresh rate is 50Hz,rather than the 60Hz that the nvidia drivers support out of the box. I mentioned in an earlier post that I was going to have a task getting a working resolution to the TV, but eventually something was found. Initially I used the program Powerstrip, with my desktop system set up in the lounge. A couple of settings worked, but with pretty bad overscan. Every time I tried tweaking it a little, the display just went out of range and I was greeted with a blank screen. Disheartened, I packed up the PC and contemplated putting the transcoder on ebay.

After a couple of days' break, i thought about trying again, this time with my laptop that runs linux and has a Mobility radeon graphics chipset. Using the xrandr command, I was able to feed it a modeline that I had found on another forum. An owner of the same TV I had, had managed to get a good picture up after a bit of experimenting. Lo and behold, I was able to get a picture up!

From memory, the xrandr commands used for the laptop were:

xrandr --newmode "1920x1080i_50" 78.300 1920 2464 2520 2784 1080 1102 1117 1125 interlace +hsync +vsync

That created a new mode for the display to use.

xrandr --addmode VGA-0 1920x1080i_50

This assigns the mode to the display device - in this case, it was to the VGA external output for the monitor.

xrandr --output VGA-0 --mode 1920x1080i_50

And that final command sent the 1920x1080 resolution to the VGA output - where the ubuntu desktop came up on the TV, much to my relief!

Knowing that the TV was capable of accepting the resolution, and that the transcoder was able to output the correct timings to the TV, it was back to the main box to see how the output worked from an Nvidia card.

The Nvidia binary driver unfortunately does not accept the xrandr commands I had used with the radeon drivers on the laptop, so another method was going to have to be used. After some inital lack of success with manually editing the xorg.conf file, I had a go using nvidia's utility designed for adding things to the file, nvidia-xconfig. Using the command:

sudo nvidia-xconfig --mode=1920x1080i_50

added a mode to the xorg.conf file. I opened that file up in a text editor and had a look where it turned up. When I found it, I added the following line straght below it:

Modeline "1920x1080i_50" 78.300 1920 2464 2520 2784 1080 1102 1117 1125 interlace +hsync +vsync

I restarted the machine to let nvidia-settings find the modeline. From there, it was then selectable from the resolution dropdown box, where I could choose it. It worked again!

The final step was getting it to work when the TV was the only display hooked up. To summarise, the xorg.conf file needed to be edited to remove all references to the PC monitor I had connected as well, so the TV was the only device it detected. Have a look at the xorg.conf file here, for your reference.

One other thing I had to do was set the PC to log in automatically - since this is to be a Home Theatre PC, there will not be a keyboard connected to allow typing in a password. It's not what I was after anyway. This option can be found under System -> Administration -> Login Screen

In a later entry I'll go over the setup of the actual system, and what I've learned in its first week of use.

Saturday, October 16, 2010

Upgrade to Maverick Meerkat - version 10.10 worked!

I am writing this from my newly-upgraded Ubuntu 10.10 system! This has been the second time I upgraded the installation, rather than start afresh. I was a little nervous, to be honest, but backups were made before the upgrade so there was an escape plan.

There were only a few issues that were pretty easily fixed, and I may, just may, have fixed the hanging on boot problem I had with version 10.04.

One problem I had was the Hard drive temperature reporting in Conky - it stopped displaying a temperature. This was because the hddtemp command could only be run as root - Conky doesn't run with those privileges, and I didn't want to start doing so. A quick search revealed a single line command to allow hddtemp to be run as a regular user:

sudo chmod u+s /usr/sbin/hddtemp

After doing that, the disk temperature re-appeared and all was good.

Fixing the boot screen

This was a problem that I had in the previous version, 10.04, as well as in 10.10. It is to do with running the Nvidia proprietary drivers, and switching to different video modes. Basically, there are some steps to try at this site, which I did. It involves setting some video modes in the boot loader. I initially tried 1680x1050 (about the best that was supported by my card, even though it runs at 1920x1080 once at the desktop) and got a comically large ubuntu logo during boot. A later change to 1280x1024 yielded a much better result.

So far, the boot and shutdown screens look much better, and I haven't yet had it hang on me. I am hesitant to call it truly fixed until a few more weeks have passed.

Edit January 7, 2011: If you do these changes and then switch back to the open source driver (nouveau), you have to undo the changes to be able to set the proper resolution for your screen(s).