Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nvidia issue & cannot downgrade the kernel #262

Open
elkizana opened this issue Oct 21, 2021 · 14 comments
Open

Nvidia issue & cannot downgrade the kernel #262

elkizana opened this issue Oct 21, 2021 · 14 comments

Comments

@elkizana
Copy link

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
Copy link

crazycat69 commented Oct 21, 2021

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
Copy link
Author

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
Copy link

see kernel log - dmesg

@elkizana
Copy link
Author

elkizana commented Oct 22, 2021

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
Copy link

look like drivers not installed.
you have build log ?

@elkizana
Copy link
Author

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=<your_git_source_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
Copy link

you can provide remote access for me ?

@elkizana
Copy link
Author

I cannot

@elkizana
Copy link
Author

elkizana commented Oct 23, 2021

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
Copy link

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

@dorinilut
Copy link

dorinilut commented Oct 28, 2021

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
Copy link
Author

elkizana commented Oct 28, 2021

@dorinilut I solved my problem. tbsdtv/media_build#36

@dorinilut
Copy link

@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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants