Linux 下 Asus ZenVision 笔记本外屏 OLED 的逆向工程用户空间驱动程序
Reverse-Engineered Userspace Driver for Asus ZenVision Lid OLED on Linux"

原始链接: https://github.com/tarpediem/zenvision-linux

本项目为华硕 Zenbook 14X OLED 太空版 (UX5401ZAS) 上搭载的 3.5 英寸 (256×64) “ZenVision” OLED 顶盖显示屏提供了首个开源 Linux 驱动程序。 由于华硕仅提供适用于该屏幕的 Windows 软件,本项目通过对 USB 协议 (Nuvoton M480) 进行逆向工程,使 Linux 用户能够显示图像、动画及自定义视觉内容。该驱动通过用户空间的 Python 接口运行,利用 USB 批量传输端点(Bulk USB endpoints)将 4 位灰度帧缓冲区推送到设备。 **主要功能:** * **功能特性:** 显示静态图像、播放动画或清除屏幕内容。 * **配套应用:** 使用 `zenvision-studio` 可实现实时小程序和音频响应式视觉效果。 * **兼容性:** 专为 UX5401ZAS 设计,具备支持其他机型的潜力(欢迎贡献代码)。 * **安装要求:** 需要 Python 3.9+、`pyusb` 和 `Pillow`。提供 Udev 规则以允许非 root 用户访问硬件。 这是一个独立的非官方项目,采用 MIT 许可证。它不使用也不包含任何华硕专有的代码或二进制文件。如需将驱动程序移植到其他兼容设备,可参考详细的协议文档。

``` Hacker News 最新 | 过往 | 评论 | 提问 | 展示 | 招聘 | 投稿 登录 为 Linux 系统逆向工程的华硕 ZenVision 盖板 OLED 驱动程序 (github.com/tarpediem) 9 积分 作者:berlianta 1 小时前 | 隐藏 | 过往 | 收藏 | 讨论 | 帮助 社区准则 | 常见问题 | 列表 | API | 安全 | 法律 | 加入 YC | 联系 搜索: ```
相关文章

原文

🟢 The first open-source Linux driver for the ASUS ZenVision lid OLED — the protocol was reverse-engineered from scratch (Ghidra on MyASUS). Want live applets and audio-reactive visualisers on top? See the companion app zenvision-studio.

Userspace Linux driver for the ASUS ZenVision lid OLED — the 3.5", 256×64 monochrome screen embedded in the lid of the ASUS Zenbook 14X OLED Space Edition (UX5401ZAS).

ASUS only ships software for this screen on Windows (inside MyASUS). This project reverse-engineers the USB protocol and lets you drive the panel from Linux: show images, play animations, or display whatever you like.

Status: working on UX5401ZAS. Other ASUS lid-OLED models may use a similar protocol — reports and PRs welcome.

demo

The lid screen is a Nuvoton M480 USB device (0b05:8835). It is not a DRM display — you don't get a /dev/fb; instead you push a 256×64, 4-bit-grayscale framebuffer to a bulk endpoint after a small command handshake. Full details in PROTOCOL.md.

  • Python 3.9+
  • pyusb and Pillow
  • libusb-1.0
  • Raw USB access (root, or the provided udev rule)
python -m venv .venv && . .venv/bin/activate
pip install pyusb pillow
yay -S zenvision-linux-git        # installs the `zenvision` CLI + the udev rule
# Static image (auto-resized to 256x64, converted to grayscale)
sudo ./zenvision.py image picture.png

# White test pattern / clear
sudo ./zenvision.py image --white
sudo ./zenvision.py off

# Play a folder of frames as a smooth animation
sudo ./zenvision.py anim frames/ --fps 20

Brightness: --bright 0xff (scale is approximate; tune by eye).

Generate the demo animation

examples/spark_demo.py renders a generic rotating-starburst animation into a frames/ folder you can feed to anim:

pip install pillow
python examples/spark_demo.py --out frames --w 256 --h 64
sudo ./zenvision.py anim frames/ --fps 20

Want a logo? Render any monochrome 256×64 frames into a folder and point anim at it. (Tip: rsvg-convert an SVG, or ffmpeg -i clip.gif frames/%03d.png.)

Running without root (udev)

Copy the rule so your user can access the device:

sudo cp udev/70-zenvision.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && sudo udevadm trigger

The 70- prefix matters: the rule must sort before 73-seat-late.rules so the uaccess tag is applied — otherwise the ACL is never granted. uaccess gives the logged-in user access (the right mechanism on systemd; no plugdev group needed). Then run without sudo.

  • The panel is firmware-powered and survives a re-plug; experiments are recoverable with a reboot. Sending malformed control reports on the HID interface can soft-reset the MCU (it re-enumerates cleanly) — this driver only uses the vendor interface.
  • This is an independent, unofficial project. Not affiliated with or endorsed by ASUS.
  • No ASUS firmware, binaries, or decompiled code are included or required.

If you have another ASUS model with a lid OLED, please open an issue with: lsusb, your model number, and whether the framing here works. The protocol doc is written to make porting straightforward.

MIT.

联系我们 contact @ memedata.com