Update: This work is superseded by my 'isorespin.sh' script which can respin an official ISO suitable for use on Intel Atom devices.
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'.
Please donate if you find the script useful using the following link http://goo.gl/nXWSGf as everything helps with development costs.
50 comments:
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).
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.
Then try booting using the kernel boot parameter of 'intel_idle.max_cstate=1' as this may help with kernel freezes.
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.
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...
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?
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?
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
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.
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.
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.
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.
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!
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.
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?
Is this audio (or lack of) over inbuilt speakers or headphones? Is audio over HDMI?
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.
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...
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.
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...
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.
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...
I've not verified the link or the external software so the comment has been removed as editing is not possible.
Why not delete the recovery partition first (or at least make an external copy) before attempting the installation?
Works perfectly on my no-name BayTrail TV stick---bluetooth, wifi, sound, everything. Thank you for your work on this.
Great - good to know.
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?
Raise it as a bug on Kernel.org Bugzilla (https://bugzilla.kernel.org) and Cc: John Hsu at Nuvoton.
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.
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.
I confirmed that my machine uses the ES8316 codec, I will respin tomorrow with the latest kernel and post the results.
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
Or rather, many inexpensive Atom based Chinese made tablets and notebooks.
I don't follow what you want my 'isorespin.sh' script to do additionally to what it currently does. What change would you suggest?
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.
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
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.
I installed the iso on my Asus T100 computer.
How to activate the sound ?
On Wayland, how to rotate the screen to the left ?
Linux T100HAN 4.13.0-6-generic #7-Ubuntu SMP Wed Aug 23 14:37:53 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
The required audio patch for the ASUS T100HA has just been applied so should be included in v4.14-rc1 which will be available in around 4 to 6 weeks time.
Thanks, can you explain how to rotate the screen 90 ° left on wayland? On xorg I use "xrandr -o left" but it does not work on wayland. Before there were arrows on gnome in the display settings but they disappeared.
17.10 has switched to Wayland and GDM however 'The Xorg session will still be available alongside' ('https://didrocks.fr/2017/08/03/ubuntu--guadec-2017-and-plans-for-gnome-shell-migration/'). Apparently it is just 'a click or two away' ('http://www.omgubuntu.co.uk/2017/08/ubuntu-confirm-wayland-default-17-10') so in theory you should still be okay until 18.04 but I haven't looked into this in any detail at the moment so I can't suggest solution yet.
Try respinning a daily build with the following command:
isorespin.sh -i artful-desktop-amd64.iso -u --atom -c "sed -i 's/^#WaylandEnable=false/WaylandEnable=false/' /etc/gdm3/custom.conf"
which should force the login screen to use Xorg and disable Wayland.
I've updated ubuntu, now in the settings I have the sound and the sound test works. But no sound if I read a video. It also lacks the sound icon in the top left menu.
http://imgur.com/a/YmOHY
Linux T100HAN 4.13.0-7-generic #8-Ubuntu SMP Mon Aug 28 14:21:49 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
As I said above the required audio patch to give you sound on the ASUS T100HA has only just been applied and should be included in v4.14-rc1 possibly available in around 2 to 4 weeks time.
I'm trying to locate the nvram data for brcmfmac43340-sdio.txt for my Beelink z83 (identical to BT3 but with a different chassi and SSD) but I don't have the nvram entry below.
/sys/firmware/efi/efivars/nvram-74b00bd9-805a-4d61-b51f-43268123d113
The entries I do have are:
BDADDR-74b00bd9-805a-4d61-b51f-43268123d113
Boot0000-8be4df61-93ca-11d2-aa0d-00e098032b8c
Boot0003-8be4df61-93ca-11d2-aa0d-00e098032b8c
Boot0004-8be4df61-93ca-11d2-aa0d-00e098032b8c
BootCurrent-8be4df61-93ca-11d2-aa0d-00e098032b8c
BootOptionSupport-8be4df61-93ca-11d2-aa0d-00e098032b8c
BootOrder-8be4df61-93ca-11d2-aa0d-00e098032b8c
ConIn-8be4df61-93ca-11d2-aa0d-00e098032b8c
ConOut-8be4df61-93ca-11d2-aa0d-00e098032b8c
ErrOut-8be4df61-93ca-11d2-aa0d-00e098032b8c
FPDT_Volatile-01368881-c4ad-4b1d-b631-d57a8ec8db6b
MemCeil.-01368881-c4ad-4b1d-b631-d57a8ec8db6b
MemoryOverwriteRequestControl-e20939be-32d4-41be-a150-897f85d49829
MokListRT-605dab50-e046-4300-abb6-3dd810dd8b23
MonotonicCounter-01368881-c4ad-4b1d-b631-d57a8ec8db6b
OA3MSDMvariable-01368881-c4ad-4b1d-b631-d57a8ec8db6b
OfflineMemoryDumpUseCapability-77fa9abd-0359-4d32-bd60-28f4e78f784b
OsIndicationsSupported-8be4df61-93ca-11d2-aa0d-00e098032b8c
PlatformInfo-10ba6bbe-a97e-41c3-9a07-607ad9bd60e5
PlatformLang-8be4df61-93ca-11d2-aa0d-00e098032b8c
PlatformLangCodes-8be4df61-93ca-11d2-aa0d-00e098032b8c
S3SS-4bafc2b4-02dc-4104-b236-d6f1b98d9e84
Timeout-8be4df61-93ca-11d2-aa0d-00e098032b8c
TrEEPhysicalPresence-f24643c2-c622-494e-8a0d-4632579c2d5b
WriteOnceStatus-4b3082a3-80c6-4d7e-9cd0-583917265df1
Are the nvram contents specific per unit or the same for all devices of a specific model? If the latter, could someone upload a copy or give me any ideas of how I might find mine?
If your 'dmesg' shows that wifi is detected and only missing the 'stio.txt' file then have a look around your Windows installation where you should be able to locate it.
Finding references to the nvram contents being included as a txt file in the Windows driver for the BT3, I found a link on their forum which contained the file bcm943341wlagb.txt which was supposedly specific for the BT3. The interface still doesn't show up though but others seems to have had issues with the firmware file included in linux-firmware, needing to replace it with another one. I don't know where a suitable version would be found though.
#AP6234_NVRAM_V1.2_20140820_WIN8.1
manfid=0x2d0
prodid=0x0653
vendid=0x14e4
devid=0x4386
boardtype=0x0653
boardrev=0x1203
boardnum=22
macaddr=00:90:4c:c5:12:38
sromrev=3
#boardflags:
# bit 19 3tswitch: 2.4GHz FEM: SP3T switch share with BT
# bit 16 nopa: no external pa
# keep original 0x200
boardflags=0x0090201
xtalfreq=37400
nocrc=1
ag0=255
aa2g=1
ccode=CN
pa0itssit=0x20
#PA parameters for 2.4GHz
#pa0b0=6957 default
pa0b0=6727
pa0b1=-858
pa0b2=-178
tssifloor2g=69
# rssi params for 2.4GHz
rssismf2g=0xf
rssismc2g=0x8
rssisav2g=0x1
cckPwrOffset=3
# rssi params for 5GHz
rssismf5g=0xf
rssismc5g=0x7
#rssisav5g=0x1
rssisav5g=0x3
#PA parameters for lower a-band
#pa1lob0=5659 default
pa1lob0=5859
#pa1lob0=5659
pa1lob1=-693
pa1lob2=-178
tssifloor5gl=77
#PA parameters for midband
pa1b0=5372
#pa1b0=5172
pa1b1=-671
pa1b2=-212
tssifloor5gm=77
#PA paramasdeters for high band
#pa1hib0=5320 default
pa1hib0=5620
#pa1hib1=-963
pa1hib1=-663
pa1hib2=-179
tssifloor5gh=74
rxpo5g=0
maxp2ga0=72
# 19.5dBm max; 18dBm target
#Per rate power back-offs for g band, in .5 dB steps. Set it once you have the right numbers.
cck2gpo=0xaaaa
ofdm2gpo=0x77777777
# R54 16dBm; R48 17dBm; others 18dBm
mcs2gpo0=0xdddd
# M0~ M4 17dBm
mcs2gpo1=0xdddd
# M5M6 15dBm; M7 14.5dBm
#max power for 5G
maxp5ga0=68
# 16dBm target; 17.5dBm Max
maxp5gla0=68
maxp5gha0=68
#Per rate power back-offs for a band, in .5 dB steps. Set it once you have the right numbers.
ofdm5gpo=0x22222222
# R54 13.5dBm
ofdm5glpo=0x22222222
ofdm5ghpo=0x22222222
mcs5gpo0=0x8888
# M0~M4 16dBm (1dB higher than ofdm)
mcs5gpo1=0x4444
# M5M6 13.5dBm; M7 12dBm
mcs5glpo0=0x4444
mcs5glpo1=0x4444
mcs5ghpo0=0x4444
mcs5ghpo1=0x4444
# Parameters for DAC2x mode and ALPF bypass
# RF SW Truth Table: ctrl0 for BT_TX; ctrl1 or 5G Tx; ctrl2 for 5G Rx; Ctrl3 for 2G Tx; Ctrl4 for 2G Rx
swctrlmap_2g=0x00080008,0x00100010,0x00080008,0x011010,0x11f
swctrlmap_5g=0x00040004,0x00020002,0x00040004,0x011010,0x2fe
gain=32
triso2g=8
triso5g=8
#tx parameters
loflag=0
iqlocalidx5g=40
dlocalidx5g=70
iqcalidx5g=50
lpbckmode5g=1
txiqlopapu5g=0
txiqlopapu2g=0
dlorange_lowlimit=5
txalpfbyp=1
txalpfpu=1
dacrate2xen=1
papden2g=1
papden5g=1
#rx parameters
gain_settle_dly_2g=4
gain_settle_dly_5g=4
noise_cal_po_2g=-1
noise_cal_po_40_2g=-1
noise_cal_high_gain_2g=73
noise_cal_nf_substract_val_2g=346
noise_cal_po_5g=-1
noise_cal_po_40_5g=-1
noise_cal_high_gain_5g=73
noise_cal_nf_substract_val_5g=346
cckpapden=0
# Enable OOB interrupt: level trigger
#muxenab=0x10
# Out-of-band GPIO wakeup
sd_gpout=4
sd_gpval=1
sd_gpdc=0
btc_flags=71
btc_params8=15000
btc_params22=8000
btc_params83=9000
btc_params84=4500
rssicorrnorm=15
I found a file named 43341b0rtecdc.bin inside the windows driver that seems to be the firmware I'm looking for based on the string found inside it.
43341b0rtecdc.bin:
43341b0-roml/sdio-ag-ndis-vista-pktfilter-d0c-pno-aoe-p2p-dhdoid-ndoe-mfp-ccx-extsup-proptxstatus-dmatxrc-rxov-keepalive-aoe-vsdb-sr-wapi-wl11d-autoabn-ampduretry-pclose-notdls-wfdll-mira Version: 6.10.225.19 CRC: 4809588e Date: Thu 2015-07-09 01:11:53 PDT Ucode Ver: 764.1115 FWID: 01-685be63a
Default brcmfmac43340-sdio.bin shipped with Ubuntu 16.04:
43341b0-roml/sdio-ag-pno-p2p-ccx-extsup-proptxstatus-dmatxrc-rxov-pktfilter-keepalive-aoe-vsdb-sr-wapi-wl11d-autoabn-lpc-pclose-p2po-wl11u Version: 6.10.190.49 CRC: a75834d2 Date: Tue 2014-06-17 11:49:21 PDT FWID 01-8744bcd2
Based on the version strings, the firmware from Beelink seems to be newer. It also seems to be newer than the one found in this commit (the latest at the time of writing):
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/brcm/brcmfmac43340-sdio.bin?id=ffdec3f6a5f29eb8a848b6a2417e0a1b45d32fcc
Based on the compiler flags/options seens in the version strings, it is seems like the Beelink one has been compiled with a bunch of extra options for Windows support etc., which I obviously don't need on Linux. Still, is there any reason to run the latest slightly older one from the Linux kernel git repository or should I stay with the vendor one?
I do notice that 'iw list' shows the hardware capabilites now. I don't know if they did before the firmware change though as I forgot that the interface might be down by default.
Normally I'd go with the vendor supplied firmware if the default firmware didn't work.
It's possible that I made a mistake when trying it initially so the default firmware might work after all. The newer ones fix 5 GHz issues according to the commit I linked though, so I'll stay with the vendor one now that it works.
I guess one of the positive things with shipping the configuration/calibration as a text file, despite being cumbersome, is that I was able to easily change the country code, something that I know can be tricky to change sometimes. Especially the allowed 5 GHz bands are quite different between China and Europe. :)
Post a Comment
All comments now moderated so that spam can be deleted.