LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Trying to build a HTPC from an old computer, having video and general speed issues (https://www.linuxquestions.org/questions/linux-general-1/trying-to-build-a-htpc-from-an-old-computer-having-video-and-general-speed-issues-4175571994/)

Changes 02-11-2016 09:43 AM

Trying to build a HTPC from an old computer, having video and general speed issues
 
I got a new box for myself, so my main became the backup and the previous backup became surplus. Rather than put it in the Cupboard of Oblivion I decided to make a HTPC out of it.

The hardware is:

Asus P5KPL Motherboard
Intel E8400 dual-core CPU
Radeon HD 6670
2 GB of RAM
An old Maxtor 160GB SATA as storage

I installed the latest Linux Mint on it, and it works, but the system itself is dog-slow. To give you an idea, it has the general turtle-like speed you'd get from those old netbooks with Atom N270 processors. Click on something, wait a good number of seconds for the window to come up - to the point I often think it hasn't registered the command, run it again, and after a good while two identical windows pop up.

Video playing also works, but the video is choppy and teary - like in games with vsync disabled, except worse.

I thought it was a problem with overheating causing the CPU to throttle down, but I've run two instances of dd if=/dev/urandom of=/dev/zero and conky reported that both cores had dutifully throttled up to 3GHz and stayed there; I left it producing pointless randomness for a while and it had no throttle-downs whatsoever.

I then installed the fglrx drivers thinking maybe those were causing the video slowdowns, but the exact same behaviour persisted.

I then tried Linux Mint Debian Edition, thinking maybe the Ubuntu base didn't like my system and a Debian system would like it better (I've had it happen before, albeit on rather more obscure hardware), but no, exact same problem.

The only other problem I can imagine is the hard disk, which is the smallest SATA unit I had sitting around and the one I needed the least, but I don't think storage speed should cause problems in playback of video files - especially as I copied some of them to a thumbdrive to see if they'd play faster from that, and they didn't. Oh, and when I ran LMDE to try a Debian system I did so straight off the thumbdrive, removing the HD from the boot process entirely.

In desperation I updated to the latest BIOS, too, and that didn't fix the problem either.

I'm at a loss. At this point I'm considering going for the last resort, that is running the HTPC on Windows POSReady 2009, though I'd really rather avoid it.

Can you think of any reason why this is happening? Might it actually be the old hard drive?

gradinaruvasile 02-11-2016 09:53 AM

What DE you installed and what video card do you have on it?
What is the output of
Code:

glxinfo | grep Open

Changes 02-11-2016 10:53 AM

I forgot the card, sorry - it's a Radeon/AMD HD 6670.

DE is Cinnamon (on both Mint distros I tried).

Output of glxinfo | grep Open:

Code:

user@htpc ~ $ glxinfo | grep Open
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: AMD Radeon HD 6670
OpenGL core profile version string: 4.3.13374 Core Profile Context 15.20.1013
OpenGL core profile shading language version string: 4.40
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.4.13374 Compatibility Profile Context 15.20.1013
OpenGL shading language version string: 4.40
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:


mothergoose729 02-11-2016 11:26 AM

How high is your memory utilization? Most DE will chomp through a 1gb or more of memory even before you launch any apps, and you don't want to be using swap space on an old maxtor drive.

gradinaruvasile 02-11-2016 12:33 PM

That video card is supported very well by the open source radeon driver. For desktop usage and video playback is better than the fglrx driver hands down - radeon oss has faster interface and better video playback + better hardware decoding than fglrx (not the other way around as in nvidia's case).

If you install the firmware-linux-nonfree package you will have even hardware decoding that works in mplayer/mpv/vlc) (via the VDPAU interface)- a function you lack with fglrx (you have it but its way crappier with the proprietary driver since its a libva plugin instead of direct access).

The configuration of the computer is sane it should work just fine. Use the open source radeon driver, install the non-free firmware package (recently it has mutated into firmware-amd-graphics), kernel 4.x and for playback some player that is capable of vdpau - vlc or mpv - (set vdpau output explicitly, its not going to be used by default). Playback via vdpau is tear free.
Also i recommend using a non-compositing DE (like MATE or XFCE).

Changes 02-11-2016 12:35 PM

Quote:

Originally Posted by mothergoose729 (Post 5498658)
How high is your memory utilization? Most DE will chomp through a 1gb or more of memory even before you launch any apps, and you don't want to be using swap space on an old maxtor drive.

Conky reports 20% physical RAM usage at system start, around 25% with a file manager and VLC open.

Quote:

Originally Posted by gradinaruvasile (Post 5498680)
That video card is supported very well by the open source radeon driver.
If you install the firmware-linux-nonfree package you will have even hardware decoding that works in mplayer/mpv/vlc) (via the VDPAU interface)- a function you lack with fglrx (you have it but its way crappier with the proprietary driver since its a libva plugin instead of direct access).

