Broadcom crystal hd decoder mint 19 driver help.

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
theking497
Level 1
Level 1
Posts: 6
Joined: Fri Jun 28, 2019 12:34 pm

Broadcom crystal hd decoder mint 19 driver help.

Post by theking497 »

Hello everyone! first i'd like to start with saying i'm very green to linux and just installed mint 19 64bit on an old netbook, specifically an acer aspire one d260 1.66ghz atom n450 and 1gb ddr2 ram. it works well for what it is. my intention was to make it a video viewer youtube, anime the occasional movie etc. so i ordered a Broadcom crystal hd decoder to help it with decoding hd video as the atom doesn't support that. however i've just about tried everything i've found on the net to install the drivers for it but i can't get it to work at all so i was hoping to get some help if possible.
User avatar
thx-1138
Level 8
Level 8
Posts: 2092
Joined: Fri Mar 10, 2017 12:15 pm
Location: Athens, Greece

Re: Broadcom crystal hd decoder mint 19 driver help.

Post by thx-1138 »

...there used to exist a crystalhd-dkms in the past that automated such,
but it appears to have been removed since Xenial in 2016...

The driver's sources exists in various incarnations in quite a few repos,
the one which appears to be the currently more updated & still working one is this.

This will build & install the driver...

Code: Select all

apt install git build-essential
git clone https://github.com/dbason/crystalhd
cd crystalhd/driver/linux/
autoconf
./configure
make
sudo make install
Run sudo modprobe crystalhd to load the driver.
echo 'crystalhd' | sudo tee -a /etc/modules , and such should be done automatically after each boot...

To further build the userland library (returned a few warnings here...)
Do also note that this is likely un-needed, apt install libcrystalhd3 will most likely suffice,
as in contrast with the driver above, this appears to still be maintained / included in Ubuntu.

Code: Select all

apt install g++
cd ~/crystalhd/linux_lib/libcrystalhd/
make
make install
In regards to how someone goes to further set-up this thingy, i have no idea.
I see there exists a gstreamer1.0-crystalhd package (apt install gstreamer1.0-crystalhd),
i assume that after having firmware, driver, generic library & the gstreamer lib installed,
then Xplayer (or any other gstreamer-based player) automagically recognizes such.
But you'll have to figure that out yourself...

EDIT: Seems like the firmware for such itself has also been removed in Ubuntu Bionic... :twisted:
Grab & install the .deb for such from here.
theking497
Level 1
Level 1
Posts: 6
Joined: Fri Jun 28, 2019 12:34 pm

Re: Broadcom crystal hd decoder mint 19 driver help.

Post by theking497 »

Hello and thank you for your help! i followed your advice and it seems to have installed fine but doesn't seem to work sadly.
Curiously when typing

Code: Select all

sudo modprobe crystalhd
and

Code: Select all

echo 'crystalhd' | sudo tee -a /etc/modules
in terminal to load the driver nothing happens, though i guess both the PC and the Decoder are 10 odd years old so perhaps it just isn't sufficient for the job it was design for anymore, the 1gb ram certainly doesn't help. Then again, my incompetens in linux also doesn't help.
User avatar
thx-1138
Level 8
Level 8
Posts: 2092
Joined: Fri Mar 10, 2017 12:15 pm
Location: Athens, Greece

Re: Broadcom crystal hd decoder mint 19 driver help.

Post by thx-1138 »

...wish i could help you more than that, but i'd just resort to googling myself as well.
The git's instructions merely state to check with lsmod & dmesg | grep crystalhd that the driver has loaded...
theking497
Level 1
Level 1
Posts: 6
Joined: Fri Jun 28, 2019 12:34 pm

Re: Broadcom crystal hd decoder mint 19 driver help.

Post by theking497 »

Sorry for the slow response, but when i type

Code: Select all

dmesg | grep crystalhd
it gives me this

Code: Select all

