#StackBounty: #boot #grub2 #nvidia #kernel #backup Restore specific kernel & modules (nvidia drivers)

Bounty: 150

Background: I’ve been running Ubuntu for years (started at 16.04, now at 20.04), and been constantly fighting with NVIDA drivers which I need as I use CUDA. As recently as yesterday, my NVIDIA 460 drivers were working fine, and an apt upgrade broke them again: Ubuntu 20.4 update broke my Nvidia 460 driver config


What I want to achieve:

  • Create a restore point of a kernel and its modules (eg nvidia drivers) I’m happy with
  • Whenever NVIDIA drivers break (or something else breaks badly), restore it

What I already have:

  • GRUB which seems to allow choosing specific kernels to boot from

(screenshots for illustration, not reflecting latest version)
enter image description here
enter image description here


Questions:

  • Restore point containing kernel+modules: is it possible to create (if so how), or am I simply misunderstanding how kernels & modules are managed on linux (ie a kernel wouldn’t include the nvidia drivers) ?

  • Restoring from grub: It seems /etc/grub.d/40_custom is the file I want to modify as it’s designed specifically for custom menu entries. Do you confirm this is the intended way of booting custom kernels or should I be looking at another file?

/etc/grub.d/40_custom:

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.


Get this bounty!!!

#StackBounty: #server #20.04 #kernel #raspberrypi #20.10 How do I build Ubuntu 20.10 kernel and modules for Raspberry PI (aarch64)?

Bounty: 50

What I’m looking for is up to date instructions on how to install and build the Ubuntu 20.10 5.8.0-1015-raspi kernel and module?. Please note I don not want to compile the Raspberry PI OS kernel or modules.

Or if thats not possible to cross compile it from whatever environment it can be built on?

I’m attempted to build the Ubuntu 20.10 kernel and modules for aarch64 using instructions I’ve found using web searches (https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel). The reason being is there are modules missing from the ubuntu build that are in the generic ARM64 build that I would like to use in the RASPI distribution.

Its been a number of decades since I built a kernel and thus far I’ve not managed to successfully compile one..

root@ys:/usr/src/linux-source-5.8.0/linux-raspi-5.8.0# make
  CALL    scripts/checksyscalls.sh
  CALL    scripts/atomic/check-atomics.sh
  CHK     include/generated/compile.h
  CC [M]  drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.o
In file included from ./include/media/v4l2-subdev.h:15,
                 from ./include/media/v4l2-device.h:13,
                 from drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c:20:
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c: In function ‘buffer_cb’:
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c:333:35: error: ‘struct mmal_buffer’ has no member named ‘length’
  333 |    __func__, status, buf, mmal_buf->length, mmal_buf->mmal_flags,
              


Get this bounty!!!

#StackBounty: #kernel #keyboard #xorg #xserver #dead-keys Keyboard buffer issue with multi-byte characters (latin, diacritics) / dead k…

Bounty: 50

I write in Spanish and sometimes I use diacritics (ie multi-byte chars) with dead keys, for example "liberación" ("liberation" in Spanish). Usually I don’t have any problem, but when the GUI freeze or for any reason it can’t handle more input, when the text shows up the diacritic char jump to the first position on the/a keyboard buffer, displaying something like "óliberacin", which is very annoying since occur very often while chatting or writing an email (easier to test: aaaááaaa). Maybe a xserver or GNOME Shell or a kernel bug?

I have this problem since more than four years now, with several kernels, Ubuntu versions, hardware and versions of Firfeox and Chorme. I couldn’t find any pattern neither something strange on dmesg/journalctl//var/log files…

Setup: This happened to me since Ubuntu 16.04 LTS fresh install, kernel 4.4.0-62-generic; and even recently with 18.04 and 4.15.0-134-generic, GNOME Shell 3.28.4.

$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=es_AR.UTF-8
[...]
$ im-config -l
ibus xim
$ im-config -m
default
missing
ibus 

