tbsdtv / linux_media

TBS linux open source drivers
https://github.com/tbsdtv/linux_media/wiki
Other
174 stars 80 forks source link

Nvidia issue & cannot downgrade the kernel #262

Open elkizana opened 2 years ago

elkizana commented 2 years ago

I read the suggestion of downgrading the kernel to a version prior than 5.8 to not having problems with the graphic card driver, but I haven't been successful doing so. I've tried multiple old kernel version but had system won't boot.

My OS : Ubuntu 21.10 My PCI : Skystar 2 express hd (SAA7160)

What should I do ?

crazycat69 commented 2 years ago

resolved in latest media_build (branch extra) use install.sh for compiling/installation

Tested with 5.8, 5.10, 5.11 kernel (with proprietary NVidia GPU driver). Ubuntu 21.10 also must work.

elkizana commented 2 years ago

I executed the script, got "V4L drivers installation done" then reboot but it didn't install the driver. Is there some thing I missed ?

crazycat69 commented 2 years ago

see kernel log - dmesg

elkizana commented 2 years ago

Important: I installed my running kernel from here : https://kernel.ubuntu.com/~kernel-ppa/mainline And I have this warning when running the script : WARNING: You do not have the full kernel sources installed.

crazycat69 commented 2 years ago

look like drivers not installed. you have build log ?

elkizana commented 2 years ago

i@i-MS-7816:~/media_build$ sudo ./install.sh make -C /home/idoom/media_build/v4l stagingconfig make[1]: Entering directory '/home/idoom/media_build/v4l' No version yet, using 5.13.0-20-generic make[2]: Entering directory '/home/idoom/media_build/linux' Applying patches for kernel 5.13.0-20-generic patch -s -f -N -p1 -i ../backports/api_version.patch The text leading up to this was:

|diff --git a/drivers/media/cec/core/cec-api.c b/drivers/media/cec/core/cec-api.c |index b6536bbad530..401ed65c834b 100644 |--- a/drivers/media/cec/core/cec-api.c |+++ b/drivers/media/cec/core/cec-api.c

No file to patch. Skipping patch. 1 out of 1 hunk ignored The text leading up to this was:

|diff --git a/drivers/media/mc/mc-device.c b/drivers/media/mc/mc-device.c |index 3bae24b15eaa..7f7cc64c637c 100644 |--- a/drivers/media/mc/mc-device.c |+++ b/drivers/media/mc/mc-device.c

No file to patch. Skipping patch. 1 out of 1 hunk ignored The text leading up to this was:

|diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c |index 54afc9c7ee6e..4572a87acc0b 100644 |--- a/drivers/media/v4l2-core/v4l2-ioctl.c |+++ b/drivers/media/v4l2-core/v4l2-ioctl.c

No file to patch. Skipping patch. 1 out of 1 hunk ignored make[2]: [Makefile:133: apply_patches] Error 1 make[2]: Leaving directory '/home/idoom/media_build/linux' make[1]: [Makefile:380: stagingconfig] Error 2 make[1]: Leaving directory '/home/idoom/media_build/v4l' make: *** [Makefile:26: stagingconfig] Error 2 sed: can't read v4l/.config: No such file or directory sed: can't read v4l/.config: No such file or directory V4L drivers building... make -C /home/idoom/media_build/v4l make[1]: Entering directory '/home/idoom/media_build/v4l' scripts/make_makefile.pl Updating/Creating .config make[2]: Entering directory '/home/idoom/media_build/linux' make[2]: Entering directory '/home/idoom/media_build/linux' make[3]: Entering directory '/home/idoom/media_build/linux' Unapplying patches make[3]: Entering directory '/home/idoom/media_build/linux' Unapplying patches make[3]: Leaving directory '/home/idoom/media_build/linux' Applying patches for kernel 5.13.0-20-generic make[3]: Leaving directory '/home/idoom/media_build/linux' Applying patches for kernel 5.13.0-20-generic patch -s -f -N -p1 -i ../backports/api_version.patch patch -s -f -N -p1 -i ../backports/api_version.patch The text leading up to this was:

|diff --git a/drivers/media/cec/core/cec-api.c b/drivers/media/cec/core/cec-api.c |index b6536bbad530..401ed65c834b 100644 |--- a/drivers/media/cec/core/cec-api.c |+++ b/drivers/media/cec/core/cec-api.c

