# Installing Google Coral TPU Gasket Driver on Debian with Kernel Linux 7.x

> Source: <https://grigio.org/installing-google-coral-tpu-gasket-driver-on-debian-with-kernel-linux-7-x/>
> Published: 2026-05-11 20:15:59+00:00

# Installing Google Coral TPU Gasket Driver on Debian with Kernel Linux 7.x

**Note: Google's official gasket-driver repo is now archived/abandoned as of April 2026. This guide uses the community-maintained fork.**

Why This Guide?

The official `gasket-driver`

from Google is abandoned. On Debian 13/Trixie with kernel 6.13+, the `MODULE_IMPORT_NS`

macro changed and requires quotes: `MODULE_IMPORT_NS("DMA_BUF")`

instead of `MODULE_IMPORT_NS(DMA_BUF)`

.

This guide shows how to patch and build it yourself.

## Prerequisites

```
# Install required packages
sudo apt update
sudo apt install -y git dkms build-essential linux-headers-$(uname -r)
```

## Method 1: Pre-built DEB (easiest)

Download the community-maintained package:

```
wget https://github.com/feranick/gasket-driver/releases/download/1.0-18.4/gasket-dkms_1.0-18.4_all.deb
sudo dpkg -i gasket-dkms_1.0-18.4_all.deb
```

## If it fails, try Method 2.

## Method 2: Build from Source (recommended for kernel 7.x)

### 1. Clone the repository

```
git clone https://github.com/google/gasket-driver.git
cd gasket-driver/src
```

### 2. Apply patches for kernel 6.13+ / 7.x

``` php
# Fix no_llseek -> noop_llseek
sed -i 's/no_llseek/noop_llseek/g' gasket_core.c
# Fix MODULE_IMPORT_NS for kernel 6.13+
sed -i 's/MODULE_IMPORT_NS(DMA_BUF)/MODULE_IMPORT_NS("DMA_BUF")/g' gasket_page_table.c
```

### 3. Build the package

```
cd ..
dpkg-buildpackage -us -uc -tc -b
cd ..
sudo dpkg -i gasket-dkms_1.0-*.deb
```

## Verify Installation

```
# Check modules loaded
lsmod | grep -E 'gasket|apex'
# Check TPU device
ls /dev/apex_0
# Check PCI device
lspci -nn | grep -i apex
```

Expected output:

```
04:00.0 System peripheral [0880]: Global Unichip Corp. Coral Edge TPU [1ac1:089a]
```

## Troubleshooting

### "DMA_BUF undeclared"

You need the `MODULE_IMPORT_NS("DMA_BUF")`

patch. The kernel API changed in 6.13.

### "no_llseek undefined"

Apply the `noop_llseek`

patch or remove the `.llseek = no_llseek`

line.

### Clean previous failed installs

```
sudo rm -rf /var/lib/dkms/gasket
sudo apt purge gasket-dkms
sudo dpkg --configure -a
```


