Os drivers da Nvidia não funcionam com o kernel principal

7

Eu quero experimentar alguns dos novos recursos do sistema de arquivos btrfs, e para isso eu preciso usar um kernel mais novo do que o incluído no Ubuntu 12.04. Para fazer isso, instalei linux-headers-3.4.0-030400_3.4.0-030400.201205210521_all.deb , linux-headers-3.4.0-030400-generic_3.4.0-030400.201205210521_amd64.deb e linux-image-3.4.0-030400-generic_3.4.0-030400.201205210521_amd64.deb do download do kernel da linha principal aqui .

No entanto, ao reinicializar o kernel 3.4, minha área de trabalho fica presa em uma resolução muito baixa e não consigo aumentá-la ao máximo. Isso aconteceu quando eu instalei pela primeira vez, mas uma instalação simples do pacote nvidia-current fez tudo funcionar perfeitamente com a minha placa GTX570. Apareceram alguns erros de DKMS quando eu instalei o kernel, e eles indicaram que eu deveria olhar para /var/lib/dkms/nvidia-current/295.40/build/make.log :

josh@sirius:~/Downloads$ sudo dpkg -i linux-*.deb
Selecting previously unselected package linux-headers-3.4.0-030400.
(Reading database ... 309400 files and directories currently installed.)
Unpacking linux-headers-3.4.0-030400 (from linux-headers-3.4.0-030400_3.4.0-030400.201205210521_all.deb) ...
Selecting previously unselected package linux-headers-3.4.0-030400-generic.
Unpacking linux-headers-3.4.0-030400-generic (from linux-headers-3.4.0-030400-generic_3.4.0-030400.201205210521_amd64.deb) ...
Selecting previously unselected package linux-image-3.4.0-030400-generic.
Unpacking linux-image-3.4.0-030400-generic (from linux-image-3.4.0-030400-generic_3.4.0-030400.201205210521_amd64.deb) ...
Done.
Setting up linux-headers-3.4.0-030400 (3.4.0-030400.201205210521) ...
Setting up linux-headers-3.4.0-030400-generic (3.4.0-030400.201205210521) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 3.4.0-030400-generic /boot/vmlinuz-3.4.0-030400-generic
ERROR (dkms apport): kernel package linux-headers-3.4.0-030400-generic is not supported
Error! Bad return status for module build on kernel: 3.4.0-030400-generic (x86_64)
Consult /var/lib/dkms/nvidia-current/295.40/build/make.log for more information.
Setting up linux-image-3.4.0-030400-generic (3.4.0-030400.201205210521) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/dkms 3.4.0-030400-generic /boot/vmlinuz-3.4.0-030400-generic
ERROR (dkms apport): kernel package linux-headers-3.4.0-030400-generic is not supported
Error! Bad return status for module build on kernel: 3.4.0-030400-generic (x86_64)
Consult /var/lib/dkms/nvidia-current/295.40/build/make.log for more information.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.4.0-030400-generic /boot/vmlinuz-3.4.0-030400-generic
update-initramfs: Generating /boot/initrd.img-3.4.0-030400-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.4.0-030400-generic /boot/vmlinuz-3.4.0-030400-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.4.0-030400-generic /boot/vmlinuz-3.4.0-030400-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.4.0-030400-generic /boot/vmlinuz-3.4.0-030400-generic
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.4.0-030400-generic
Found initrd image: /boot/initrd.img-3.4.0-030400-generic
Found linux image: /boot/vmlinuz-3.2.0-24-generic
Found initrd image: /boot/initrd.img-3.2.0-24-generic
Found memtest86+ image: /memtest86+.bin
Found Ubuntu 12.04 LTS (12.04) on /dev/sda1
Found Windows 7 (loader) on /dev/sda2
Found Windows 7 (loader) on /dev/sda3
done

/var/lib/dkms/nvidia-current/295.40/build/make.log :