No file to patch. Skipping patch. 1 out of 1 hunk ignored The text leading up to this was:

|diff --git a/drivers/media/mc/mc-device.c b/drivers/media/mc/mc-device.c |index 3bae24b15eaa..7f7cc64c637c 100644 |--- a/drivers/media/mc/mc-device.c |+++ b/drivers/media/mc/mc-device.c

No file to patch. Skipping patch. 1 out of 1 hunk ignored The text leading up to this was:

|diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c |index 54afc9c7ee6e..4572a87acc0b 100644 The text leading up to this was: |--- a/drivers/media/v4l2-core/v4l2-ioctl.c

|+++ b/drivers/media/v4l2-core/v4l2-ioctl.c

|diff --git a/drivers/media/cec/core/cec-api.c b/drivers/media/cec/core/cec-api.c No file to patch. Skipping patch. |index b6536bbad530..401ed65c834b 100644 |--- a/drivers/media/cec/core/cec-api.c |+++ b/drivers/media/cec/core/cec-api.c

No file to patch. Skipping patch. 1 out of 1 hunk ignored1 out of 1 hunk ignored

The text leading up to this was:

|diff --git a/drivers/media/mc/mc-device.c b/drivers/media/mc/mc-device.c |index 3bae24b15eaa..7f7cc64c637c 100644 |--- a/drivers/media/mc/mc-device.c |+++ b/drivers/media/mc/mc-device.c

No file to patch. Skipping patch. 1 out of 1 hunk ignored The text leading up to this was:

|diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c |index 54afc9c7ee6e..4572a87acc0b 100644 |--- a/drivers/media/v4l2-core/v4l2-ioctl.c |+++ b/drivers/media/v4l2-core/v4l2-ioctl.c

No file to patch. Skipping patch. make[2]: [Makefile:133: apply_patches] Error 1 make[2]: Leaving directory '/home/idoom/media_build/linux' 1 out of 1 hunk ignored make[2]: [Makefile:133: apply_patches] Error 1 make[2]: Leaving directory '/home/idoom/media_build/linux' Preparing to compile for kernel version 5.13.0

WARNING: You do not have the full kernel sources installed. This does not prevent you from building the v4l-dvb tree if you have the kernel headers, but the full kernel source may be required in order to use make menuconfig / xconfig / qconfig.

If you are experiencing problems building the v4l-dvb tree, please try building against a vanilla kernel before reporting a bug.

Vanilla kernels are available at http://kernel.org. On most distros, this will compile a newly downloaded kernel:

cp /boot/config-uname -r /.config cd make all modules_install install

Please see your distro's web site for instructions to build a new kernel.

WARNING: This is the V4L/DVB backport tree, with experimental drivers backported to run on legacy kernels from the development tree at: http://git.linuxtv.org/media-tree.git. It is generally safe to use it for testing a new driver or feature, but its usage on production environments is risky. Don't use it in production. You've been warned. File not found: ../linux/drivers/media/Kconfig at ./scripts/make_kconfig.pl line 302. Updating/Creating .config make[2]: Entering directory '/home/idoom/media_build/linux' make[3]: Entering directory '/home/idoom/media_build/linux' Unapplying patches make[3]: Leaving directory '/home/idoom/media_build/linux' Applying patches for kernel 5.13.0-20-generic patch -s -f -N -p1 -i ../backports/api_version.patch The text leading up to this was:

|diff --git a/drivers/media/cec/core/cec-api.c b/drivers/media/cec/core/cec-api.c |index b6536bbad530..401ed65c834b 100644 |--- a/drivers/media/cec/core/cec-api.c |+++ b/drivers/media/cec/core/cec-api.c

No file to patch. Skipping patch. 1 out of 1 hunk ignored The text leading up to this was:

|diff --git a/drivers/media/mc/mc-device.c b/drivers/media/mc/mc-device.c |index 3bae24b15eaa..7f7cc64c637c 100644 |--- a/drivers/media/mc/mc-device.c |+++ b/drivers/media/mc/mc-device.c

No file to patch. Skipping patch. 1 out of 1 hunk ignored The text leading up to this was:

|diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c |index 54afc9c7ee6e..4572a87acc0b 100644 |--- a/drivers/media/v4l2-core/v4l2-ioctl.c |+++ b/drivers/media/v4l2-core/v4l2-ioctl.c

No file to patch. Skipping patch. 1 out of 1 hunk ignored make[2]: *** [Makefile:133: apply_patches] Error 1 make[2]: Leaving directory '/home/idoom/media_build/linux' Preparing to compile for kernel version 5.13.0

WARNING: You do not have the full kernel sources installed. This does not prevent you from building the v4l-dvb tree if you have the kernel headers, but the full kernel source may be required in order to use make menuconfig / xconfig / qconfig.

If you are experiencing problems building the v4l-dvb tree, please try building against a vanilla kernel before reporting a bug.

Vanilla kernels are available at http://kernel.org. On most distros, this will compile a newly downloaded kernel:

cp /boot/config-uname -r /.config cd make all modules_install install

Please see your distro's web site for instructions to build a new kernel.

WARNING: This is the V4L/DVB backport tree, with experimental drivers backported to run on legacy kernels from the development tree at: http://git.linuxtv.org/media-tree.git. It is generally safe to use it for testing a new driver or feature, but its usage on production environments is risky. Don't use it in production. You've been warned. File not found: ../linux/drivers/media/Kconfig at ./scripts/make_kconfig.pl line 302. No kernel files. You need to run "make download untar" or "make dir DIR=" first! exit 1 make[1]: [Makefile:6: def] Error 1 make[1]: Leaving directory '/home/idoom/media_build/v4l' make: [Makefile:26: all] Error 2 V4L drivers installing... make -C /home/idoom/media_build/v4l install make[1]: Entering directory '/home/idoom/media_build/v4l'

Hmm... distro kernel with a non-standard place for module backports detected. Please always prefer to use vanilla upstream kernel with V4L/DVB I'll try to remove old/obsolete LUM files from /lib/modules/5.13.0-20-generic//updates/dkms:

Hmm... distro kernel with a non-standard place for module backports detected. Please always prefer to use vanilla upstream kernel with V4L/DVB I'll try to remove old/obsolete LUM files from /lib/modules/5.13.0-20-generic//updates/dkms: Installing kernel modules under /lib/modules/5.13.0-20-generic/updates/extra/media/: /sbin/depmod -a 5.13.0-20-generic make -C firmware install make[2]: Entering directory '/home/idoom/media_build/v4l/firmware' Installing firmwares at /lib/firmware: make[2]: Leaving directory '/home/idoom/media_build/v4l/firmware' make[1]: Leaving directory '/home/idoom/media_build/v4l' V4L drivers installation done You need to reboot...

crazycat69 commented 2 years ago

you can provide remote access for me ?

elkizana commented 2 years ago

I cannot

elkizana commented 2 years ago

I managed to make the driver work by these steps :

git clone -b extra https://github.com/tbsdtv/media_build
git clone --depth=1 https://github.com/tbsdtv/linux_media.git -b latest ./media
cd media_build
make dir DIR=../media
./install 

But still, it prevented the Nvidia driver to work properly. Is there a way to make the nvidia driver work properly again, without installing a new kernel ?

crazycat69 commented 2 years ago

first restore kernel module packages (first time you owerwrite media modules)

dorinilut commented 2 years ago

I basically have the same issue. the driver installs but then you loose for example /dev/dri, and that means no more intel gpu. crazycal69, would you be so kind as to provide what would be the proper sequence of commands to restore those kernel module packages? I tried various combinations and always ending up in a f**ked up kernel :(. Your expertise would be more than welcomed.

elkizana commented 2 years ago

@dorinilut I solved my problem. https://github.com/tbsdtv/media_build/issues/36

dorinilut commented 2 years ago

@dorinilut I solved my problem. https://github.com/tbsdtv/media_build/issues/36#issuecomment-952772243

Can I please ask for some details? The link you posted is not pointing to anything. For me also the driver compiles, but whenever that happens the /dev/dri folder gets removed. and for the love of god i have not managed to find a way to recover it.

elkizana commented 2 years ago

@dorinilut link corrected. But it wasn't related to /dev/dri, my issue was related to the gpu driver.