Friday, 22 April 2016

Intel Atom HDMI Audio and Wifi on Ubuntu 16.04 LTS

UpdateThis work is superseded by my 'isorespin.sh' script which can respin an official ISO suitable for use on Intel Atom devices.

Example ISOs using my ‘isorespin.sh‘ script suitable for Intel Atom and Intel Apollo Lake devices are available from http://linuxminipcs.com/isos

If anyone wants to try out the new Ubuntu 16.04 LTS on their Intel Compute Stick but would also like sound and wifi then I've created a patched kernel.


First download and install Ubuntu 16.04 and then download the file 'linuxium-patch-xenial-ics.sh' and enter:

sudo chmod 700 linuxium-patch-xenial-ics.sh
sudo ./linuxium-patch-xenial-ics.sh

This will install my patched kernel together with the required wifi firmware. As it is a patched kernel it means it will not get any automatic updates from Canonical so it should only be used for testing purposes. Currently only Intel Compute Sticks are supported.



It is also still in development and as everything is extremely new not everything has been exhaustively tested so your feedback is appreciated.

Credit goes to Pierre-Louis Bossart for the original HDMI audio patches which I've backported to the current 'xenial' kernel and to Bastien Nocera (hadess) for the wifi source.

48 comments:

Unknown said...

will it work on original Meegopad (T01)?

Linuxium said...

I'm currently testing on the Intel Compute Sticks (Baytrail Z3735F & Cherrytrail x5-Z8300). Feedback and/or "level of interest" will determine whether it is worthwhile investing any further effort into this.

Goran Sevo said...

Would there be any universal solution for the Baytrail tablet "Black screen on boot" issue. Tried all sorts of things from:
http://florian-berger.de/en/articles/i915-black-screen-on-boot-issue/
http://askubuntu.com/questions/136593/how-can-i-fix-broken-i915-drivers-for-intel-gpus
https://wiki.ubuntu.com/Kernel/Debugging/Backlight
http://ubuntuforums.org/showthread.php?t=1744809
etc etc
but it seems that only "nomodeset" can produce output on internal display (800x600).
One possibly interesting thing that I came across when I boot with "nomodeset" might be that the command "lshw -C video" produces output which apart from other stuff indicates "width: 32 bits" even though I boot a 64bit operating system. Of course it is 32bit UEFI and boot involves "bootia32.efi". Apologies if this is irrelevant, I am only a hobbyist and a poor amateur:). Thanks

dadc9430 said...

After install on Intel Compute Stick STCK1A32WFC - kernel is not loaded - is freeze on step "Loading initial ramdisk ..." - Any idea for fixit? Update your kernel?

Linuxium said...

Does it boot from a cold boot (i.e. unplug device and any peripherals, re-connect, power-up and boot using F10)?

Linuxium said...

I always cold boot to prevent any 'hanging' issues.

dadc9430 said...

I tried cold boot and the same error. Now am downloading ISO-16.04-linuxium - after install - i write feedback

dadc9430 said...

The same problem with your 16.04-ics-ISO - system not boot - freeze - original ISO is normaly booted

Goran Sevo said...

tried that, same thing. luckily, hdmi always outputs well, which is a good fallback for ruining the fs. dmesg report wrong gpio pin somewhere in the graphics section. chestermills is installed.

Goran Sevo said...

just had something similar an hour ago. pressed esc on booting, advanced options, booted into recovery on earliest kernel, chose safe graphics mode, used synaptic to fix broken packages. then shutdown. then booted that kernel normally. the rest depends, i guess

Jesus Marin said...

Please post your kernel debs so we can use them with other devices.

Jesus Marin said...

Hi Ian, I am working on XJUbunTAB and your work is very useful. I think that we can all benefit from sharing knowledge between tablets and miniPCs users with Intel Atom CPUs
http://techtablets.com/forum/topic/linux-on-atom-based-devices/

Linuxium said...

Update: This work has now been superseded. Please see http://linuxiumcomau.blogspot.com.au/2016/04/ubuntu-1604-iso-for-intel-atom-compute.html for my updated ISO.

Unknown said...

Hello,
how can i download the patch ( linuxium-patch-xenial-ics.sh )
Thanks et bravo

Linuxium said...

The patch been superseded. Please see http://linuxiumcomau.blogspot.com.au/2016/04/ubuntu-1604-iso-for-intel-atom-compute.html for my updated ISO.

Unknown said...

Ok i have download the ISO but i have a blank screen.
I have a wintel W8 pro with a x5-z8300
the ISO is compatible with my mini PC ?

Linuxium said...

This ISO is specifically for Atom based Intel Compute Sticks.

kill -9 said...

