Changelog 2022-07-21: Add starting GVT-g on startup. Thanks to comment from Owsmyf (on Chinese version of this post). 2022-01-22: Revisions on NVIDIA driver updates and comments. I successfully passed through an Optimus MUXed GPU on my new laptop. Abstract (Spoiler Alert!) I successfully passed through Intel's GVT-g virtual GPU, as well as the dedicated NVIDIA GPU itself, into a virtual machine on Lenovo R720 gaming laptop. However, due to the limitation of the architecture itself, this GPU passthrough scheme is severely limited. For example, the dGPU is unusable in many games, and the performance is still relatively worse despite the complicated setup it needs. Therefore, you may attempt the passthrough purely for the fun of tinkering,...

Graduation Design - Sensor Network Development Log
Welcome to my third development log. In the two previous logs, I discussed the pitfalls I met in the RoboMaster competition and FPGA course final project . This time I will be talking about my graduate design project, an air quality sensor network built by a 3-person group. The whole project is structured as follow: Obtain data from installed sensor modules and upload them to InfluxDB running on a server Sensors we used: MiCS6814, measures NO2, CO, and NH3 Analog output BME680, measures temperature, humidity, atmospheric pressure, and TVOC I2C interface PMS5003, measures particle matters UART serial output Extra modules: ATGM336H, global positioning module with GPS+BeiDou support UART serial output ESP8266, a widely used Wi-Fi module UART serial output MH-CD42,...
(Almost) Lossless Archival with Modern Formats - H265 and HEIF
Many people keep their inventory of photos and videos for their travels, parties, or whatever important moments of their lives. If you are into taking photos and recording videos and like keeping all of them, you will likely fill up hard drives after hard drives. If you don't want to keep adding more drives to your collection, you may also try to compress your photos and videos. Speaking of compression, a common method is to reduce the resolution of images. I've used the good old Microsoft Office Picture Manager (that comes with Office 2003) and its built-in one-key image compression. Behind the scenes, it's actually downsampling images to JPEG files of around 1024x768. One major drawback is that a lot of the details are completely lost....

OS/2 Warp 4: Trying out & Installing Firefox
OS/2 is an operating system initially developed by IBM and Microsoft and later maintained by IBM. Back in the 1990s, OS/2 was a competitive rival to Windows, but later OS/2 was defeated by the Windows series, and IBM finally shut down OS/2 Warp 4's tech support on Dec 31, 2006. But this does not mark the death of OS/2. After official tech support ended, Senerity System took over OS/2's development and continued it under the name eComStation. In 2015, another company, Arca Noae LLC, produced an OS/2 based distribution called ArcaOS, and sold it as a commercial product. At the same time, the open-source community is providing some support to OS/2. They cross-compiled common Unix tools (including ls , rm , etc.), RPM/YUM package manager, and a series of libraries on OS/2....
(Nostalgia) ATduck Virtual Modem Dial-up Internet
Is this really the year 2019? Yes. For nostalgic purposes, I wanted to try dial-up internet on legacy operating systems like Windows 2000. Of course, in 2019, most people no longer use telephone line modems, and many might not even know they ever existed. Modern computers no longer have telephone line interfaces, and ISPs no longer provide dial-up services. This article by Doge Microsystems describes a method for self-hosting a dial-up ISP. The author purchased a hardware telephone modem, used Asterisk to build a SIP-based VoIP network, and then connected the modem to the network using an Analog Telephone Adapter (ATA). The author also used mgetty on Linux to operate the modem and combined it with pppd to provide a PPP dial-up service. The main issues with this approach are:...
Cyclone IV FPGA Development Log
Last semester, the school offered a digital systems course, which involves development on FPGAs. At the end of the course, we need to gather in groups and achieve some complicated functionality with the flexible architecture of FPGA, such as creating a game or running a convoluted neural network. We are free to add extra functionalities as we wish. Our group has done a game similar to Raiden, or controlling a fighter jet and attacking enemies with bullets. In addition to course requirements, we implemented these extra functionalities: A 640x480 VGA framebuffer with 16-bit color depth, stored on SRAM chip Naturally, Simplified Chinese fonts are included (full UTF-8 Chinese range, but without punctuation marks, since they are out of that range and we're kinda lazy)...

Raspberry Pi 3B Tinkering Notes: Serial Port Dial-up Networking
Is it 9102 already? Yes, it is. Why Do This I have a Raspberry Pi 3B and an ASUS Tinker Board. Sometimes issues like Wi-Fi failures/configuration errors/ pacman -Syu system breakage might cause one board to lose network connection. By connecting the serial ports of both boards and establishing a dial-up network connection, I can SSH into the problematic board from the other one when Wi-Fi or Ethernet fails. (Also, if you buy a Raspberry Pi without tinkering with GPIO, you might as well get an x86 Atom mini PC instead) How to Set Up Hardware Setup: Connect the serial ports of both boards. The Raspberry Pi's serial port uses Pin 8 (TX) for transmission and Pin 10 (RX) for reception (check pinout.xyz ). The Tinker Board's serial port also uses Pin 8 (TX) and Pin 10 (RX)....

Writing Stories in Traceroute
2020-10-11 Update Now a better way exists that doesn't involve a bunch of Docker containers. Please refer to Writing Stories in Traceroute, Elegantly . Intro Traceroute is one of the popular tools for network inspection. It shows the IP addresses of routers on the route from your computer to a destination server, similar to: Domains are shown on the last 2 hops, which is the IP's reverse DNS record. Reverse DNS records exist as PTR records in the format of 4.3.2.1.in-addr.arpa . For more information, you may refer to Setting IP Reverse Records in DN42 . However, PTR records need not be real domains. They can be any string that "looks like" a domain. With this, we can write one sentence on each hop of a Traceroute path to make a story: This story is set up in DN42....
Building ARM Docker Images on x86, Automated Builds with Docker Hub and Travis
Typically, Docker images are created by running specified commands step-by-step within an existing image. This process poses no issues for most users on x86 architecture computers, as the architectures are compatible. Images built on one machine can usually run directly on others, unless the programs within the image use newer instruction sets like AVX. However, there are ARM-based hosts that can run Docker and execute specially compiled ARM architecture images. These include Raspberry Pi series and similar boards like Cubieboard, Orange Pi, Asus Tinker Board, etc. Additionally, hosting providers like Scaleway offer ARM-based dedicated servers. Since ARM architecture systems cannot run on x86 computers, you can't directly generate ARM architecture images via Dockerfile on x86 machines....
Optimizing Docker Image Size
Since switching from OpenVZ-based VPS to KVM-based VPS, I've been using Docker to deploy essential services like nginx, MariaDB, and PHP for my websites. This approach not only simplifies restarting and managing configurations for individual services (by mapping all configuration directories together using volumes) but also streamlines service upgrades. For example, my blog's VPS has limited resources, with memory usage consistently around 80% recently. When updating nginx or adding modules, compiling directly on this VPS would be slow and risk crashing the site due to insufficient memory. With Docker, I can build images on other resource-rich VPS machines or my local computer, push them to Docker Hub, then pull and run them on the production VPS. However,...