google / gasket-driver

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

No /dev/apex_0 device #19

Open MrMEEE opened 8 months ago

MrMEEE commented 8 months ago

Description

I have a USB Coral connected to a XCP-NG server, which does redirects the device as a virtual usb device to a virtual machine.

I have successfully loaded the firmware to the device from the virtual machine (running RHEL9), using the webcoral "make reset"..

[root@yoda ~]# lsusb
Bus 001 Device 002: ID 18d1:9302 Google Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0627:0001 Adomax Technology Co., Ltd QEMU USB Tablet
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

I'm using the dkms package from here: https://download.copr.fedorainfracloud.org/results/kylegospo/google-coral-dkms/epel-9-$basearch/

and the drivers seems to be build correctly:


[root@yoda ~]# modinfo gasket
filename:       /lib/modules/5.14.0-284.30.1.el9_2.x86_64/extra/gasket.ko.xz
author:         Rob Springer <rspringer@google.com>
license:        GPL v2
version:        1.1.4
description:    Google Gasket driver framework
import_ns:      DMA_BUF
rhelversion:    9.2
srcversion:     C5E3C44F074635274B37D85
depends:
retpoline:      Y
name:           gasket
vermagic:       5.14.0-284.30.1.el9_2.x86_64 SMP preempt mod_unload modversions
sig_id:         PKCS#7
signer:         DKMS module signing key
sig_key:        03:9C:8D:C7:66:96:06:45:58:B9:AA:C3:F9:F8:AC:CB:B5:71:7C:24
sig_hashalgo:   sha512
signature:      3D:51:E9:73:6F:9B:16:0D:C1:64:EA:C9:E5:DE:C7:E8:07:91:CA:38:
                C9:BD:AB:FC:70:19:1C:B6:CE:99:BE:AC:F1:2C:66:D5:EB:46:69:76:
                B2:03:54:F8:6D:C9:84:98:C1:B4:1A:7A:71:1E:A5:AB:D7:4F:7F:45:
                BE:D7:DD:2E:F8:E0:1E:0B:D3:17:B6:F8:7C:76:9B:F3:E0:CD:02:CE:
                75:C2:94:A0:1E:32:9F:2B:9D:C8:D8:81:E6:F6:0F:E9:68:80:2D:CC:
                CD:98:A2:03:7A:F6:01:02:A1:6D:E2:AD:47:59:F8:E6:AB:6B:31:CC:
                E7:84:88:CE:C3:19:17:04:C7:F8:F5:2D:77:9E:F4:2A:1F:D1:13:61:
                E3:91:9A:01:C3:E8:05:26:F1:2C:32:27:1E:11:87:57:63:3C:D1:97:
                7F:C0:E7:98:3E:36:1B:B2:6E:CA:3E:FE:8E:7D:26:32:B8:FA:4E:24:
                35:4C:58:2E:7B:CD:94:B6:BF:11:3C:63:99:78:AB:9A:48:29:EC:72:
                A5:D8:A4:8E:04:50:E2:49:87:C5:40:A1:34:5C:CD:E3:62:20:6F:C4:
                44:7D:55:C9:9E:1C:29:A1:C2:DD:BD:3B:07:95:28:E0:DA:79:59:62:
                57:2D:65:D2:5B:57:6D:E0:11:AC:6C:10:E4:EB:1B:A3
parm:           dma_bit_mask:int
[root@yoda ~]# modinfo apex
filename:       /lib/modules/5.14.0-284.30.1.el9_2.x86_64/extra/apex.ko.xz
author:         John Joseph <jnjoseph@google.com>
license:        GPL v2
version:        1.2
description:    Google Apex driver
rhelversion:    9.2
srcversion:     700E8BBBE9CC23C6EC17712
alias:          pci:v00001AC1d0000089Asv*sd*bc*sc*i*
depends:        gasket
retpoline:      Y
name:           apex
vermagic:       5.14.0-284.30.1.el9_2.x86_64 SMP preempt mod_unload modversions
sig_id:         PKCS#7
signer:         DKMS module signing key
sig_key:        03:9C:8D:C7:66:96:06:45:58:B9:AA:C3:F9:F8:AC:CB:B5:71:7C:24
sig_hashalgo:   sha512
signature:      4D:DC:2D:9B:DA:EC:F2:71:7D:58:9B:39:87:4A:15:0E:A4:A4:23:0E:
                C9:63:2F:85:B1:36:DB:45:84:F1:6A:4A:CE:E9:DA:31:2C:9C:18:32:
                3E:45:A0:7C:99:36:E8:6C:F3:A4:6D:B4:7C:F5:84:57:41:DD:C4:01:
                41:33:3E:57:E3:68:D2:6D:70:98:B1:C5:67:43:4D:ED:D3:A4:56:6F:
                F8:DA:2F:F9:47:DF:0A:BE:9D:89:27:A0:E6:0E:20:FE:19:E8:06:65:
                33:A7:14:DC:17:87:80:24:A3:3E:1E:DB:CD:84:74:6C:2A:7C:04:AF:
                35:7C:F3:E1:8D:20:0D:07:5F:5E:58:A0:64:42:4E:03:E7:C2:7A:4F:
                D2:93:48:9C:B1:1E:4B:31:B0:60:65:64:A8:61:75:77:96:E5:9D:5E:
                8F:51:92:51:57:4B:1D:6D:DF:5D:B4:8E:0D:A9:14:F6:29:56:13:4B:
                D5:86:ED:0E:24:E1:B2:E1:CB:4A:E4:E8:26:DB:10:6D:04:E0:3F:37:
                B9:35:6A:75:4C:D8:10:47:D0:DC:E1:E1:C6:EE:21:ED:3F:53:11:1B:
                49:33:95:87:FA:F7:3F:5F:FD:70:E9:2B:85:43:10:64:B9:ED:FD:E0:
                D2:15:CC:F3:2C:72:06:A6:94:A8:47:47:D9:97:60:82
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

