English · Português
Makes WAVLINK / Silicon Motion SM768 USB display adapters (USB id 090c:0768)
work on Ubuntu 24.04 with GNOME/Wayland, the setup where the official
Silicon Motion driver leaves you with a gray screen at boot and a USB monitor
that lights up and goes black when plugged in.
The fix lives entirely in the open-source (GPL) EVDI layer. It never touches the closed-source Silicon Motion daemon or firmware.
- The official installer aborts on Ubuntu 24.04's kernel (6.8+): it ends with
Failed to install evdi ... to the kernel/bad exit status: 2, rolls itself back, and the driver is never installed (/opt/siliconmotionis not created). - After installing the driver, the desktop boots to a frozen gray screen; you can only get in through recovery mode.
- Plugging the USB display makes it flash ("universal graphic") and then go black, the desktop never appears on it.
Three problems, all in the open-source EVDI layer, none in the firmware. The first strikes at install time; the other two strike on the desktop after installing.
-
Installer aborts on modern kernels (build failure). The vendor
.runbundles EVDI 1.14.7 (Nov 2024). Its DKMS build does not compile against kernel 6.8+ (the kernel internal DRM API changed), so the module build fails withbad exit status: 2, the installer auto-reverts, and nothing is installed. Fixed by swapping the bundled EVDI for 1.15.0 (Jul 2026), which builds cleanly on current kernels; see Step 0. -
Daemon crash on plug (
SIGSEGV). When a monitor is plugged in, theSMIUSBDisplayManagerdaemon calls the deprecatedevdi_open_attached_to(NULL)to get a generic EVDI device. In libevdi 1.15 that wrapper runsstrlen(NULL)beforeevdi_open_attached_to_fixed(), which actually handlesNULLcorrectly, ever gets the pointer. The result is a null-pointer dereference that kills the daemon every single time a display is connected. -
Gray screen at boot (GPU selection). The official installer drops
/etc/modules-load.d/evdi.conf, which force-loads theevdimodule at every boot with four virtual displays. Those virtual cards join the init race just asamdgpuis coming up, andmutter(Wayland) sometimes picks the EFI boot framebuffer (simpledrm) as the primary GPU, fails to render (gbm_surface_lock_front_buffer failed), and shows a gray screen.
The fix is a one-line NULL guard in library/evdi_lib.c (rebuilt into libevdi)
plus stopping evdi from loading at boot. It then loads on demand when you plug
the display, after the display manager is already up.
- Ubuntu 24.04 (also expected to work on 23.04 / 22.04 / 20.04).
- The official Silicon Motion driver installed under
/opt/siliconmotion(this repo patches it, it does not replace it). On kernel 6.8+ the vendor installer will not complete on its own, so do Step 0 first. Get the driver from WAVLINK's download center and pick your SM768-based model (e.g. WL-UG7601HC / WL-UG7602HC): https://www.wavlink.com/en_us/drivers.html - Build tools:
build-essential pkg-config patch libdrm-dev.
sudo apt install build-essential pkg-config patch libdrm-dev| Component | Version |
|---|---|
| Distribution | Ubuntu 24.04.4 LTS (Noble Numbat) |
| Kernel | 6.17.0-35-generic |
| Desktop | GNOME Shell 46.0 |
| Display server / interface | Wayland (also works on X11) |
| Login manager | GDM3 |
| GPU driver | AMD amdgpu (Lucienne APU) |
| EVDI / libevdi | 1.15.0 |
| USB adapter | WAVLINK WL-UG7602HC (Silicon Motion SM768), 090c:0768 |
| External display | 1920x1080 @ 60 Hz |
Do this only if the official installer failed (kernel 6.8+). It leaves the vendor package untouched and writes a patched copy next to it, with the bundled EVDI 1.14.7 replaced by 1.15.0 so the DKMS build succeeds.
# point it at the vendor installer (WAVLINK download, SMIUSBDisplay-driver.*.run)
./scripts/prepare-vendor-driver.sh --run "SMIUSBDisplay-driver.2.22.1.0.run"
# or at an already-extracted vendor folder:
./scripts/prepare-vendor-driver.sh --dir "SMIUSBDisplay"It prints the path of the patched folder; install the vendor driver from there:
cd <folder-it-printed> # e.g. SMIUSBDisplay-patched-evdi1.15.0
sudo ./install.sh # now the EVDI build succeeds → Installation complete!It runs fully offline: the EVDI 1.15.0 source is bundled in this repo
(third_party/evdi-1.15.0.tar.gz), so nothing is downloaded. The only file you
fetch yourself is the vendor driver, which is closed-source and cannot be
redistributed here.
Flags: --evdi-src <dir|tarball> to point at a different local EVDI source,
--evdi-tag <tag> to clone another release from GitHub instead of the bundle,
--dry-run to preview, --help for all options.
Secure Boot: no extra step. DKMS signs the EVDI module with the machine's
already-enrolled MOK key (/var/lib/shim-signed/mok/MOK.der), the same key
Ubuntu uses for VirtualBox and other DKMS modules. You do not create or enroll a
new key. Confirm with mokutil --sb-state.
After the vendor driver installs cleanly, continue with the desktop fix below.
git clone https://github.com/IMNascimento/wavlink_driver_ubuntu.git
cd wavlink_driver_ubuntu
# 0. only if the official installer failed on kernel 6.8+ (see Step 0 above):
./scripts/prepare-vendor-driver.sh --run "SMIUSBDisplay-driver.2.22.1.0.run"
./scripts/diagnose.sh # 1. read-only health check, changes nothing
sudo ./install.sh # 2. apply the desktop fix
# 3. plug in the USB display, it should light up automaticallyThree layers of safe checking, none of which modify your system permanently:
| Command | What it does | Root? |
|---|---|---|
./scripts/diagnose.sh |
Reports OS, GPU, adapter, fix status, deps. Read-only. | no |
./install.sh --build-only |
Compiles the patched libevdi to a temp dir and verifies it. Installs nothing. | no |
./install.sh --dry-run |
Prints every action it would take. Changes nothing. | no |
Run all three and read the output before running the real sudo ./install.sh.
Once installed, the display is fully automatic:
- Plug in the USB adapter → the service starts on-demand (via the vendor udev
rule),
evdiloads, and your desktop extends onto the external monitor. - Unplug → the service stops. Nothing runs at boot, so boots stay clean.
Configure the external monitor (mirror / extend / resolution) in Settings → Displays as usual.
scripts/set-virtual-displays.sh controls how many virtual screens the evdi
module creates. This is optional tuning, not part of the fix: skip it and
everything still works.
evdi pre-creates a pool of virtual display devices at module load time, one
/dev/dri/cardN each, and the USB display daemon then claims one from that pool
for every monitor you plug in. The pool size is the initial_device_count
module option, and the vendor installer hardcodes it to 4
(/etc/modprobe.d/evdi.conf). Upstream EVDI's own default is 0, so the 4
comes from the vendor, not from EVDI.
One per physical output on the USB adapter. A monitor plugged straight into your machine's own HDMI or DisplayPort does not use one: that output is driven by your real GPU and never goes through EVDI at all. So a two-output adapter plus a direct-HDMI monitor needs 2, not 4, no matter how many screens are on your desk.
./scripts/set-virtual-displays.sh --show # current setting, no root needed
sudo ./scripts/set-virtual-displays.sh 2 # pool of 2 virtual displays
sudo ./scripts/set-virtual-displays.sh --reset # back to the vendor default (4)| Flag | Effect |
|---|---|
--show |
Prints the configured count, the live count, and whether evdi is loaded. No root. |
--reload |
Applies immediately: stops the daemon, reloads evdi, restarts it. Without it, the new count applies on the next plug. |
--dry-run |
Prints every action, changes nothing. |
--reset |
Restores the vendor default of 4. |
The original config is backed up once to
/opt/siliconmotion/evdi-modprobe.conf.orig, and uninstall.sh puts it back.
Be realistic about the size of the win. Each unused device is a kernel DRM device with a connector, encoder, CRTC and a few small buffers; no framebuffer is allocated until a display actually connects, so two idle devices cost kilobytes, not megabytes. Dropping 4 to 2 is not going to show up in your RAM graph.
The benefits that are actually worth having:
- A cleaner display setup. Every device in the pool is a real DRM node that
X11, Xwayland, GNOME Settings and
xrandrenumerate and probe. Unused ones show up as permanently disconnected outputs and extra providers. Matching the pool to your hardware makes the display list mean what it says. - Less to go wrong at session start. Fewer DRM nodes means a smaller surface
for the compositor's primary-GPU selection, which is the class of problem this
repo exists to fix. Upstream ships a
softdepoption for this same reason: to stop a compositor from treatingevdias the primary GPU. - Honest defaults. 4 is a vendor guess, not a measurement of your hardware.
Upstream documents initial_device_count as a workaround for X.Org: the X
server builds its list of GPU providers once at startup and can crash when a GPU
device appears later, so DisplayLink-style drivers pre-create a pool instead of
adding devices on demand. On Wayland that constraint does not apply.
libevdi creates a card on demand when it needs one and none is free: it writes
to /sys/devices/evdi/add and retries. So an undersized pool self-heals on the
next plug rather than failing. Match it to your adapter anyway, since that is the
whole point, but a wrong guess will not leave you without a screen.
Full revert to the vendor-default state:
sudo ./uninstall.sh # add --dry-run to previewThis restores the original libevdi and the boot config. Note that restoring the vendor boot config can bring back the original gray screen; if it does, just neutralize the service:
sudo systemctl mask smiusbdisplay.service| File | Role |
|---|---|
scripts/prepare-vendor-driver.sh |
Step 0: repacks the vendor evdi.tar.gz with EVDI 1.15.0 so the official installer builds on kernel 6.8+. |
third_party/evdi-1.15.0.tar.gz |
Bundled EVDI 1.15.0 source so Step 0 runs offline. |
patches/evdi-open-attached-to-null-guard.patch |
The one-line NULL guard for evdi_open_attached_to(). |
scripts/diagnose.sh |
Read-only system health check. |
scripts/set-virtual-displays.sh |
Optional: sets how many virtual displays evdi creates (initial_device_count). Default stays 4. |
install.sh |
Builds the patched libevdi from the vendor's evdi.tar.gz, backs up the original, installs it, disables the boot force-load, enables on-plug startup. |
uninstall.sh |
Reverts everything to the vendor-default state. |
- Official installer ends with
Failed to install evdi/bad exit status: 2: the bundled EVDI 1.14.7 does not build on kernel 6.8+. Run Step 0 (./scripts/prepare-vendor-driver.sh) and install from the patched copy. $SMI_DIR not found: the official Silicon Motion driver is not installed yet; the vendor files must be in/opt/siliconmotion. If its installer aborts, see the entry above.patch failed to apply: your libevdi version differs from 1.15; the guard targets that release.- Still gray at boot: confirm
/etc/modules-load.d/evdi.confis gone (./scripts/diagnose.shreports this) and, as a last resort, mask the service.
The patch modifies libevdi, which is licensed under the GPL by DisplayLink (UK) Ltd. This repository is distributed under the GPLv3 (see LICENSE). The Silicon Motion binaries and firmware are not redistributed here; you need the official driver installed (see Requirements for the WAVLINK download link).
See Environment we tested on for exact versions.
Contributions are welcome. Please follow the standards already documented in
CONTRIBUTING.md: fork, use a feature branch, write
Conventional Commits, keep scripts
idempotent and reversible, validate with the read-only modes
(./scripts/diagnose.sh, ./install.sh --build-only, --dry-run), and open a
Pull Request against main using PULL_REQUEST_TEMPLATE.md.
Developed and maintained by @IMNascimento, lead developer.