Bug#941336: nvidia-legacy-340xx-kernel-dkms: Kernel module nvidia-legacy-340xx can't be loaded

Paul Vojta vojta at math.berkeley.edu
Wed May 20 01:48:26 BST 2020


On Fri, Apr 24, 2020 at 09:44:39PM +0200, Andreas Beckmann wrote:
> On 22/01/2020 01.26, Paul Vojta wrote:
> > I noticed similarities with Bug #941427 (relating to non-legacy nvidia drivers),
> > and I found that the procedure in Message 10 in that bug report worked for me.
> 
> That procedure at some point caused the kernel module to be rebuilt in a
> "clean" environment.
> 
> > I suspect it's a problem with some package's "Depends" or "Pre-depends"
> > declarations.
> > 
> > (This solves the problem reported in this bug report, but the machine still
> > has problems with suspend/resume.  That's a problem for another bug report.)
> 
> I'm closing that bug now, since it is unclear how to reproduce the
> broken module build.
> 
> 
> Andreas

Dear Andreas,

Thank you for your recent email.

Attached are my detailed notes on how to reproduce the bug.

Tl;DR:
	Hardware is Apple MacMini4.1, purchased new Sept. 2010,
	  Core 2 Duo 2.4GHz, 2G ram. 

	Boot is via rEFInd.

	Installed nvidia-legacy driver suite via:

	    apt-get -y install dkms xserver-xorg-core libgtk2.0-0

	followed by

	    apt-get -y install xserver-xorg-video-nvidia-legacy-340xx

	Things worked fine upon rebooting after first "apt-get".
	  Upon rebooting after the second one, the bug appeared, with dmesg
	  showing a kernel oops.

The notes were from February 3 (and earlier).  I'd been meaning to send them
earlier, but I've been really busy with other stuff.

Sincerely,


Paul Vojta
-------------- next part --------------
Got bullseye netinst image:

	wget https://cdimage.debian.org/cdimage/bullseye_di_alpha1/amd64/iso-cd/debian-bullseye-DI-alpha1-amd64-netinst.iso

It is dated Nov. 30 2019, and its md5sum is:

	d31305eb576f61b0af43e91a2400ff1f  debian-bullseye-DI-alpha1-amd64-netinst.iso

Burned it to a CD.

1.  Boot for initial install.

  Start up computer.  Hit some (arrow) keys at the rEFInd screen to stop its
  countdown.  Insert CD, and reboot from within rEFInd.
  Then boot from within rEFInd using the CD icon.  (Or, repeatedly hit the `c'
  key immediately after the startup sound to get it to boot the CD directly.)

  Select "Graphical install" [wait about 30 seconds]

  Choose language, location, keyboard, and network (choose wired).

  For some reason it sometimes asks for the firmware file brcm/bcm43xx-0.fw,
  but when I insert removable media containing it, it just repeats the
  request.

  Set up users, clock

  Partitioning:
    First click "Go Back", scroll down, and select "Execute a shell".

	mount -t ext4 /dev/sda5 /mnt
	cd /mnt
	mkdir z3
	mv bin boot dev etc home opt proc root run sbin usr var z3
	rm i* v* l*
	mkdir -p usr/lib
	cp -pr z3/usr/lib/firmware usr/lib
	cd /
	umount /mnt
	exit

    Select "Partition disks"
    Choose "Manual partitioning"

    For the ext4 partition:
      select the partition, click "Continue",
      Select "Use as", click "Continue", choose ext4, click "Continue"...
      Select "Format the partition", click "Continue", choose, "no, keep ...",
	click "Continue"
      Select "Mount point", click "Continue", choose "/", click "Continue"
      Select "Done setting up the partition", click "Continue"

    For the swap partition (this is probably unnecessary):
      Set "Use as" to "Swap area" (same procedure as above)
      Select "Done setting up the partition", click "Continue"

    Scroll down and select "Finish partitioning and write the changes to disk".

    Installation... [about 7 minutes]

    Scan extra installation media:  No

    For mirrors, select "United States", and mirrors.ocf.berkeley.edu
    Proxy:  No

    [about 4 minutes]

    Popularity-contest:  No

    Select software to install:  only ssh server and standard system utilities

    [about 5 minutes]

    Install boot loader to master boot record (of /dev/sda)

    Rebooted.  Chose "Boot from FAT volume" in rEFInd (choosing OS didn't work).

	cp -p /z3/etc/ssh/ssh_host* /etc/ssh
	  [I can ssh to the machine now]
	vi /etc/apt/sources.list
	  [added contrib and non-free to main two entries]
	apt-get update
	ln /z3/var/cache/apt/archives/*.deb /var/cache/apt/archives
	apt-get install tcsh nvi firmware-brcm80211 firmware-misc-nonfree
	chsh -s /usr/bin/tcsh
	chsh -s /usr/bin/tcsh vojta
	vi /etc/default/keyboard
	  [add ctrl:swapcaps to XKBOPTIONS]
	dpkg-reconfigure debconf
	  [Choose readline interface]
	apt-get -y install dkms xserver-xorg-core libgtk2.0-0

    Rebooted.  Chose "Boot vmlinuz-5.4.0-3-amd64" in rEFInd.

	Boot went OK.  I was able to log in (via getty, which was expected).

	apt-get -y install xserver-xorg-video-nvidia-legacy-340xx

    Rebooted, same method

	Screen went black during the reboot sequence.  I was able to log in
	remotely via ssh, and from the console (as a getty login, as before),
	but the latter wasn't very useful since there was no video showing.
	dmesg output showed a kernel (or driver?) oops.

To burn it onto a USB stick:

    Boot the MacOS.
    Insert the USB stick.

    Follow the directions from the web site:

	https://linuxnewbieguide.org/how-to-put-a-linux-iso-onto-a-usb-stick-and-make-it-bootable-on-a-mac/

    It says open up Applications --> Utilities --> Disk Utility
    (it popped that up for me when I inserted the USB drive, which had the
    iso copied to it via dd).

    Select the USB stick and click "erase"

    In a command window now:

	diskutil list

    Locate the USB drive (it's /dev/disk1 in this case), and type:

	diskutil unmountDisk /dev/disk1
	hdiutil convert -format UDRW -o netinst2.img netinst.iso
	sudo dd if=netinst2.img.dmg of=/dev/disk1
	  [up to 14 minutes]
	  [A popup will appear.  Important:  ignore it.]
	diskutil eject /dev/disk1

Booting from the stick:

    To boot from it, reboot and hold down the alt key while it's coming up.

    This only seems to have messed up rEFInd.

Fixing rEFInd:

    I reinstalled refind (booted up MacOS, found install.sh in
    ~/Downloads/refind*, and ran it).

    Now the bug is back.

    However, the bug only occurs if I select "linux-5.4.0-3" from the
    rEFInd screen.  If I boot from the disk's boot sector, then the boot
    process goes to a grub screen and things work.  Note that the grub
    screen is 80x24 (or maybe 80x25), whereas when booting via rEFInd
    the screen has a much higher resolution.


More information about the pkg-nvidia-devel mailing list