Then can you reupload the patch so we can use the fix on other devices than your small list of compute sticks? Or your kernel .debs? I've got a Z3735-based minipc that I'm tinkering with to get HDMI audio working and the ISO is giving me the blackscreen on boot issue mentioned above.

Linuxium said...

The list is small as this is what I've got. Blame the manufacturers for not supporting the community.

Unknown said...

Hi Linuxium!

Can you send me the patched kernel (deb) for install in my custom 16.04? I have an imagen with aaaaall the system (Ubuntu 16.04) configured, with a lots of programs, emulators, etc., and I can't spend time again to configure all with your ISO.

Furthermore If I try to patch de kernel (http://www.cnx-software.com/2016/05/26/updating-star-cloud-pcg02u-to-ubuntu-16-04-with-wifi-and-hdmi-audio-support/) finally I had an error :(

And I tried boot ubuntu with your image and no luck, hang after grub.

So...can you send me the patched kernel deb? pelusin.top@gmail.com

Thanks in advance for all your work ;)

Linuxium said...

This ISO is specifically for Atom based Intel Compute Sticks.

Linuxium said...

Update: This page refers to earlier work and my latest ISOs can be downloaded from http://linuxiumcomau.blogspot.com.au/2016/06/running-ubuntu-on-intel-compute-stick.html

Anonymous said...

Hey, is there any chance of the patched kernel working on an Acer Switch 10V (SW05-14)? It has the same Cherry Trail CPU, x5-z8300. Works almost flawlessly other than WiFi, Sound and battery indicator (shows up as power supply).

Unknown said...

Lubuntu 16.04 iso for the atom compute stick? are avaliable on somewhere???

Linuxium said...

Have you tried respinning the official Lubuntu 16.04 ISO using my 'isorespin.sh' script?

Anonymous said...

Hello and thank you for your work on the Cherry Trail issues Linuxium! Running an AZW Z83V miniPC here reformatted from Windoze 10. I first tried your linuxium-atom-ubuntu-16.04.4-desktop-amd64.iso which would find sound hardware and bluetooth but would not stream bluetooth audio correctly (it stutters). WIFI worked when I applied the nvram patch. Because I couldn't get bluetooth audio to work correctly, I tried your linuxium-atom-bionic-desktop-amd64.iso next (fresh formatted install) but it won't recognize WIFI without patching....it recognizes my bluetooth speaker but won't stream anything....it does not recognize my audio hardware at all. I let Ubuntu update after installing - is this the likely issue?
Do I understand correctly that the linixium.iso's are already kernel patched? I've been reading your blog and replies but am not quite sure about the process of implementing your .iso Thanks

Linuxium said...

To clarify my current ISOs now use official kernels however they may have different kernel versions and different kernel versions obviously have different levels of official kernel patching. I no longer provide patched kernels as the patches have all been 'upstreamed'.

What is being seen is that different official kernel patches change what works and what doesn't and whilst normally things improve some things now require userspace modifications or additional software and firmware.

Where a device's hardware and/or BIOS has been/appears to have been 'fudged' to get Windows working some new kernel patches break existing Linux functionality. Unfortunately the kernel patches are correct (as in they don't cater for 'fudges') and the breakages need to be fixed either with BIOS updates or in some cases modifications to the userspace.

The Beelink (AZW) BT3/BT3 Pro/Z83V family of devices seem particularly problematic at the moment and as nobody who understands the issues seems to own one then fix recommendations are few and far between. Because I don't have the device it is rather hard to diagnose what the problems are and how to fix them.

However Beelink did sell these devices with Ubuntu as the installed OS so in theory should be able to help. They do have a support forum which is probably the best starting point.

Alternatively try fixes and suggestions from the various postings and comments here in the hope they may work or Google to see what else might be out there.

It is unfortunately one of the key shortfalls in purchasing a cheap device that may not be popular with developers and doesn't come with any product support.

Deediezi said...

I tried to install both linuxium atom isos (16 and 18) on an Intel Compute Stick (STK1AW32SC). Impossible to play videos on Youtube and others (Dailymotion etc...) advance 20 seconds by 20 seconds. It's not working

Linuxium said...

You may get a slightly better performance using Lubuntu as this is less resource hungry otherwise Windows Edge works better for Youtube videos than Ubuntu Chrome/Firefox due to encoding issues.

Unknown said...

I burnt linuxium-atom-ubuntu-16.04.4-desktop-amd64.iso with Rufus onto a USB memory and installed Ubuntu on my Kruger&Matz Explore 1402 laptop (has Intel Atom X5-Z8300). It installed just fine but there is no Wifi. I also installed original ISO images of the newest Lubuntu, Xubuntu, Deepin and Linux Mint. All of them installed just fine and not one of them works with WiFi. All of these systems just say that Wifi device is not found.

