google / gasket-driver

GNU General Public License v2.0
55 stars 29 forks source link

Package in stable repo are failing on Ubuntu 22.04+ #22

Open drikster80 opened 8 months ago

drikster80 commented 8 months ago

The installation of the gasket-dkms has begun failing on Ubuntu. It looks like the problem was solved 4 months ago in this patch, but the official Google Repos seem to be abandoned.

REPO: https://packages.cloud.google.com/apt/dists/coral-edgetpu-stable/main

It's a bit embarrassing that an official google repo for a google product seems to be abandoned when it's called "stable". :-(

Does anyone know of a supported Debian repo at this point?

robertzaage commented 8 months ago

@mbrooksx Are you able to keep these repos in sync? 😊

noisyscott commented 8 months ago

Chiming in to say I am having the same issue after applying apt update && apt upgrade and now a previously working TPU is no longer available


mokutil --sb-state
SecureBoot disabled

dpkg -l | grep gasket
ii  gasket-dkms 1.0-18 all DKMS source for the gasket driver

lspci -nn | grep 089a
01:00.0 System peripheral [0880]: Global Unichip Corp. Coral Edge TPU [1ac1:089a]

ls /dev/apex_0
ls: cannot access '/dev/apex_0': No such file or directory
Leon-Sam commented 8 months ago

I like to +1 this. My Frigate NVR instance with a Google Coral TPU chip broke after running apt update/upgrade on ubuntu 23.04.3 Desktop.

My workaround was to reinstall the OS to Ubuntu Server 23.03 (It's on Linux Kernel 5.XX)

Here's an issue in the Frigate repo to help others have breadcrumbs LINK

Mikescotland commented 8 months ago

Same problem here. Reverted to CPU detection as TPU unusable. Reinstalling in my case seems to be too complicated and risky. How to build the correct package for kernel 6.5??

noisyscott commented 8 months ago

@Mikescotland, @Leon-Sam

You can solve this issue by building then installing the DKMS driver as outlined on the project Readme https://github.com/google/gasket-driver

Leon-Sam commented 8 months ago

I just reinstalled the OS to Ubuntu server 23.04 which has a major kernel < 6. The entire server was configured via an ansible script, and didn't feel like building the gasket driver as apart of the script or keeping track of the artifact else where.

But I appreciate the help! @noisyscott

izzeho commented 8 months ago

Has anyone successfully built and run for Ubuntu 23.10 on 6.5.0-15?

Build succeeds, but modules won't load due to mismatch

sudo insmod /lib/modules/6.5.0-15-generic/updates/dkms/apex.ko.zst insmod: ERROR: could not insert module /lib/modules/6.5.0-15-generic/updates/dkms/apex.ko.zst: Invalid module format

sudo dmesg [ 2091.374207] module apex: .gnu.linkonce.this_module section size must match the kernel's built struct module size at run time

I tried messing with build options etc as lintian complained about bad distribution, but removing that didn't help.

_sudo modinfo apex_
filename:       /lib/modules/6.5.0-15-generic/updates/dkms/apex.ko.zst
author:         John Joseph <jnjoseph@google.com>
license:        GPL v2
version:        1.2
description:    Google Apex driver
srcversion:     700E8BBBE9CC23C6EC17712
alias:          pci:v00001AC1d0000089Asv*sd*bc*sc*i*
depends:        gasket
retpoline:      Y
name:           apex
vermagic:       6.5.0-15-generic SMP preempt mod_unload modversions 
sig_id:         PKCS#7
signer:         farmbox2 Secure Boot Module Signature key
sig_key:        6E:28:7C:65:02:AD:E0:73:E4:0C:E1:80:D2:1F:66:D2:E0:D3:57:3C
sig_hashalgo:   sha512
signature:      08:1B:FC:69:8B:19:AC:09:83:CC:A4:16:45:F9:83:6E:A1:A3:02:E0:
        F2:F4:C5:94:ED:CE:A9:40:5D:A1:D4:F3:8C:08:01:DA:5F:3A:66:A2:
        66:A2:F1:3C:96:B8:6E:CA:B4:A5:FA:D2:5A:64:5C:A3:08:D7:1A:1A:
        01:8D:79:22:F7:F1:AA:79:09:11:03:BD:91:95:08:D7:12:E7:F2:79:
        D6:7B:25:47:7A:B4:79:82:2B:5E:5C:1C:4C:AA:E2:60:F2:72:0A:44:
        30:63:00:06:97:52:77:9D:69:90:5E:35:3B:7C:1E:8B:31:15:58:12:
        D0:FB:82:C2:11:32:42:CB:6F:11:29:C7:42:C8:E4:3C:41:FD:68:5F:
        CF:65:ED:18:9B:04:2C:5E:94:32:3E:4E:6D:F5:3C:A7:C1:C0:3D:54:
        61:39:EF:9E:CE:B0:FC:A7:FE:27:26:B4:46:D4:B0:28:D1:2D:B5:E1:
        C5:C1:BD:B3:1A:B7:4F:5C:43:0C:61:DA:3A:4A:0A:2A:8C:1B:99:48:
        5A:FF:4E:18:F5:46:F2:86:29:7E:98:19:29:5F:57:1D:B1:7D:8A:B7:
        91:C7:EE:CD:4E:80:53:09:26:C5:1F:69:92:2D:EB:2C:01:B5:7B:33:
        27:8A:7F:65:0B:AB:A0:3D:0F:FD:BC:42:3F:52:C9:97
parm:           allow_power_save:int
parm:           allow_sw_clock_gating:int
parm:           allow_hw_clock_gating:int
parm:           bypass_top_level:int
parm:           trip_point0_temp:int
parm:           trip_point1_temp:int
parm:           trip_point2_temp:int
parm:           hw_temp_warn1:int
parm:           hw_temp_warn2:int
parm:           hw_temp_warn1_en:bool
parm:           hw_temp_warn2_en:bool
parm:           temp_poll_interval:int

uname -r 6.5.0-15-generic

robertzaage commented 8 months ago

@izzeho Did you built the module from this repo against the exact mentioned kernel? Are you signing your module afterwards (secure boot)?

izzeho commented 8 months ago

@izzeho Did you built the module from this repo against the exact mentioned kernel? Are you signing your module afterwards (secure boot)?

I believe so, running on the build machine using commands from repo. Vermagic above gives correct kernel. Secure boot is off.

$ mokutil --sb-state SecureBoot disabled

Szewcson commented 5 months ago

Will the repo be updated in the future?