I started with the OSS drivers. I tried fglrx in desperation, but the problem wasn't solved. I can switch back to OSS, but I think the problem is not inherent in the drivers.

I should mention that I did try mplayer as well as vlc, both in the OSS drivers and fglrx, and it exhibited the same behaviour.

Quote:

kernel 4.x and for playback some player that is capable of vdpau - vlc or mpv - (set vdpau output explicitly, its not going to be used by default). Playback via vdpau is tear free.
Is kernel 4 mandatory for vdpau? Off the top of my head I can't recall if Mint comes with it by default.

Quote:

Also i recommend using a non-compositing DE (like MATE or XFCE).
I'll give a shot to the Mate version of Mint.

gradinaruvasile 02-11-2016 12:39 PM

Whats the return from
Code:

sudo hdparm -tT /dev/sda
?
and (this needs smartmontools package)
Code:

sudo smartctl --all /dev/sda
?

mothergoose729 02-11-2016 01:01 PM

My suspicion is the video card. AMD drivers are notorious on linux. It might be worth it to shell out 30-40 bucks for an nvidia 710 or 720.

Good luck.

gradinaruvasile 02-11-2016 01:17 PM

Quote:

Originally Posted by mothergoose729 (Post 5498698)
My suspicion is the video card. AMD drivers are notorious on linux. It might be worth it to shell out 30-40 bucks for an nvidia 710 or 720.

Good luck.

The 6670 is one of the best supported cards on Linux by the opensource radeon driver. I have an amd card that uses the same sub driver (r600g) and it works really well (i had nvidias before for a few years and this is just as stable without the vsync issues + it has the same VDPAU hardware decoding interface). Also its quite fast card.

Changes 02-11-2016 01:48 PM

Updates:

Mint with the MATE desktop has the same problem.

I thought I'd try something completely different and booted Antergos off a thumbdrive (basically Arch without the need to summon Chtulhu to get it to install) and nope, same problem.

I ran Mint again from the thumbdrive and read a video file from my external USB hard disk, and - you'll never guess - same problem. This neatly rules out the present hard disk and any slowness it might be causing, since it wasn't accessed at all during this attempt.

I haven't tried VDPAU yet, though, so that's the next step.

Edit: the system isn't reverting cleanly to OSS drivers, it says there's a problem and runs in software compatibility mode. I'm reinstalling it, then I'll try to get VDPAU working. If that doesn't work the video card is the one constant in this failed series of experiments, so it's the obvious suspect; I should have somewhere an ancient 8800GTX that might do the job.

If I can't find that, or if even that doesn't work, or if I just get tired of the whole thing, I'll just put Windows on the stupid thing and call it a day.

gradinaruvasile 02-11-2016 02:42 PM

Reinstall from scratch, make sure you do not install any proprietary drivers and install the non-free firmware package (or firmware-amd-graphics if exists), mesa-vdpau-drivers, vdpauinfo, mesa-utils. Then reboot (this is important to load the firmware for hardware acceleration and decoding).
Check the following:

Code:

vdpauinfo
For vdpau capabilities
Code:

glxinfo|grep Open
for opengl capabilities. This latter should give something like (between other info):
Code:

OpenGL renderer string: Gallium 0.4 on AMD ARUBA (DRM 2.43.0, LLVM 3.7.1)
ARUBA is my card's firmware, it should have something else for yours. If you have an all-uppercase name here it means that the firmware is loaded and working.

And finally
Code:

cat /var/log/Xorg.0.log
dmesg

To see what does the kernel when it boots and the x server, especially helpful if something is not right.

Quote:

s kernel 4 mandatory for vdpau? Off the top of my head I can't recall if Mint comes with it by default.
Its not mandatory for vdpau but its the newer the better since the kernel contains the drivers and the newer kernels have newer versions of the open source video drivers.

Changes 02-11-2016 05:11 PM

There don't seem to be dedicated AMD firmware packages in the repos. I installed firmware-linux-nonfree instead.

I did glxinfo and it shows Gallium 0.4 on AMD TURKS, so that should be OK.

I've now hit a snag. I went to install mesa-vdpau-drivers and apt-get now helpfully wants to remove such little thing as the whole DE.

Code:

htpc user # sudo apt-get install mesa-vdpau-drivers
Reading package lists... Done
Building dependency tree     
Reading state information... Done
The following extra packages will be installed:
  libegl1-mesa libgbm1 libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa
  libgles2-mesa libllvm3.4 libvdpau1 xserver-xorg-core
  xserver-xorg-input-evdev
Suggested packages:
  libglide3 nvidia-vdpau-driver vdpau-driver xfonts-100dpi xfonts-75dpi