dmesg | grep crystalhd
[   41.120342] crystalhd: loading out-of-tree module taints kernel.
[   41.120587] crystalhd: module verification failed: signature and/or required key missing - tainting kernel
[   41.121797] Loading crystalhd v3.10.0
[   41.121870] crystalhd 0000:03:00.0: Starting Device:0x1615
[ 2744.655398] crystalhd_hw_resume: Invalid Arguments
[ 2744.655408] crystalhd 0000:03:00.0: Crystal HD Resume 1
[12171.308875] crystalhd 0000:03:00.0: Opening new user[0] handle
[12171.412247] crystalhd 0000:03:00.0: Closing user[0] handle with mode ffffffff
[12171.465114] crystalhd 0000:03:00.0: Opening new user[0] handle
[12171.568249] crystalhd 0000:03:00.0: Closing user[0] handle with mode ffffffff
[12171.621398] crystalhd 0000:03:00.0: Opening new user[0] handle
[12192.008140] crystalhd 0000:03:00.0: Firmware command T/O
[12192.008154] crystalhd 0000:03:00.0: FwCmd Failed.
[12192.109783] crystalhd 0000:03:00.0: Closing user[0] handle via ioctl with mode 1c200 
User avatar
thx-1138
Level 8
Level 8
Posts: 2092
Joined: Fri Mar 10, 2017 12:15 pm
Location: Athens, Greece

Re: Broadcom crystal hd decoder mint 19 driver help.

Post by thx-1138 »

...the best that i can decipher is that it loads fine at start,
but then it's communication with the firmware timeouts (after suspending the netbook or similar?)
Seriously, no idea other than that, never owned such myself...
User avatar
thx-1138
Level 8
Level 8
Posts: 2092
Joined: Fri Mar 10, 2017 12:15 pm
Location: Athens, Greece

Re: Broadcom crystal hd decoder mint 19 driver help.

Post by thx-1138 »

theking497 wrote: Fri Jun 28, 2019 1:19 pm.....................................
...just to add a couple of further simple notes, in case it helps you figuring / sorting this out...
What you really need to do, is to check if media players themselves actually utilize the CrystalHD card.

Xplayer is the default media player in Mint, gstreamer-based.
Run such from a terminal, to have some idea of what it does or not...
xplayer /path/to/some/1080p-hdvideo.mkv
Pretty much the same with VLC. According to the git repo,
someone has to explicitly specify crystalhd as the preferred codec in this case...
vlc --codec=crystalhd /path/to/some/1080p-hdvideo.mkv

Do the above decode hd video files properly? Do they report that crystalhd is in use?
Do they return any warnings / errors, etc etc...That is the part you'd find via trial, error & googling.

Theoritically though, they should work fine, as all the pieces are already in their place above.

In case the crystalhd module misbehaves in it's communication with the firmware per se,
eg. say after suspending the notebook or similar (ie. a bug),
you can always try reloading it manually, & then restart the (whatever) player:
sudo modprobe -r crystalhd && sudo modprobe crystalhd
=============
If the module misbehaves specifically after suspending & resuming the notebook (ie. a bug),
the following will try to reload it automatically:
sudo touch /lib/systemd/system-sleep/reloadcrystalhd (create file...)
xed admin:///lib/systemd/system-sleep/reloadcrystalhd (edit file...)
Add the following there...

Code: Select all

#!/bin/sh
case "$1" in
    pre)
        modprobe -r crystalhd
        ;;
    post)
        modprobe crystalhd
        ;;
esac
Save, and then...
sudo chmod +x /lib/systemd/system-sleep/reloadcrystalhd (mark file as executable...)

Don't focus that much on the (of secondary importance) possible glitch with suspend though:
but on whether the players actually utilize the card in question in the first place. Hope that helps.
theking497
Level 1
Level 1
Posts: 6
Joined: Fri Jun 28, 2019 12:34 pm

Re: Broadcom crystal hd decoder mint 19 driver help.

Post by theking497 »

Xplayer just instantly crashes. that said xxplayer has never worked on this machine to begin with. crystal hd or not.

Vlc media player gives sound, but no video. stating

Code: Select all

