Thursday, 6 July 2017

Fifth look at Ubuntu 17.10: using an 'unstable' kernel


The v4.12 kernel has been released and is now available in Ubuntu's 'unstable' repository. Whilst the compiled kernel can be installed directly from the Ubuntu Kernel Team builds on any release it can also be added to an Ubuntu 17.10 ISO through a repository and installed as a package.

The v4.12 kernel is significant as it includes RTL8723BS wifi and the Ubuntu 17.10 userspace includes the required firmware although bluetooth isn't included.

And as another Unity based Ubuntu release nears EOL (Ubuntu 16.10) and the challenges from switching from Unity to GNOME Shell are recognised I've written a script to simplify the installation of the 'Dash to Dock' GNOME Shell Extension.

My new script 'linuxium-install-dash-to-dock.sh' requires the internet as it will download the latest release of the extension, enable it and configure it with some basic settings to fix the position of the extended dock with the application search icon at the top similar to Dash in Unity. Alternatively you can install the package 'gnome-shell-extension-dashtodock' although you will need to enable it.

I've used my 'isorespin.sh' script to respin the daily Ubuntu 17.10 ISO corresponding to the flavour Alpha 1 releases and updated it with the v4.12 kernel packages along with my usual wifi/bluetooth packages and scripts and I've additionally added my 'extension' script although I've left installation optional:


which if performed requires the GNOME Shell to be reloaded using 'Alt F2' and 'r':


The ISO respin log file contains:

Script '/usr/local/bin/isorespin.sh' called with '-i ubuntu-17.10-alpha1-desktop-amd64.iso -r ppa:canonical-kernel-team/unstable -p linux-headers-4.12.0-5 -p linux-headers-4.12.0-5-generic -p linux-image-4.12.0-5-generic -p linux-image-extra-4.12.0-5-generic -l rtl8723bt_4.12.0_amd64.deb -f linuxium-install-dash-to-dock.sh -f linuxium-install-UCM-files.sh -f wrapper-linuxium-install-UCM-files.sh -f linuxium-install-broadcom-drivers.sh -f wrapper-linuxium-install-broadcom-drivers.sh -c wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-broadcom-drivers.sh' ...
Work directory 'isorespin' used ...
ISO '/home/linuxium/17.10-alpha1/ubuntu-17.10-alpha1-desktop-amd64.iso' respun ...
Bootloader 'GRUB' added ...
Repository 'ppa:canonical-kernel-team/unstable' added ...
Package 'linux-headers-4.12.0-5' added ...
Package 'linux-headers-4.12.0-5-generic' added ...
Package 'linux-image-4.12.0-5-generic' added ...
Package 'linux-image-extra-4.12.0-5-generic' added ...
Local package '/home/linuxium/17.10-alpha1/rtl8723bt_4.12.0_amd64.deb' added ...
File '/home/linuxium/17.10-alpha1/linuxium-install-dash-to-dock.sh' added ...
File '/home/linuxium/17.10-alpha1/linuxium-install-UCM-files.sh' added ...
File '/home/linuxium/17.10-alpha1/wrapper-linuxium-install-UCM-files.sh' added ...
File '/home/linuxium/17.10-alpha1/linuxium-install-broadcom-drivers.sh' added ...
File '/home/linuxium/17.10-alpha1/wrapper-linuxium-install-broadcom-drivers.sh' added ...
Command run ...
# wrapper-linuxium-install-UCM-files.sh
./linuxium-install-UCM-files.sh: Extracting UCM files ...
./linuxium-install-UCM-files.sh: Installing UCM files ...
./linuxium-install-UCM-files.sh: Reloading UCM driver ...
./linuxium-install-UCM-files.sh: Installation of UCM finished 
# wrapper-linuxium-install-broadcom-drivers.sh
./linuxium-install-broadcom-drivers.sh: Extracting Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Reloading Broadcom driver ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom bluetooth service ...
Created symlink /etc/systemd/system/multi-user.target.wants/brcmbt.service -> /lib/systemd/system/brcmbt.service.
./linuxium-install-broadcom-drivers.sh: Starting Broadcom bluetooth service ...
Running in chroot, ignoring request.
./linuxium-install-broadcom-drivers.sh: Installation of Broadcom finished 
Respun ISO created as 'linuxium-ubuntu-17.10-alpha1-desktop-amd64.iso'.

which shows the command used and the respun ISO can be downloaded from here.

Please donate if you find the script useful using the following link http://goo.gl/nXWSGf as everything helps with development costs.