The following packages will be REMOVED:
  caribou cinnamon gir1.2-clutter-1.0 gir1.2-clutter-gst-2.0 gir1.2-cogl-1.0
  gir1.2-coglpango-1.0 gir1.2-gtkclutter-1.0 gir1.2-muffin-3.0
  gir1.2-totem-1.0 gstreamer1.0-clutter libclutter-1.0-0 libclutter-gst-2.0-0
  libclutter-gtk-1.0-0 libcogl-pango15 libcogl15 libegl1-mesa-lts-vivid
  libgbm1-lts-vivid libgl1-mesa-dri-lts-vivid libgl1-mesa-glx-lts-vivid
  libglapi-mesa-lts-vivid libgles1-mesa-lts-vivid libgles2-mesa-lts-vivid
  libmuffin0 libtotem0 libwayland-egl1-mesa-lts-vivid libxatracker2-lts-vivid
  mint-meta-cinnamon mint-meta-codecs nemo-preview totem totem-mozilla
  totem-plugins totem-plugins-extra virtualbox-guest-x11 xorg
  xserver-xorg-core-lts-vivid xserver-xorg-input-all-lts-vivid
  xserver-xorg-input-evdev-lts-vivid xserver-xorg-input-mouse-lts-vivid
  xserver-xorg-input-synaptics-lts-vivid xserver-xorg-input-vmmouse-lts-vivid
  xserver-xorg-input-wacom-lts-vivid xserver-xorg-lts-vivid
  xserver-xorg-video-all-lts-vivid xserver-xorg-video-ati-lts-vivid
  xserver-xorg-video-cirrus-lts-vivid xserver-xorg-video-fbdev-lts-vivid
  xserver-xorg-video-intel-lts-vivid xserver-xorg-video-mach64-lts-vivid
  xserver-xorg-video-mga-lts-vivid xserver-xorg-video-neomagic-lts-vivid
  xserver-xorg-video-nouveau-lts-vivid xserver-xorg-video-openchrome-lts-vivid
  xserver-xorg-video-r128-lts-vivid xserver-xorg-video-radeon-lts-vivid
  xserver-xorg-video-savage-lts-vivid
  xserver-xorg-video-siliconmotion-lts-vivid
  xserver-xorg-video-sisusb-lts-vivid xserver-xorg-video-tdfx-lts-vivid
  xserver-xorg-video-trident-lts-vivid xserver-xorg-video-vesa-lts-vivid
  xserver-xorg-video-vmware-lts-vivid
The following NEW packages will be installed:
  libegl1-mesa libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libgles2-mesa
  libllvm3.4 libvdpau1 mesa-vdpau-drivers xserver-xorg-core
  xserver-xorg-input-evdev
The following packages will be upgraded:
  libgbm1
1 upgraded, 10 newly installed, 62 to remove and 156 not upgraded.

What now?

By the way, this is Ubuntu-based Linux Mint, Cinnamon x86 version (with only 2 gigs of RAM I didn't bother to download the AMD64 version). In the end I had the same performance issues with Cinnamon and Mate so I reinstalled the former as I like it more.

gradinaruvasile 02-11-2016 11:00 PM

Is there some package like mesa-vdpau-drivers-vivid? With those ubuntu variant specific packages...

I remember someone trying Mint sometimes and having issues with all those Ubuntu repositories messing with each other (he just installed Debian and had no issues afterward).

What about
Code:

cat /var/log/Xorg.0.log
And
Code:

dmesg
Als, do you use a screen directly attached to the computer (as opposed to vnc)?

Changes 02-12-2016 06:16 AM

So here's something weird - according to Synaptic I already have mesa-vdpau-drivers installed to the latest version. I've no idea why apt-get does that mess if I tell it to install it in the shell.

There's a newer version, but it belongs to mesa-vdpau-drivers-lts-vivid. They're mutually exclusive.

I'm trying both, but I can't figure out where do I tell VLC to use VDPAU mode. It's not anywhere I can see under output, nor under modules.

The screen is directly attached via HDMI.

Edit: whelp, just installing mesa-vdpau-drivers-lts-vivid and rebooting caused xserver to crash.

I'll give it all one last shot with the Debian Edition of Mint, since you mention the Ubuntu-specific drivers can cause problems. At this point I'm way past the point where I'm doing this for practicality and am now insisting out of principle entirely. *sigh*

gradinaruvasile 02-12-2016 08:13 AM

Quote:

Originally Posted by Changes (Post 5499067)
So here's something weird - according to Synaptic I already have mesa-vdpau-drivers installed to the latest version. I've no idea why apt-get does that mess if I tell it to install it in the shell.

There's a newer version, but it belongs to mesa-vdpau-drivers-lts-vivid. They're mutually exclusive.

Thats the problem with multiple versions of basic packages. If i were you id try either Ubuntu or Debian.

Quote:

Originally Posted by Changes
I'm trying both, but I can't figure out where do I tell VLC to use VDPAU mode. It's not anywhere I can see under output, nor under modules.

If you have vlc 2.1 then its under Preferences-Input/codecs, the hardware accelerated decoding section. If they have an older version of vlc or its not compiled with vdpau support you will not have it. Then try smplayer, mplayer supports vdpau since forever.


All times are GMT -5. The time now is 10:11 PM.