Linuxium said...

Can you use pastebinit to post a dmesg after booting?

Unknown said...

Hello and thanks a lot for your work. I've landed here in search for hints to install Ubuntu 18.04 and make it behave on my Atom x5-z8350 powered ACEPC T6 mini pc stick. So far, so good, except that I'm having issues with BT audio streaming no matter what.

To begin with, I'm not sure if I'm properly respinning the iso: whether I install the original Ubuntu one as downloaded from Canonical, OR that same iso once respun with your script (--atom option added, all its needed additional files loaded, no errors reported), I don't get neither HDMI audio nor wifi OOTB unless I later apply BOTH your "fix-STK1-etc-etc-hdmilpeaudio.sh" script (which effectively fixes hdmi) AND copy the brcmfmac43455-sdio.txt (got from the Windows partition and renamed) for my system's Broadcom WDI SDIO 802.11 chipset within its firmware folder under Ubuntu (which effectively gives me wifi).

So, question #0 should be: Shouldn't the isorespin.sh script with the --atom option automatically fix at least the hdmi issue, so that I get hdmi audio ootb without needing to apply the other script? Aamof, from a practical point of view, respinning the original iso makes no difference whatsoever (in my case).

But what really concerns me is the bluetooth audio streaming stutter: same with _and without_ wi-fi enabled, bluetooth audio stutters terribly, whereas in Windows it behaves nicely in both scenarios. I stress "with and without" because in several forums and blogs, including yours, is somewhere mentioned that some Atom-based pc sticks use the same chipset for wi-fi and BT and therefore, since it needs to satisfy both services, it has to switch between them constantly, thence the audio stutter. But it turns out, as said, that even disabling wifi the bluetooth speaker stutters on Ubuntu, whereas on Windows does not, even enabling wifi.

So, my main question #1 is: any clue about why this happens? Where should I start looking for the culprit? Any known fix?

All else seems to be working properly.
My system uses, as said, the x5-z8350 cpu, and incorporates the Broadcom 43455 wifi-bt combo chipset (02d0:a9bf).

An interesting piece of information, which I still don't know how to interpret but might be related with all this, is: within the system's uefi settings, there's an option to choose between two different bluetooth devices: one called BCM43455, and the other one being some XXXX8723 (don't quite well remember the first letters), which I assume is the RTL8723 Realtek. HOWEVER: if I choose the latter and then reboot, bluetooth doesn't work neither on Windows or Ubuntu. Does it mean that, despite the uefi setting, there is no such chip in my system?

Sorry for the long speech, but I want to make sure I'm explaining myself. Thank you in advance.

Linuxium said...

Re question #0: The '--atom' flag targets boot, wifi and common headphone issues associated with Intel Atom devices but doesn't (and can't) fix everything for every device. Your ACEPC T6 uses a different audio card device to the default detected by the Pulseaudio server and that is why you need the 'fix-STK1A32SC-and-STK1AW32SC-hdmilpeaudio.sh' script. You could include this when respinning an ISO by using the addition of '-f fix-STK1A32SC-and-STK1AW32SC-hdmilpeaudio.sh -c fix-STK1A32SC-and-STK1AW32SC-hdmilpeaudio.sh' for example.

Re question #1: USB 3 can generate 2.4GHz interference which may affect your Bluetooth. If you are using the USB 3 port for something try switching to the USB 2 port and see if that helps. Alternatively you may be missing a Bluetooth configuration file so if can you use 'pastebinit' to post a 'dmesg' immediately after booting and connecting via Bluetooth I can take a look at it.

Re question #3: It is likely they have used one BIOS for two types of hardware: one with a Broadcom wifi chip the other with a Realtek one. The 'dmesg' will indicate what wifi chip your device is using although you have basically confirmed it is the Broadcom one.

Unknown said...

Thanks a lot for your quick reply!, after which I've been doing my homework for the BT audio stutter:
-USB 3 interference can safely be ruled out, since I have naught in that port, plus I also unplugged the USB 2 keyboard-mouse combo, to no avail. Besides, in Windows works fine even with USB 3 busy.
-Indeed, a 'dmesg' error ('Direct firmware load for brcm/BCM4345C0.hcd failed with error -2') put me on the track of a missing firmware, as you suggested, so I duckduckgoed for it and found a BCM4345C0.hcd on Github, which I've downloaded and installed in /lib/firmware/brcm, then rebooted.
-Unfortunately this didn't fix the stutter. Sure, the aforementioned error is no more, but BT streaming hasn't improved a bit; and I still see some error messages that I don't know how to interpret. So I'm stuck here unless further help. :-)