DKMS make.log for nvidia-current-295.40 for kernel 3.4.0-030400-generic (x86_64)
Thu Jun  7 00:58:39 BST 2012
NVIDIA: calling KBUILD...
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (        \
    echo;                               \
    echo "  ERROR: Kernel configuration is invalid.";       \
    echo "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
    echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";  \
    echo;                               \
    /bin/false)
mkdir -p /var/lib/dkms/nvidia-current/295.40/build/.tmp_versions ; rm -f /var/lib/dkms/nvidia-current/295.40/build/.tmp_versions/*
make -f scripts/Makefile.build obj=/var/lib/dkms/nvidia-current/295.40/build
  cc -Wp,-MD,/var/lib/dkms/nvidia-current/295.40/build/.nv.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.6/include -I/usr/src/linux-headers-3.4.0-030400-generic/arch/x86/include -Iarch/x86/include/generated -Iinclude  -include /usr/src/linux-headers-3.4.0-030400-generic/include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m64 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -Wframe-larger-than=1024 -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -pg -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -I/var/lib/dkms/nvidia-current/295.40/build -Wall -MD -Wsign-compare -Wno-cast-qual -Wno-error -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"295.40\" -Wno-unused-function -Wuninitialized -mno-red-zone -mcmodel=kernel -UDEBUG -U_DEBUG -DNDEBUG  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(nv)"  -D"KBUILD_MODNAME=KBUILD_STR(nvidia)" -c -o /var/lib/dkms/nvidia-current/295.40/build/.tmp_nv.o /var/lib/dkms/nvidia-current/295.40/build/nv.c
In file included from include/linux/kernel.h:19:0,
                 from include/linux/sched.h:55,
                 from include/linux/utsname.h:35,
                 from /var/lib/dkms/nvidia-current/295.40/build/nv-linux.h:38,
                 from /var/lib/dkms/nvidia-current/295.40/build/nv.c:13:
include/linux/bitops.h: In function ‘hweight_long’:
include/linux/bitops.h:66:41: warning: signed and unsigned type in conditional expression [-Wsign-compare]
In file included from /usr/src/linux-headers-3.4.0-030400-generic/arch/x86/include/asm/uaccess.h:577:0,
                 from include/linux/poll.h:14,
                 from /var/lib/dkms/nvidia-current/295.40/build/nv-linux.h:97,
                 from /var/lib/dkms/nvidia-current/295.40/build/nv.c:13:
/usr/src/linux-headers-3.4.0-030400-generic/arch/x86/include/asm/uaccess_64.h: In function ‘copy_from_user’:
/usr/src/linux-headers-3.4.0-030400-generic/arch/x86/include/asm/uaccess_64.h:53:6: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
In file included from /var/lib/dkms/nvidia-current/295.40/build/nv.c:13:0:
/var/lib/dkms/nvidia-current/295.40/build/nv-linux.h: At top level:
/var/lib/dkms/nvidia-current/295.40/build/nv-linux.h:114:75: fatal error: asm/system.h: No such file or directory
compilation terminated.
make[3]: *** [/var/lib/dkms/nvidia-current/295.40/build/nv.o] Error 1
make[2]: *** [_module_/var/lib/dkms/nvidia-current/295.40/build] Error 2
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make[1]: *** [module] Error 1
make: *** [module] Error 2
    
por dutchie 07.06.2012 / 09:52

1 resposta

8

(respondendo minha própria pergunta, como Bruno sugeriu nos comentários)

Este problema é resolvido com a instalação manual dos drivers fornecidos pela Nvidia, seguindo os passos abaixo.

  1. Faça o download dos drivers do site da Nvidia
  2. Reinicialize no modo de recuperação, pois os drivers não serão instalados com o X em execução. Faça isso reiniciando, mantendo shift se necessário para entrar no Grub e escolhendo a opção de recuperação, então "Root shell" no menu de texto.
  3. Agora você deve se deparar com um shell parecido com este:

    root@sirius:~# 
    

    Digite o seguinte comando para que o sistema de arquivos raiz seja gravável:

    mount -o rw,remount /
    
  4. Instale alguns pacotes necessários (talvez seja necessário fazer dhclient eth0 para antecipar a rede):

    apt-get install dkms
    
  5. Torne o instalador da Nvidia executável e execute-o:

    chmod +x $INSTALLER_FILE
    ./$INSTALLER_FILE
    

    em que $INSTALLER_FILE é o local onde o instalador é baixado (use o preenchimento de tabulação para ajudá-lo, provavelmente algo como /home/josh/Downloads/NVIDIA-Linux-x86_64-302.17.run )

  6. Trabalhe com as etapas no instalador. Os padrões devem funcionar.

  7. Reinicialize em um sistema normal.
por dutchie 30.06.2012 / 16:48