MediaTek doesnt get installed on Ubuntu 20.4

Bug #1952554 reported by Shashank
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

I've tried various git repositories such as https://github.com/neurobin/MT7630E/archive/release.zip
to install mediatek driver on my laptop but for some reason it gives me:

 fatal error: linux/input-polldev.h: No such file or directory
   39 | #include <linux/input-polldev.h>

so how do i install this header file, if it wasn't auto installed is my ubuntu installation incomplete?
Please Let me know what i should do about it

Linux config :
Linux version 5.11.0-40-generic (buildd@lgw01-amd64-010) (gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #44~20.04.2-Ubuntu SMP Tue Oct 26 18:07:44 UTC 2021

Machine Config:
Processor: AMD® Ryzen 7 4800h with radeon graphics × 16
GRaphics: AMD® Renoir /Nvidia GTX 1650
Mem: 8/512
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu27.21
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC2: shashank 1134 F.... pulseaudio
 /dev/snd/pcmC2D0p: shashank 1134 F...m pulseaudio
 /dev/snd/controlC0: shashank 1134 F.... pulseaudio
 /dev/snd/controlC1: shashank 1134 F.... pulseaudio
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
DistroRelease: Ubuntu 20.04
InstallationDate: Installed on 2021-11-27 (1 days ago)
InstallationMedia: Ubuntu 20.04.3 LTS "Focal Fossa" - Release amd64 (20210819)
MachineType: ASUSTeK COMPUTER INC. ROG Strix G513IH_G513IH
Package: linux (not installed)
ProcFB: 0 amdgpudrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.11.0-40-generic root=UUID=0986df07-e116-4b7b-b0bb-8936fd30d815 ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 5.11.0-40.44~20.04.2-generic 5.11.22
RelatedPackageVersions:
 linux-restricted-modules-5.11.0-40-generic N/A
 linux-backports-modules-5.11.0-40-generic N/A
 linux-firmware 1.187.20
RfKill:
 0: hci0: Bluetooth
  Soft blocked: no
  Hard blocked: no
Tags: focal
Uname: Linux 5.11.0-40-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip input libvirt lpadmin lxd plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 07/16/2021
dmi.bios.release: 5.16
dmi.bios.vendor: American Megatrends International, LLC.
dmi.bios.version: G513IH.310
dmi.board.asset.tag: ATN12345678901234567
dmi.board.name: G513IH
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: 1.0
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: ASUSTeK COMPUTER INC.
dmi.chassis.version: 1.0
dmi.ec.firmware.release: 0.68
dmi.modalias: dmi:bvnAmericanMegatrendsInternational,LLC.:bvrG513IH.310:bd07/16/2021:br5.16:efr0.68:svnASUSTeKCOMPUTERINC.:pnROGStrixG513IH_G513IH:pvr1.0:sku:rvnASUSTeKCOMPUTERINC.:rnG513IH:rvr1.0:cvnASUSTeKCOMPUTERINC.:ct10:cvr1.0:
dmi.product.family: ROG Strix
dmi.product.name: ROG Strix G513IH_G513IH
dmi.product.version: 1.0
dmi.sys.vendor: ASUSTeK COMPUTER INC.
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu27.21
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC2: shashank 1134 F.... pulseaudio
 /dev/snd/pcmC2D0p: shashank 1134 F...m pulseaudio
 /dev/snd/controlC0: shashank 1134 F.... pulseaudio
 /dev/snd/controlC1: shashank 1134 F.... pulseaudio
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
DistroRelease: Ubuntu 20.04
InstallationDate: Installed on 2021-11-27 (1 days ago)
InstallationMedia: Ubuntu 20.04.3 LTS "Focal Fossa" - Release amd64 (20210819)
MachineType: ASUSTeK COMPUTER INC. ROG Strix G513IH_G513IH
Package: linux (not installed)
ProcFB: 0 amdgpudrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.11.0-40-generic root=UUID=0986df07-e116-4b7b-b0bb-8936fd30d815 ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 5.11.0-40.44~20.04.2-generic 5.11.22
RelatedPackageVersions:
 linux-restricted-modules-5.11.0-40-generic N/A
 linux-backports-modules-5.11.0-40-generic N/A
 linux-firmware 1.187.20
RfKill:
 0: hci0: Bluetooth
  Soft blocked: no
  Hard blocked: no
Tags: focal
Uname: Linux 5.11.0-40-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip input libvirt lpadmin lxd plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 07/16/2021
dmi.bios.release: 5.16
dmi.bios.vendor: American Megatrends International, LLC.
dmi.bios.version: G513IH.310
dmi.board.asset.tag: ATN12345678901234567
dmi.board.name: G513IH
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: 1.0
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: ASUSTeK COMPUTER INC.
dmi.chassis.version: 1.0
dmi.ec.firmware.release: 0.68
dmi.modalias: dmi:bvnAmericanMegatrendsInternational,LLC.:bvrG513IH.310:bd07/16/2021:br5.16:efr0.68:svnASUSTeKCOMPUTERINC.:pnROGStrixG513IH_G513IH:pvr1.0:sku:rvnASUSTeKCOMPUTERINC.:rnG513IH:rvr1.0:cvnASUSTeKCOMPUTERINC.:ct10:cvr1.0:
dmi.product.family: ROG Strix
dmi.product.name: ROG Strix G513IH_G513IH
dmi.product.version: 1.0
dmi.sys.vendor: ASUSTeK COMPUTER INC.

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1952554

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: hirsute
Revision history for this message
Shashank (shashankvmadan123) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected focal
description: updated
Revision history for this message
Shashank (shashankvmadan123) wrote : CRDA.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : IwConfig.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : Lspci.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : Lspci-vt.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : Lsusb.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : Lsusb-t.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : Lsusb-v.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : ProcEnviron.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : ProcModules.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : PulseList.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : UdevDb.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : WifiSyslog.txt

apport information

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Shashank (shashankvmadan123) wrote : acpidump.txt

apport information

description: updated
Revision history for this message
Shashank (shashankvmadan123) wrote : AlsaInfo.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : CRDA.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : IwConfig.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : Lspci.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : Lspci-vt.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : Lsusb.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : Lsusb-t.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : Lsusb-v.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : ProcEnviron.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : ProcModules.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : PulseList.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : UdevDb.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : WifiSyslog.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote : acpidump.txt

apport information

Revision history for this message
Shashank (shashankvmadan123) wrote :

dpkg-query: no packages found matching linux

says apport-collect 1952554

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Hi,
this header file input-polldev.h has been removed upstream:
https://github.com/torvalds/linux/commit/278b13ce3a89698711c5a67792ba2dba41555433

And this commit has landed on hirsute 5.11, that's why you're not getting this file on Focal 5.11.

There is nothing we can do here, you will need to contact the maintainer to update the code. Or use Focal 5.4 instead.

Changed in linux (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
Ilya w495 Nikitin (w-495) wrote :

By the way, you can comment lines with errors. I know this is dirty hack but now it works for me.

So I've done this:
```
root@gt-n750jk:/opt/MT7630E/MT7630E# git diff
diff --git a/rt2x00/rt2800pci.c b/rt2x00/rt2800pci.c
index 2bad45c..f6d99ef 100644
--- a/rt2x00/rt2800pci.c
+++ b/rt2x00/rt2800pci.c
@@ -1711,7 +1711,7 @@ static const struct pci_device_id rt2800pci_device_table[] = {
 MODULE_AUTHOR(DRV_PROJECT);
 MODULE_VERSION(DRV_VERSION);
 MODULE_DESCRIPTION("Mediatek MT7630 PCI Wireless LAN driver.");
-MODULE_SUPPORTED_DEVICE("Mediatek PCI MT7630-based cards");
+//MODULE_SUPPORTED_DEVICE("Mediatek PCI MT7630-based cards");
 #ifdef CONFIG_PCI
 MODULE_FIRMWARE(FIRMWARE_MT7630);
 MODULE_DEVICE_TABLE(pci, rt2800pci_device_table);
diff --git a/rt2x00/rt2x00.h b/rt2x00/rt2x00.h
index 6f4026d..2a2a1af 100644
--- a/rt2x00/rt2x00.h
+++ b/rt2x00/rt2x00.h
@@ -36,7 +36,7 @@
 #include <linux/leds.h>
 #include <linux/mutex.h>
 #include <linux/etherdevice.h>
-#include <linux/input-polldev.h>
+// #include <linux/input-polldev.h>
 #include <linux/kfifo.h>
 #include <linux/hrtimer.h>
 #include <linux/version.h>
root@gt-n750jk:/opt/MT7630E/MT7630E#

```

So I've got

```
oot@gt-n750jk:/opt/MT7630E/MT7630E# ./install
make -C /lib/modules/5.13.0-51-generic/build M=/opt/MT7630E/MT7630E/rt2x00 modules
make[1]: вход в каталог «/usr/src/linux-headers-5.13.0-51-generic»
make[1]: выход из каталога «/usr/src/linux-headers-5.13.0-51-generic»
make -C /lib/modules/5.13.0-51-generic/build M=/opt/MT7630E/MT7630E/btloader modules
make[1]: вход в каталог «/usr/src/linux-headers-5.13.0-51-generic»
make[1]: выход из каталога «/usr/src/linux-headers-5.13.0-51-generic»
cp -v firmware/*/* /lib/firmware/
'firmware/BT/mt76x0.bin' -> '/lib/firmware/mt76x0.bin'
'firmware/Wi-FI/MT7650E234.bin' -> '/lib/firmware/MT7650E234.bin'
cp rt2x00/mt7630e.ko /lib/modules/5.13.0-51-generic/kernel/drivers/net/wireless/
cp btloader/mt76xx.ko /lib/modules/5.13.0-51-generic/kernel/drivers/net/wireless/
depmod 5.13.0-51-generic

The driver has been successfully installed.
If you don't have wifi yet, try to reboot.
If bluetooth doesn't work, read the bluetooth
section in README.md file and follow through.
```

Revision history for this message
Ilya w495 Nikitin (w-495) wrote :
To post a comment you must log in.