Running out of RAM in Ubuntu? Enable ZRAM

htop-zram

Whenever I ran out of RAM on a Linux system, I used to enable swap memory using the storage device to provide an extra bit of memory.¬† The main advantage is that it’s does not require extra hardware, but come at the cost of much slower access, and potential issues or wear and tear, unless you only use it temporary. This week-end, I compiled Arm Compute Library on ODROID-XU4Q board, and the first time it crashed because the system ran out of memory, so I enable swap on the eMMC flash module to restart and complete the build successfully. However, I was told it would have been better to enable ZRAM instead. So what is ZRAM? Wikipedia explains: zram, formerly called compcache, is a Linux kernel module for creating a compressed block device in RAM, i.e. a RAM disk, but with on-the-fly “disk” compression. So it’s similar to swap, expect it operates in RAM and compresses memory. It’s also possible …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

How to Run Chrome OS in Android Emulator

Chrome-OS-Emulator

While it’s possible to run the open source Chromium OS in your computer or a virtual machine, AFAIK there was only was way to test Chrome OS: purchasing an actual Chromebook, or other device running the operating system. But this week-end, I read the news that Chrome OS was now available in Android Studio, and you can run in Android Emulator while emulating a Pixelbook, so I gave it a try by following the instructions on Android Developer website. If you haven’t done so already, we first need to install Android Studio. I’m running Ubuntu 16.04 in my computer, but this will also work in Windows and Mac OS X. After download the IDE zip file, we can extract it… and then open a console, go into “{installation home}/bin” and run the program: After a few seconds, we got into Android Studio 3.1.2 welcome screen. We can now click on Configure, and select SDK Manager… … and SDK Update Sites …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

How to Get Started with OpenCL on ODROID-XU4 Board (with Arm Mali-T628MP6 GPU)

ODROID-XU4-OpenCL-Convolution

Last week, I reviewed Ubuntu 18.04 on ODROID-XU4 board testing most of the advertised features. However I skipped on the features listed in the Changelog: GPU hardware acceleration via OpenGL ES 3.1 and OpenCL 1.2 drivers for Mali T628MP6 GPU While I tested OpenGL ES with tools like glmark2-es2 and es2gears, as well as WebGL demos in Chromium, I did not test OpenCL, since I’m not that familiar with it, except it’s used for GPGPU (General Purpose GPU) to accelerate tasks like image/audio processing. That was a good excuse to learn a bit more, try it out on the board, and write a short guide to get started with OpenGL on hardware with Arm Mali GPU. The purpose of this tutorial is to show how to run an OpenCL sample, and OpenCL utility, and I won’t go into the nitty gritty of OpenCL code. If you want to learn more about OpenCL coding on Arm, one way would be to …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

CrowPi is a Portable Learning Kit for Raspberry Pi 3 B+ / Zero Boards (Crowdfunding)

Raspberry-Pi-Learning-Kit

We have an embarrassment of choices for Raspberry Pi accessories from touchscreen displays, HAT add-ons boards, sensors, breadboard, and so on, as well as good software and support from Raspberry Pi forums. This is all good, but it can be messy with all those jumper cables, and not really portable. Elecrow has a neat solution with the CrowPi learning kit for Raspberry Pi 3 and Raspberry Pi Zero that come with a 7″ display, several sensors, buttons, a breadboard, and more all packed in a small suitcase. Main parts of the kit: 7″ touchscreen display Breadboard with GPIOs status LEDs Input modules – Light sensor, IR receiver, PIR motion sensor, sound sensor, temperature & humidity sensor, touch sensor, ultrasonic sensor, NFC reader, and tilt sensor Output modules – 8×8 LED matrix, 4-digit LED display, I2C LCD1602 display, buzzer, vibration motor, relay module, 9G servo, and stepper motor. Control modules – 4×4 array keypad and direction keys (D-Pad) A battery is …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

How to Install and Use Ace Stream Easily in Ubuntu / Mint Linux

Ace Stream enabling the streaming of videos using P2P (peer-to-peer) technology – specifically BitTorrent protocol – and is especially useful for live streams, but also works for¬†Audio and Video on Demand, and IOTT (Interactive-Over-The-Top). Ace Stream is implemented in a fork of VLC (Ace Player HD) working in Windows, Linux and Android, and I’ve found Full HD quality to be higher than services like YouTube, and with less buffering provided enough users watches the stream. It’s easy to use in Windows, and there used to be an Android app installable from the Play Store but it’s been removed, possibly because of the association of the solution with piracy. But just like Kodi, it’s up to do what you want to use it for. Using Ace Player was easy in Ubuntu up to version 14.04 thanks to a ppa, but with Ubuntu 16.04 it become a little more complicated as you had to installed the engine (that’s manage P2P connectivity) from …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

Cloudflare Introduces 1.1.1.1 Privacy-focused DNS Service with DNS over HTTPS and DNS over TLS Support

The web is becoming more secure as more and more websites leverage HTTPS, which also improves privacy since the only nodes that know which exact page you are accessing should be your computer/device and the server running the website. If you’re using a search engine, they will also know and potentially get track of your history depending on your favorite search engine. One thing that’s still often unencrypted are DNS requests which convert a website name into an IP address. The servers are also often provided by your ISP, so they may not know which exact page you’ve accessed, but they can still keep track of the websites you’ve visited. Depending where you live, your government may also block DNS servers in your country during “periods of unstability”, so third-party DNS services can be useful. For example, using 8.8.8.8 or 8.8.8.4 from Google, and now 1.1.1.1 or 1.0.0.1 from Cloudflare, which – beside improved privacy – has the advantage of …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

How to Run Linux on RISC-V with QEMU Emulator

RISC-V open source architecture is starting to become more and more interesting thanks the growing RISC-V hardware & software ecosystem, and with the recent release of HiFive Unleashed, we even have a board capable of running Linux. The only problem: it costs $999. But luckily, it’s possible to experiment with Linux on RISC-V without extra hardware, just using your current PC. Imperas offers a commercial solution working on both Windows and Linux that relies on busybear-linux RISC-V Linux root filesystem comprised of busybox and dropbear SSH server. The rootfs also works with QEMU, so I tried it in Ubuntu 16.04. The instructions on Github are quite easy to follow. My computer is powered by an AMD FX8350 processor coupled with 16GB RAM, and the whole process took around 2 hours, so better use the fastest computer possible. It also requires around 26 GB of storage on your build machine. First, let’s create a working directory, and retrieve the RISC-V toolchain: …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

How to Use 3G and GPS on Raspberry Pi with ThaiEasyElec 3G HAT Expansion Board

Venus Supply is an embedded systems company based in Bangkok, Thailand that sells products through their ThaiEasyElec website/brand, as well as a act as a local distributor for popular DIY electronics items. I previously tested their ESPino32 ESP32 board, and the company has now send me another of their new product called “3G HAT Expansion for Raspberry Pi” and based on Quectel UC20-G that support 3G and GPS/GLONASS connectivity globally, meaning it should work in any country with 2G or 3G coverage. After listing the specifications, going through unboxing and assembly with a Raspberry Pi 2/3 board, I’ll write some quick start guide to show what I had to do to use GPS and connect to 3G with a Hologram SIM card. 3G HAT Expansion for Raspberry Pi Specifications Quectel UC20-G wireless module supporting Cellular 3G – UMTS @ 800/850/900/1900/2100 MHz 2G – GSM @ 850/900/1800/1900 MHz Data – HSPA+ up to 14.4 Mbps Downlink, 5.76 Mbps Uplink, EDGE, GPRS …

Support CNX Software – Donate via PayPal or become a Patron on Patreon