ibus
$ env | grep "XMODIFIERS|IM_"
XMODIFIERS=@im=ibus
CLUTTER_IM_MODULE=xim
QT_IM_MODULE=ibus
IM_CONFIG_PHASE=1
QT4_IM_MODULE=xim
GTK_IM_MODULE=ibus

How can I debug to find where the problem might be?

Update 2021-01-23

I didn’t cross with this issue for a while, until today, typing from Desktop to Android (GSconnect→KDE Connect Keyboard).

screenshot


Get this bounty!!!

#StackBounty: #kernel #accounts CPU time accounting: report cumulative total CPU time

Bounty: 50

There are about 15 users on a computation server running jobs via SSH, Jupyter, or the web version of RStudio. Every user has a standard Linux user account, each process is owned by the user also if it is executed via Jupyter or RStudio.

I would like to do some see an overview of who is using a lot of resources. This could be I/O, RAM, or CPU time over a longer period of time. E.g. how many CPU hours dead each user need last year or this month?

The kernel support process accounting. The command sa -m is almost doing what I want. But I can’t find documentation on which users are included in this list and how to include all users.

  • How can I control which users are listed?
  • How long is the data stored?
  • Is there a graphical tool like Munin which does support process accounting?
  • Is there something similar for I/O and RAM usage?

See also:


Get this bounty!!!

#StackBounty: #drivers #kernel #graphics #amd-graphics #mesa Graphics slow rendered on AMD 6800

Bounty: 50

I’ve bought the new AMD 6800 GPU and Ryzen 5 5600X CPU and experimented some issues with video in Ubuntu 20.04 running on 5.9.0 Linux kernel.

When I tried to install amd official drivers it crashed. I’m not sure if it’s because of the Kernel version (manually updated/installed) or another thing. After crash, when I rebooted the system, all the Desktop and GUIs renders very slow, layer by layer, row by row.

Debugging (switching between kernel versions doesn’t work) I’ve seen removing gfxmode $linux_gfx_mode on grub edit makes it work fine.

Can somebody explain me the reason of it and how may I solve it?

Thanks


Get this bounty!!!

#StackBounty: #boot #kernel #uefi #recovery-mode Boot can't detect root partition

Bounty: 50

System:

  • Ryzen 5, no integrated graphics
  • B450 Tomahawk Max motherboard
  • ADATA SX8100 512 GB SSD
  • Nvidia GeForce 1660 main gpu
  • Dual boot Ubuntu 20.04 and windows 10
  • UEFI firmware
  • No overclocking or other tweaks

I have had occasional problems in the past where the system would enter a kernel panic on boot, complaining first that initramfs decoding failed followed by being unable to mount root. The recovery mode option for the same kernel version would also panic, although with far more messages displayed.

I would usually deal with this by selecting an older kernel, which would boot fine, and then run boot-repair. I would then be good for a random number of boots until it all started over again.

I was never able find the cause and just dealt with the occasional inconvenience.

However, now none of my kernels boot. All i can do is boot from a live USB. I updated the GRUB config from inside a chroot, so now my windows menu option is also gone.

The recovery mode messages ask me to specify my root partition with the "root=" boot option, and then says "here are the available partitions" followed by a kernel panic message. It seems that it is not detecting any partitions at all. This seems confirmed by the message that it can’t "mount root fs on unknown-block(0,0)", indicating it can’t identify what block device to use.

I’ve checked that the root UUID shown in the boot messages matches the UUID of my actual boot partition. I have not made any partition table modifications recently.

I’ve tried removing and re-seating the SSD.

How do i troubleshoot this? How do i get the kernel to detect my SSD?

Screenshots:

normal boot error messages
recovery mode boot messages

EDIT: Per comments, I found the SMART status of the SSD. Here is the output of sudo smartctl.

EDIT: RE: Motherboard BIOS version. I updated my BIOS both soon after building my PC to version 7C02v36 (dated 04/24/2020) and before asking this question to version 7C02v39 (dated 11/30/2020). It had no effect. The next most recent BIOS listed is dated 12/10/2020, but it is a beta version so I’m uncertain if trying it is a good idea.

EDIT: FWIW, my ubuntu boot partition is 30 GB, and has 3GB free.
enter image description here