There is almost nothing in dmesg:

[root@yoda ~]# dmesg |grep gasket
[    1.980123] gasket: loading out-of-tree module taints kernel.
[    1.980153] gasket: module verification failed: signature and/or required key missing - tainting kernel
[root@yoda ~]# dmesg |grep apex

and no device:

[root@yoda ~]# ls -la /dev/apex*
ls: cannot access '/dev/apex*': No such file or directory

[root@yoda ~]# lsmod |grep apex
apex                   32768  0
gasket                126976  1 apex

Any suggestions?

Click to expand! ### Issue Type Support ### Operating System Linux ### Coral Device USB Accelerator ### Other Devices _No response_ ### Programming Language Other ### Relevant Log Output _No response_
robertzaage commented 7 months ago

Did you check if secure boot is turned on? mokutil --sb-state

If so, you need to create a key and sign the module yourself. As I'm a lazy fedora user getting frequent kernel updates, I just turned SB off and gave up on this stuff...

striker30345 commented 6 months ago

I have slightly more encouraging output from dmesg than @MrMEEE above:

root@pve:~# dmesg |grep apex
[   21.359736] apex 0000:65:00.0: enabling device (0140 -> 0142)
[   26.492924] apex 0000:65:00.0: Apex performance not throttled due to temperature
root@pve:~# dmesg |grep gasket
[   21.324419] gasket: module verification failed: signature and/or required key missing - tainting kernel

However, like them, I do not have any apex in /dev

@robertzaage I have checked the secure boot status and confirmed it is disabled via the command you provided.

M.2 Coral device on AMD64 system on Debian based OS (Proxmox) kernel 6.5.11-7

striker30345 commented 6 months ago

dkms status output:

root@pve:~# dkms status
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/gasket/1.0/source/dkms.conf)
gasket/1.0, 6.5.11-7-pve, x86_64: installed
bobmarley2021 commented 4 months ago

I have slightly more encouraging output from dmesg than @MrMEEE above:

root@pve:~# dmesg |grep apex
[   21.359736] apex 0000:65:00.0: enabling device (0140 -> 0142)
[   26.492924] apex 0000:65:00.0: Apex performance not throttled due to temperature
root@pve:~# dmesg |grep gasket
[   21.324419] gasket: module verification failed: signature and/or required key missing - tainting kernel

However, like them, I do not have any apex in /dev

@robertzaage I have checked the secure boot status and confirmed it is disabled via the command you provided.

M.2 Coral device on AMD64 system on Debian based OS (Proxmox) kernel 6.5.11-7

I am experiencing the same issue on Proxmox kernel 6.5.11-8. This is very frustrating. I have spent a good few hours troubleshooting this today.

Has a solution been found?

luisiam commented 3 months ago

Having the same issue with 6.5.13-5-pve kernel. Secure boot is confirmed to be disabled.

axsdenied commented 1 day ago

I think that the gasket driver is needed only for the PCIe-based Edge TPU devices. In other words, you don't need it for an USB Coral.

bobmarley2021 commented 1 day ago

I think that the gasket driver is needed only for the PCIe-based Edge TPU devices. In other words, you don't need it for an USB Coral.

I can confirm that this is correct (something I didn't realise at the time when I posted above). I have the USB coral functioning now without the gasket driver. It turned out to be a faulty unit, once I had swapped it out, everything magically worked again.