I've done two dmesg right after another reboot: first before enabling BT, second after switching it on; but both are identical. So here's the single one pastebin:
https://pastebin.com/8skUF0zv

Very much appreciated if you can thence find some hint as to the root of the issue.

Linuxium said...

Unfortunately you are running Arch and I only support Ubuntu or specific Ubuntu flavours. However you should take the BCM4345C0.hcd from your Windows installation where it will have a similar but longer name.

Unknown said...

Oh!, thanks. If that's the problem, here's a pastebin link to 'dmesg' output from my Lubuntu installation, where I experience exactly the same issue (BT firmware updated to my Windows' BCM4345C0.hcd as you suggest):
http://paste.ubuntu.com/p/fgkXBXDpzq/

Linuxium said...

You can try adding ‘realtime-scheduling = no‘ to '/etc/pulse/daemon.conf' and see if it makes a difference.

Unknown said...

Thank you once more! I've just tried that, but unfortunately it didn't make any difference (even after a reboot). I guess this was my last chance?
Anyway, that issue isn't _that_ essential for me, because I can always plug my soundbar via 3'5 mm jack analog audio.
However, I've come across another issue much more important: bluetooth mouse and keyboard. In Lubuntu (also in Arch) I am able to pair them and they work fine... only for as long as I keep using keyboard or mouse uninterruptedly; but after any 5 seconds of inactivity (more or less) they stop working and don't wake up. The interesting thing is: in Windows it was the same, except that I managed to overcome the problem by disabling "bluetooth power waving" in the device driver. Do you know if there's any way I can do the same in Linux/Ubuntu? Is there a switch or an option that I can pass to the bluetoothh card driver for disabling power save, so the BT mouse and keyboard work all the time regardless of inactivity?

Linuxium said...

If you can find where the device is under /sys then 'autosuspend_delay_ms' is the file that the kernel uses to autosuspend it based on the idle-delay time. Try 'find /sys -name autosuspend_delay_ms | grep -i blue' to see if you can locate it. However to prevent the
device from being autosuspended you can also write 'on' to the file 'control' in the same directory (see www.kernel.org/doc/Documentation/usb/power-management.txt).

So a simple script like:

for FILE in $(find /sys -name control | grep -i blue); do echo -n "${FILE}: "; echo on > ${FILE}; cat ${FILE}; done

run as 'root' should do the trick.

Unknown said...

Hmmm... I tried that (found the files and changed their content from auto to on), but it didn't make any difference. However I've noticed something peculiar: the devices (keyboard and bluetooth mouse) don't get auto suspended for as long as blueman-manager is running, but when it's closed they suspend after 3" idle, and will only resume if I run blueman-manager again. Strange. So, I'm guessing this is an issue with Blueman. However, I have another computer who also runs Blueman as the bluetooth manager and it doesn't behave like that: devices work regardless of blueman-manager running: the blueman-applet is enough to keep them active. I suppose all this is beyond the scope of your support. Thank you all the same for your help. I'll try to install another distro without Blueman and see what happens.

Linuxium said...

I suppose uncommenting and setting 'IdleTimeout=0' in '/etc/bluetooth/input.conf' makes no difference?

Unknown said...

No, it doesn't (it defaults to 0 anyway).
However, by sheer luck I've come across the "solution" because of a strange fact that anyone more knowledgeable than me may understand: removing the (in)famous BCM4345C0.hcd file from the Broadcom firmware folder fixed the issue: no more idling timeout for BT mouse & keyboard, regardless of bluetooth-manager app being run or not. Great deal, since adding such file didn't improve BT audio stutter in the least. So, all's fine here. (Sure, I still have that thorn in my side of why audio streaming doesn't work no matter what, but I can live with that. Maybe in the future I'll roll up my sleeves and try to figure out.)
Thank you for all the support.

luke said...

hi there, do you have any idea to active the fan under Linux?

Linuxium said...

@luke: On what device manufacturer/model?

luke said...

stck1a32wfc, is the fan able to config as always on? thanks.

Linuxium said...

@luke: The BIOS on the STCK1A32WFC is very restricted and I haven't found a way to control the fan directly through software. If you set 'Power Mode' in the BIOS to 'Performance' the fan is likely to run more frequently.

luke said...

Thanks for your feedback, I'd added external fan on the stick, seems the build-in fan will active around 60 degree C, but my system may hang below 60.

Linuxium said...

@luke: Depending on your kernel you may still require 'intel_idle.max_cstate=1' as a boot parameter - see 'Kernel freezes' under https://linuxiumcomau.blogspot.com/2017/06/customizing-ubuntu-isos-documentation.html

Post a Comment