Trying to build a HTPC from an old computer, having video and general speed issues
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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).
Last edited by gradinaruvasile; 02-11-2016 at 12:36 PM.
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
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).
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.
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.
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):
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.
Last edited by gradinaruvasile; 02-11-2016 at 02:46 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.
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)?
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*
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.