46 comments:

  1. With this ISO my system can't go to a graphical interface to install or use live, I get flashing boot messages repeated forever (I can't read them, they scroll too fast). Did something change from the ubuntu 4.10 image with kernel 4.12rc5 you posted some time ago that could cause this behavior?
    I tried this image because 4.12 should include the drivers for the audio chip in my laptop (NAU8824).

    ReplyDelete
    Replies
    1. The NAU8824 driver is in v4.12-rc5 and there haven't been any further patches so v4.12 shouldn't show any differences regarding it.

      If you can't boot try adding 'nomodeset' as a kernel boot parameter or 'i915.fastboot=1' and see if this helps.

      Delete
    2. Thanks for your reply! I was able to install using nomodeset but after that I had to add "acpi_osi=Linux i915.i915_enable_rc6=1" to actually boot the installed system.
      Now everything works, wifi, bluetooth, battery... but still no sound! :/
      I can see a snd_soc_nau8824 module loaded with lsmod, but I don't understand the errors in dmesg. If you could take a look, I've pasted my dmesg here: http://paste.ubuntu.com/25047469/
      Thanks again!

      Delete
    3. I'm not sure about the effectiveness of the kernel boot parameters you added as on line 605 it reads "i915: unknown parameter 'i915_enable_rc6' ignored". What happens if you boot without them?

      Delete
    4. You are right, those parameters are useless. I think the trick was removing "quiet splash"?
      Anyway I'm still struggling to have sound on this Yepo 737s laptop.
      dmesg: http://paste.ubuntu.com/25097640/
      lsmod: http://paste.ubuntu.com/25097657/
      aplay -Ll: http://paste.ubuntu.com/25097659/
      What's the best place to ask for support on this issue in your opinion?

      Delete
    5. Raise it as a bug on Kernel.org Bugzilla (https://bugzilla.kernel.org) and Cc: John Hsu at Nuvoton.

      Delete
    6. Any chance the isorespin script will include forthcoming audio updates in Kernel 4.13? Many Cherry-Trail users are waiting for this...
      https://techtablets.com/forum/topic/linux-on-atom-based-devices/page/19/#post-69443

      Delete
    7. Or rather, many inexpensive Atom based Chinese made tablets and notebooks.

      Delete
    8. I don't follow what you want my 'isorespin.sh' script to do additionally to what it currently does. What change would you suggest?

      Delete
    9. I'm already recommending for devices with the ES8316 codec that the first RC for v4.13 has been released (v4.13-rc1) and to try respinning with the '-u' option and check the resultant 'dmesg' if audio still doesn't work for hopefully some further clues as I'm not sure if the ES8316 driver requires any userspace files.

      Delete
  2. I use this commands under installed linuxmint-18.2-mate-64bit or ubuntu-mate-16.04.2-desktop-linuxium with AZW Z83-S or Beelink BT3 Pro 4GB/64GB and Linux is always freezing.

    sudo apt-get update && sudo apt-get install -y squashfs-tools xorriso
    sudo chmod 755 isorespin.sh linuxium-install-broadcom-drivers.sh linuxium-install-UCM-files.sh

    ./isorespin.sh -i linuxmint-18.2-mate-64bit.iso -u -f linuxium-install-broadcom-drivers.sh -f linuxium-install-UCM-files.sh

    The freezing is by "creating 4.0 file system on ..."

    http://up.picr.de/29697225bi.jpg

    ReplyDelete
    Replies
    1. Then try booting using the kernel boot parameter of 'intel_idle.max_cstate=1' as this may help with kernel freezes.

      Delete
    2. This is not an option for me. I bought the Mini PC extra to use with Kodi 17.3.
      I can not reduce the graphics card speed to freeze the PC. I'd rather sell it

      Delete
    3. ich wollte eine kleine Summe spenden, aber da ist zu kompliziert geworden. Ich habe soweit ich kann am Entwickler geholfen.

      http://up.picr.de/29714919lt.jpg

      I will donate a small sum.

      Delete
    4. Adding 'intel_idle.max_cstate=1' as a kernel boot parameter will not throttle the graphics card speed as it controls the sleep states entered by the CPU.

      Thank you for the donation.

      Delete
  3. There was too much troubles. I have compiled in the Virtualbox under Windows 7 on my Laptop with this command:

    ./isorespin.sh -i linuxmint-18.2-mate-64bit.iso -u -l rtl8723bs_4.12.0_amd64.deb -f linuxium-install-broadcom-drivers.sh -f wrapper-linuxium-install-broadcom-drivers.sh -f linuxium-install-UCM-files.sh -f wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-broadcom-drivers.sh -r

    I can install Linux Mint 18.2 with Kernel 4.12 on AZW Z83-S, but WiFI and Bluetooth not working. This is dmesg:

    [ 9.036078] Bluetooth: hci0: BCM: failed to write clock (-56)
    [ 9.069600] axp288_fuel_gauge axp288_fuel_gauge: axp288 not configured by firmware
    [ 9.148977] Bluetooth: hci0: BCM: chip id 94
    [ 9.148985] Bluetooth: hci0: BCM (001.001.034) build 0000
    [ 9.149030] bluetooth hci0: Direct firmware load for brcm/BCM.hcd failed with error -2
    [ 9.149034] Bluetooth: hci0: BCM: Patch brcm/BCM.hcd not found
    [ 9.208103] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
    [ 10.236434] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
    [ 11.240587] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
    [ 16.060302] intel_sst_acpi 808622A8:00: FW Version 01.0b.02.01
    [ 16.076445] Audio Port: ASoC: no backend DAIs enabled for Audio Port

    On the Beelink BT3 Pro i can install Linux Mint 18.2, compilled with this command:

    ./isorespin.sh -i linuxmint-18.2-mate-64bit.iso -u -l rtl8723bt_4.12.0_amd64.deb -f linuxium-install-broadcom-drivers.sh -f wrapper-linuxium-install-broadcom-drivers.sh -f linuxium-install-UCM-files.sh -f wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-broadcom-drivers.sh -r

    Bluetooth and LAN working, but WiFi not, is AMPAK AP6255(Broadcom BCM43455), maybe not supported by linuxium-install-broadcom-drivers.sh

    This is the dmesg by BT3 Pro:

    [ 7.961793] bytcr_rt5651 bytcr_rt5651: ASoC: CODEC DAI rt5651-aif1 not registered
    [ 7.961811] bytcr_rt5651 bytcr_rt5651: devm_snd_soc_register_card failed -517
    [ 8.004661] intel-spi intel-spi: gd25lq64c (8192 Kbytes)
    [ 8.043366] Creating 1 MTD partitions on "intel-spi":
    [ 8.043376] 0x000000000000-0x000000800000 : "BIOS"
    [ 8.079586] new mount options do not match the existing superblock, will be ignored
    [ 8.081287] bytcr_rt5651 bytcr_rt5651: ASoC: CODEC DAI rt5651-aif1 not registered
    [ 8.081300] bytcr_rt5651 bytcr_rt5651: devm_snd_soc_register_card failed -517
    [ 8.276665] Bluetooth: hci1: BCM: failed to write clock (-56)
    [ 8.397967] Bluetooth: hci1: BCM: chip id 107
    [ 8.397974] Bluetooth: hci1: BCM (003.001.025) build 0000
    [ 8.398033] bluetooth hci1: Direct firmware load for brcm/BCM.hcd failed with error -2
    [ 8.398038] Bluetooth: hci1: BCM: Patch brcm/BCM.hcd not found
    [ 8.522418] axp288_fuel_gauge axp288_fuel_gauge: axp288 not configured by firmware
    [ 8.712496] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
    [ 8.712500] Bluetooth: BNEP filters: protocol multicast
    [ 8.712508] Bluetooth: BNEP socket layer initialized
    [ 8.781984] bytcr_rt5651 bytcr_rt5651: ASoC: CODEC DAI rt5651-aif1 not registered
    [ 8.782006] bytcr_rt5651 bytcr_rt5651: devm_snd_soc_register_card failed -517
    [ 8.998620] IPv6: ADDRCONF(NETDEV_UP): enp1s0: link is not ready
    [ 9.048150] r8169 0000:01:00.0 enp1s0: link down
    [ 9.048182] r8169 0000:01:00.0 enp1s0: link down
    [ 9.048266] IPv6: ADDRCONF(NETDEV_UP): enp1s0: link is not ready
    [ 10.445591] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
    [ 12.260971] r8169 0000:01:00.0 enp1s0: link up
    [ 12.260992] IPv6: ADDRCONF(NETDEV_CHANGE): enp1s0: link becomes ready
    [ 13.457820] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
    [ 14.510606] Bluetooth: RFCOMM TTY layer initialized
    [ 14.510619] Bluetooth: RFCOMM socket layer initialized
    [ 14.510635] Bluetooth: RFCOMM ver 1.11

    ReplyDelete
    Replies
    1. What wifi chips do the AZW Z83-S and Beelink BT3 use? Did you also copy over the wifi firmware 'txt' from the Windows driver stored in NVRAM? Can you use 'pastebinit' to post the full 'dmesg' logs as well?

      Delete
    2. Beelink BT3 Pro have BCM43XX. Here are the driver for Windows 8/10: https://www.sendspace.com/file/bika7g
      AZW Z83-S have too Broadcom, but bgn WiFi.
      Which text file do I need to copy? bcm94356z_p122.text? I wanted a LiveDVD Linux with all drivers integrated in it.

      Here are the dmesg logs. For Beelink BT3 Pro: https://pastebin.com/XgNAhcSK

      For AZW Z83-S: https://pastebin.com/YEM1ag4u

      Delete
    3. With AZW, have active cooling, I deactivated the swap partition, which was the reason AZW to freeze, when I started Kodi 17.3.
      Beelink also freezes by using Kodi 17.3 because he has no active cooling and when he reaches 85 degrees, he freezes. That's why I would only run Windows 10.

      Delete
    4. So, i use Parted Magic from 12.06.2017 and i found the WiFi cards.

      AZW Z83-S have Broadcom BCM43430. Dmesg log here: https://pastebin.com/8aL3GECk

      Beelink BT3 Pro have Broadcom BCM43455. Dmesg log here: https://pastebin.com/YwF16T6S

      More information for Broadcom WiFi cards: https://wikidevi.com/wiki/Broadcom

      Delete
    5. For both the AZW Z83-S and Beelink BT3 you need to copy the wifi firmware from the Windows driver that is stored in NVRAM. The file should look something like '/sys/firmware/efi/efivars/nvram-74b00bd9-805a-4d61-b51f-43268123d113' and you actually copy it using 'cat /sys/firmware/efi/efivars/nvram-74b00bd9-805a-4d61-b51f-43268123d113 > /lib/firmware/brcm/brcm/brcmfmac43430-sdio.txt' for the AZW Z83-S and 'cat /sys/firmware/efi/efivars/nvram-74b00bd9-805a-4d61-b51f-43268123d113 > /lib/firmware/brcm/brcm/brcmfmac43455-sdio.txt' for the Beelink BT3.

      Delete
    6. I've not verified the link or the external software so the comment has been removed as editing is not possible.

      Delete
    7. For Windows 10 Build 1703 fresh Installation
      My links from beelink forum and http://freaktab.com are too removed by moderator.
      This is bad in the sense, I want fast installation of the drivers.But you can tinker yourself.
      You have to download the driver pack from blinkone: http://freaktab.com/forum/frealktab-team-reviews/tv-boxes/655263-new-beelink-bt3-pro-review. I made myself a driver pack, with the command with administrator right: dism /online /export-driver /destination:D:\MyDrivers
      , where the folder MyDrivers is the place, where are backup the drivers. I've just changed the names, instead of oem21.inf on dptf_acpi.inf and deleted restore.ini.For the script to work, you must all inf files in subsubfolder as Install.cmd, not in subsubsubfolder.
      Here is the script Install.cmd: https://pastebin.com/qMBke32M

      After the installation, BT3 Pro has to restart.
      Then you have to install the graphics card: https://downloadcenter.intel.com/download/26682/Intel-Graphics-Driver-for-Windows-15-40-

      Delete
    8. I nearly forgot that. In order for the wifi card to work, you must copy 4345r6nvram.txt from C:\Windows\System32\drivers to the folder of the WiFi card and rename it to AP6255.

      It must look like this:

      http://up.picr.de/29766860uv.jpg
      http://up.picr.de/29766863kw.jpg
      http://up.picr.de/29766864uk.jpg
      http://up.picr.de/29766867wz.jpg

      Install.cmd in AP6255 folder can downloaded from here: https://pastebin.com/65r2Wk4y

      Delete
  4. Hi Ian,
    a few comments, firstly I have only been able to get the sound working on your 17.04 builds, not the 17.10 isos. Not sure why, is there a way of manually loading the drivers once I have booted the iso? Also, can I remove the broadcom drivers as I just need the rtl ones once booted or is it better to respin without the broadcom?
    Thanks for all the hard work!
    Mike.

    ReplyDelete
    Replies
    1. Sorry, I take it back! The sound devices just appeared! Not sure why it took a while, perhaps as I was running direct from the usb stick as a live session. All working nicely! Wifi,BT & Sound! I'll install and do some more testing! One thing I haven't had working yet it charging, bit of a problem...

      Delete
  5. Hey Ian,
    I respun eOS with 4.12 and wifi-bt work fine (thanks!), but I don't have sound even though I installed the UCM files. By using aplay -l the card shows up as bytcht-nocodec. I found a relevant github page to this, but nothing I did with their UCM files helped. Do you have any suggestions?

    ReplyDelete
    Replies
    1. Did you add and run my script ('-f linuxium-install-UCM-files.sh -f wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-UCM-files.sh') as this will add the userspace ALSA UCM files. You might also have to go to the speaker controls and select HDMI as output to get audio to work.

      Delete
    2. Yes I think I did everything correctly. It's weird because the card does show up in speaker controls but not always(and even if it does and I select it I get no sound). Anyway thanks for the quick response and the huge help your scripts has been through this process of making this work.

      Delete
    3. Is this audio (or lack of) over inbuilt speakers or headphones? Is audio over HDMI?

      Delete
    4. Yeah sorry I didn't clarify this, it's built-in speakers/headphones. Don't sweat it though, everything else works close to perfection and I have some time on my hands this week, I will look into the audio problems.

      Delete
    5. Hey just an update, last week I managed to get the bytchtnocodec card to get recognized in settings with custom ucm files from the github page I mentioned above, but I still get no sound, after messing a little with alsamixer no success, so I installed pavucontrol just in case, but the card does not show up there. I'm guessing the drivers are wrong and in a hunch I checked the chuwi laptop from the post below and found out that my off-brand laptop must be a rebranding of that model cause the specs and the casing are identical, so i'm guessing mine must use es8316 as well, so for now I'm gonna wait for 4.13 rcs to check again if it gets included.

      Delete
    6. The first RC for v4.13 has been released (v4.13-rc1) but I'm not sure if the ES8316 driver requires any userspace files. Try respinning with the '-u' option and check the resultant 'dmesg' if audio still doesn't work for hopefully some further clues.

      Delete
    7. I confirmed that my machine uses the ES8316 codec, I will respin tomorrow with the latest kernel and post the results.

      Delete
    8. It didn't work! Oh almighty linux please have mercy on us puny mortals - Using 4.13-rc1 the card does not even get recognized using lspci | grep -I audio OR cat /proc/asound/cards so I have no clue of what I should be doing. dmesg has no info on the card as far as I can tell(at least with 4.12 I had some nice errors, now I can't even find it). Anyway Linuxium, thanks for all you've done and maybe I'll see you around and post here when a kernel gets released that fits this cheap crap machine's needs :) For now I'm done so, Cheers

      Delete
    9. It seems the ES8316 driver is not included by default yet meaning you have to manually compile. See comment on https://linuxiumcomau.blogspot.com.au/2017/07/sixth-look-at-ubuntu-1710-julyshakedown.html.

      Delete
  6. Hi I follow your Proyect but what I cannot do is to make working the sound in the Chuwi Lapbook 15.6.

    Do you have any suggestion?

    Thanks in advance

    ReplyDelete
    Replies
    1. I think the Chuwi Lapbook 15.6 requires the ES8316 driver which is currently under development and is in linux-next at the moment so hopefully it will make it to v4.13 so your audio issue will be fixed soon.

      Delete
  7. Can't seem to boot your ISO from the post on Intel Compute stick with 8GB - when I select "Install Ubuntu", it then errors out complaining about being unable to recover. The stick now has 16.04...

    ReplyDelete
    Replies
    1. Tried your other ISO with 17.04 (first try was with 17.10) - same issue. It seems to complain about second partition on USB stick, which is mounted to "cdrom"... BTW, the console seems rotated on it's side by 90 degrees.

      Delete
    2. Tried booting your 17.10 ISO again as live CD, i.e. using "try" mode - everything's fine, but unlike your screenshots, I only have "Examples" shortcut on the desktop, but not the "Install Ubuntu 17.10" one...

      Delete
    3. How are you creating your USB; what command do you use? Also full Ubuntu 17.10 is a bit too heavy to run smoothly on the STCK1A8LFC so you may want to consider switching to Lubuntu.

      Delete
    4. I just "dd" it to USB. Anyway, apparently the original recovery partition with 14.04 gets in the way - the install process of 17.x gets confused by it...

      Delete
    5. Why not delete the recovery partition first (or at least make an external copy) before attempting the installation?

      Delete
  8. Works perfectly on my no-name BayTrail TV stick---bluetooth, wifi, sound, everything. Thank you for your work on this.

    ReplyDelete