EDIT: grub can see my boot partition, as shown in this screenshot. Immediately after snapping this picture, i typed "normal" to return to the GRUB menu. Booted with "debug" messages enabled, and it complained that it couldn’t mount that exact partition. enter image description here


Get this bounty!!!

#StackBounty: #kernel #video #webcam #20.10 Integrated Webcam gets detected but not working on Ubuntu 20.10

Bounty: 50

So after the update to Ubuntu 20.10 from 18.04.2 LTS, My webcam stopped working. When I try cheese or uvcvideo it opens for a few times with flickering and goes blank. Now, this issues goes way back to 2011 and keeps popping up intermittently with kernel updates. I went through all the suggestions and questions marked solved pertaining to this issue but notwithstanding the solution to my problem. opening the similar question here is last hail mary attempt to address my problem. Please advice.

dmesg | grep uvc

[ 2997.130632] uvcvideo: Failed to resubmit video URB (-19).
[ 2997.134635] uvcvideo: Failed to resubmit video URB (-19).
[ 2997.138636] uvcvideo: Failed to resubmit video URB (-19).
[ 2997.142634] uvcvideo: Failed to resubmit video URB (-19).
[ 2997.146635] uvcvideo: Failed to resubmit video URB (-19).```


Get this bounty!!!

#StackBounty: #boot #kernel #uefi #recovery-mode Boot can't detect root partition

Bounty: 50

System:

  • Ryzen 5, no integrated graphics
  • B450 Tomahawk Max motherboard
  • ADATA SX8100 512 GB SSD
  • Nvidia GeForce 1660 main gpu
  • Dual boot Ubuntu 20.04 and windows 10
  • UEFI firmware
  • No overclocking or other tweaks

I have had occasional problems in the past where the system would enter a kernel panic on boot, complaining first that initramfs decoding failed followed by being unable to mount root. The recovery mode option for the same kernel version would also panic, although with far more messages displayed.

I would usually deal with this by selecting an older kernel, which would boot fine, and then run boot-repair. I would then be good for a random number of boots until it all started over again.

I was never able find the cause and just dealt with the occasional inconvenience.

However, now none of my kernels boot. All i can do is boot from a live USB. I updated the GRUB config from inside a chroot, so now my windows menu option is also gone.

The recovery mode messages ask me to specify my root partition with the "root=" boot option, and then says "here are the available partitions" followed by a kernel panic message. It seems that it is not detecting any partitions at all. This seems confirmed by the message that it can’t "mount root fs on unknown-block(0,0)", indicating it can’t identify what block device to use.

I’ve checked that the root UUID shown in the boot messages matches the UUID of my actual boot partition. I have not made any partition table modifications recently.

I’ve tried removing and re-seating the SSD.

How do i troubleshoot this? How do i get the kernel to detect my SSD?

Screenshots:

normal boot error messages
recovery mode boot messages

EDIT: Per comments, I found the SMART status of the SSD. Here is the output of sudo smartctl.

EDIT: RE: Motherboard BIOS version. I updated my BIOS both soon after building my PC to version 7C02v36 (dated 04/24/2020) and before asking this question to version 7C02v39 (dated 11/30/2020). It had no effect. The next most recent BIOS listed is dated 12/10/2020, but it is a beta version so I’m uncertain if trying it is a good idea.

EDIT: FWIW, my ubuntu boot partition is 30 GB, and has 3GB free.
enter image description here

EDIT: grub can see my boot partition, as shown in this screenshot. Immediately after snapping this picture, i typed "normal" to return to the GRUB menu. Booted with "debug" messages enabled, and it complained that it couldn’t mount that exact partition. enter image description here


Get this bounty!!!

#StackBounty: #boot #kernel #uefi #recovery-mode Boot can't detect root partition

Bounty: 50

System:

  • Ryzen 5, no integrated graphics
  • B450 Tomahawk Max motherboard
  • ADATA SX8100 512 GB SSD
  • Nvidia GeForce 1660 main gpu
  • Dual boot Ubuntu 20.04 and windows 10
  • UEFI firmware
  • No overclocking or other tweaks

I have had occasional problems in the past where the system would enter a kernel panic on boot, complaining first that initramfs decoding failed followed by being unable to mount root. The recovery mode option for the same kernel version would also panic, although with far more messages displayed.

I would usually deal with this by selecting an older kernel, which would boot fine, and then run boot-repair. I would then be good for a random number of boots until it all started over again.

I was never able find the cause and just dealt with the occasional inconvenience.

However, now none of my kernels boot. All i can do is boot from a live USB. I updated the GRUB config from inside a chroot, so now my windows menu option is also gone.

The recovery mode messages ask me to specify my root partition with the "root=" boot option, and then says "here are the available partitions" followed by a kernel panic message. It seems that it is not detecting any partitions at all. This seems confirmed by the message that it can’t "mount root fs on unknown-block(0,0)", indicating it can’t identify what block device to use.

I’ve checked that the root UUID shown in the boot messages matches the UUID of my actual boot partition. I have not made any partition table modifications recently.

I’ve tried removing and re-seating the SSD.

How do i troubleshoot this? How do i get the kernel to detect my SSD?

Screenshots:

normal boot error messages
recovery mode boot messages

EDIT: Per comments, I found the SMART status of the SSD. Here is the output of sudo smartctl.

EDIT: RE: Motherboard BIOS version. I updated my BIOS both soon after building my PC to version 7C02v36 (dated 04/24/2020) and before asking this question to version 7C02v39 (dated 11/30/2020). It had no effect. The next most recent BIOS listed is dated 12/10/2020, but it is a beta version so I’m uncertain if trying it is a good idea.

EDIT: FWIW, my ubuntu boot partition is 30 GB, and has 3GB free.
enter image description here

EDIT: grub can see my boot partition, as shown in this screenshot. Immediately after snapping this picture, i typed "normal" to return to the GRUB menu. Booted with "debug" messages enabled, and it complained that it couldn’t mount that exact partition. enter image description here


Get this bounty!!!

#StackBounty: #boot #kernel #uefi #recovery-mode Boot can't detect root partition

Bounty: 50

System:

  • Ryzen 5, no integrated graphics
  • B450 Tomahawk Max motherboard
  • ADATA SX8100 512 GB SSD
  • Nvidia GeForce 1660 main gpu
  • Dual boot Ubuntu 20.04 and windows 10
  • UEFI firmware
  • No overclocking or other tweaks

I have had occasional problems in the past where the system would enter a kernel panic on boot, complaining first that initramfs decoding failed followed by being unable to mount root. The recovery mode option for the same kernel version would also panic, although with far more messages displayed.

I would usually deal with this by selecting an older kernel, which would boot fine, and then run boot-repair. I would then be good for a random number of boots until it all started over again.

I was never able find the cause and just dealt with the occasional inconvenience.

However, now none of my kernels boot. All i can do is boot from a live USB. I updated the GRUB config from inside a chroot, so now my windows menu option is also gone.

The recovery mode messages ask me to specify my root partition with the "root=" boot option, and then says "here are the available partitions" followed by a kernel panic message. It seems that it is not detecting any partitions at all. This seems confirmed by the message that it can’t "mount root fs on unknown-block(0,0)", indicating it can’t identify what block device to use.

I’ve checked that the root UUID shown in the boot messages matches the UUID of my actual boot partition. I have not made any partition table modifications recently.

I’ve tried removing and re-seating the SSD.

How do i troubleshoot this? How do i get the kernel to detect my SSD?

Screenshots:

normal boot error messages
recovery mode boot messages

EDIT: Per comments, I found the SMART status of the SSD. Here is the output of sudo smartctl.

EDIT: RE: Motherboard BIOS version. I updated my BIOS both soon after building my PC to version 7C02v36 (dated 04/24/2020) and before asking this question to version 7C02v39 (dated 11/30/2020). It had no effect. The next most recent BIOS listed is dated 12/10/2020, but it is a beta version so I’m uncertain if trying it is a good idea.


Get this bounty!!!