[00007f64966ad760] crystalhd decoder: Opened CrystalHD hardware with success
[00007f64966ad760] main decoder error: buffer deadlock prevented
[00007f6484002ca0] gl gl error: shaders not supported, bailing out
Not of the other tips seems to work either, tbh i'm wondering if it's best just to give up on the crystal hd part, i do wanna thank you for your time and help, it is greatly appriciated.
User avatar
thx-1138
Level 8
Level 8
Posts: 2092
Joined: Fri Mar 10, 2017 12:15 pm
Location: Athens, Greece

Re: Broadcom crystal hd decoder mint 19 driver help.

Post by thx-1138 »

...no need to thank me - was also pretty curious myself about it as well.
It's generally stopped being supported since 4-5 yrs now (and already had it's issues before such),
if no one actually tests such as years pass by, all that's left is code that still compiles somehow...
so getting such to actually work is certainly more luck than anything else.
theking497
Level 1
Level 1
Posts: 6
Joined: Fri Jun 28, 2019 12:34 pm

Re: Broadcom crystal hd decoder mint 19 driver help.

Post by theking497 »

Thought i'd mention it even if this is a Linux forum, but as someone that primarily uses Windows, i went and tired and the drivers install fine on win 10, but doesn't work there either. So i guess the hardware isn't supported anymore on either OS. Sadly as the concept seems like a good one.
duckfly

Re: Broadcom crystal hd decoder mint 19 driver help.

Post by duckfly »

the question is VLC, not Crystal HD.
use lsmod & dmesg commands to make sure crystalhd driver is working fine,
check if the mode of /dev/crystalhd is 0666 (this is achieved by /lib/udev/rules.d/20-crystalhd.rules when you make install driver),
then just install mpv player, play your test movie (format limitation is <= 1080p/i, <=50Mbps, H.264 is accepted.):

mpv --hwdec=crystalhd your-h264-1080p-50Mbps-movie.mkv

after playing, use dmesg to check again, you will see your BCM70012/BCM70015 is working.
I am using it on my thinkpad X61, but then I remove it and use smplayer+mplayer alternatively,
because it play more smoothly then using crystal hd card, which still gets stuck when playing movie.
-mbmalone-
Level 1
Level 1
Posts: 17
Joined: Sat Dec 30, 2017 12:28 pm

Re: Broadcom crystal hd decoder mint 19 driver help.

Post by -mbmalone- »

None of this is working on Mint 20 either, sadly :(
theking497
Level 1
Level 1
Posts: 6
Joined: Fri Jun 28, 2019 12:34 pm

Re: Broadcom crystal hd decoder mint 19 driver help.

Post by theking497 »

Sorry for the necro i just wanted to say i got it working it's not the drivers fault, rather it is that most programs i've tried no long support it. i managed to get it working in Xplayer playing 1080p very smoothly albeit in mint 20.1 xfce.

I may be way off on this but i strongly suspect you could get it working inside of chromium based browsers if someone made an extension for it as it's a utilization issue and not a driver issue.

For those looking to install the driver do this. it worked for me.
Type this into the terminal

Code: Select all

apt install git build-essential
git clone https://github.com/dbason/crystalhd
cd crystalhd/driver/linux/
autoconf
./configure
Now stop and go to the MakeFile.in file in

Code: Select all

~/crystalhd/drive/linux
Add

Code: Select all

CONFIG_MODULE_SIG=n
Above

Code: Select all

KDIR = @KERN_DIR@
And change

Code: Select all

SUBDIRS=$(PWD)
to

Code: Select all

M=$(shell pwd)
Now save and exit the MakeFile.in
And then do

Code: Select all

sudo make
sudo make install
And follow the rest of the directions in this thread. This at least worked for me but only in Xplayer.
User avatar
Moem
Level 22
Level 22
Posts: 16236
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: Broadcom crystal hd decoder mint 19 driver help.

Post by Moem »

theking497 wrote: Thu May 06, 2021 3:34 pm Sorry for the necro
If you feel the need to apologize beforehand, that usually means you're about to do something you shouldn't have.
I'm locking this up now.
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!
Locked

Return to “Hardware Support”