I have Ubuntu 20.04 LTS. Few days back, I installed software update/upgrade as recommended by Ubuntu. Which gave me some warning to install some package but completed. So I didn't notice which package this warning was about. Now I'm having following issues that I don't know how to resolve;

  1. Hybernet issue: When I lid down, laptop goes to hybernet issue. But Doesn't come back to normal mode. So I need to either hold power button to shutdown or need to do proper shutdown every day.

  2. I can't see brightness adjustment slider anymore.

  3. It doesn't display for dual display when I connect my monitor.

  4. When I start my laptop it stuck with following message on the screen

    /dev/nvme0n1p4: Clearing orphaned inode 4860675 (uid=...
    /dev/nvme0n1p4: clean, 232285/7001424 files, 5575039/27951104 blocks

Now I restart my laptop in Ubuntu recovery mode and then resume, it starts normally. I need to do this everytime.

These are the changes I have noticed. I'm not sure if there are more issues.


After reading this, I feel the problem is related to the graphics card. Even the other problem I'm facing seems related to graphics card only. So I tried following

$ sudo ubuntu-drivers autoinstall

But this couldn't complete

$ sudo ubuntu-drivers autoinstall
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  amd64-microcode duplicity evince-common gstreamer1.0-gtk3 intel-microcode iucode-tool libbabeltrace1 libdazzle-1.0-0 libdjvulibre-text libdjvulibre21 libestr0 libfastjson4 libglu1-mesa libkpathsea6
  librsync2 libspectre1 libsynctex2 linux-headers-5.4.0-58 linux-hwe-5.8-headers-5.8.0-36 linux-image-generic-hwe-20.04 python3-bcrypt python3-fasteners python3-future python3-gpg python3-lockfile
  python3-louis python3-monotonic python3-netifaces python3-paramiko python3-pyatspi python3-speechd x11-apps x11-session-utils xbitmaps xinit
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libnvidia-cfg1-460 libnvidia-common-460 libnvidia-compute-460 libnvidia-decode-460 libnvidia-encode-460 libnvidia-extra-460 libnvidia-fbc1-460 libnvidia-gl-460 libnvidia-ifr1-460 libxnvctrl0
  linux-modules-nvidia-460-5.8.0-36-generic nvidia-compute-utils-460 nvidia-kernel-common-460 nvidia-kernel-source-460 nvidia-prime nvidia-settings nvidia-utils-460 screen-resolution-extra
Recommended packages:
  libnvidia-compute-460:i386 libnvidia-decode-460:i386 libnvidia-encode-460:i386 libnvidia-ifr1-460:i386 libnvidia-fbc1-460:i386 libnvidia-gl-460:i386
The following packages will be REMOVED:
  bind9-dnsutils command-not-found deja-dup eog evince gdb gdbserver gnome-calendar google-chrome-stable libc6-dbg libevdocument3-4 libevview3-3 libnetplan0 libreoffice-gnome libreoffice-gtk3
  libreoffice-math linux-generic-hwe-20.04 linux-headers-5.4.0-58-generic linux-headers-5.8.0-36-generic linux-headers-generic-hwe-20.04 linux-modules-nvidia-440-generic-hwe-20.04
  linux-modules-nvidia-450-generic-hwe-20.04 mesa-vulkan-drivers nautilus-dropbox netplan.io nvidia-kernel-common-450 orca python3-brlapi python3-commandnotfound python3-gdbm rsyslog simple-scan snapd
  spice-vdagent strace sudo thermald ubuntu-desktop ubuntu-desktop-minimal ubuntu-minimal ubuntu-standard vino wps-office xbrlapi xorg xvfb
The following NEW packages will be installed:
  libnvidia-cfg1-460 libnvidia-common-460 libnvidia-compute-460 libnvidia-decode-460 libnvidia-encode-460 libnvidia-extra-460 libnvidia-fbc1-460 libnvidia-gl-460 libnvidia-ifr1-460 libxnvctrl0
  linux-modules-nvidia-460-5.8.0-36-generic linux-modules-nvidia-460-generic-hwe-20.04-edge nvidia-compute-utils-460 nvidia-driver-460 nvidia-kernel-common-460 nvidia-kernel-source-460 nvidia-prime
  nvidia-settings nvidia-utils-460 screen-resolution-extra xserver-xorg-video-nvidia-460
0 upgraded, 21 newly installed, 46 to remove and 0 not upgraded.
Need to get 156 MB of archives.
After this operation, 1,263 MB disk space will be freed.
Get:1 http://in.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 libnvidia-cfg1-460 amd64 460.32.03-0ubuntu0.20.04.1 [77.2 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 libnvidia-common-460 all 460.32.03-0ubuntu0.20.04.1 [9,168 B]
Get:3 http://in.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 libnvidia-compute-460 amd64 460.32.03-0ubuntu0.20.04.1 [21.8 MB]
Get:4 http://in.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 libnvidia-decode-460 amd64 460.32.03-0ubuntu0.20.04.1 [1,300 kB]                                                                 
Get:5 http://in.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 libnvidia-encode-460 amd64 460.32.03-0ubuntu0.20.04.1 [39.6 kB]                                                                  
Get:6 http://in.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 libnvidia-extra-460 amd64 460.32.03-0ubuntu0.20.04.1 [39.7 kB]                                                                   
Get:7 http://in.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 libnvidia-fbc1-460 amd64 460.32.03-0ubuntu0.20.04.1 [45.4 kB]                                                                    
Get:8 http://in.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 libnvidia-gl-460 amd64 460.32.03-0ubuntu0.20.04.1 [80.6 MB]                                                                      
Get:9 http://in.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 libnvidia-ifr1-460 amd64 460.32.03-0ubuntu0.20.04.1 [67.6 kB]                                                                    
Get:10 http://in.archive.ubuntu.com/ubuntu focal/main amd64 libxnvctrl0 amd64 440.64-0ubuntu1 [11.2 kB]                                                                                                   
Get:11 http://in.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 linux-modules-nvidia-460-5.8.0-36-generic amd64 5.8.0-36.40~20.04.1 [24.1 MB]                                                   
Get:12 http://in.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 nvidia-kernel-common-460 amd64 460.32.03-0ubuntu0.20.04.1 [19.1 kB]                                                             
Get:13 http://in.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 linux-modules-nvidia-460-generic-hwe-20.04-edge amd64 5.8.0-36.40~20.04.1 [5,508 B]                                             
Get:14 http://in.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 nvidia-compute-utils-460 amd64 460.32.03-0ubuntu0.20.04.1 [105 kB]                                                              
Get:15 http://in.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 nvidia-kernel-source-460 amd64 460.32.03-0ubuntu0.20.04.1 [24.5 MB]                                                             
Get:16 http://in.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 nvidia-utils-460 amd64 460.32.03-0ubuntu0.20.04.1 [362 kB]                                                                      
Get:17 http://in.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 xserver-xorg-video-nvidia-460 amd64 460.32.03-0ubuntu0.20.04.1 [1,557 kB]                                                       
Get:18 http://in.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 nvidia-driver-460 amd64 460.32.03-0ubuntu0.20.04.1 [431 kB]                                                                     
Get:19 http://in.archive.ubuntu.com/ubuntu focal/main amd64 nvidia-prime all 0.8.14 [9,164 B]                                                                                                             
Get:20 http://in.archive.ubuntu.com/ubuntu focal/main amd64 screen-resolution-extra all 0.18build1 [4,456 B]                                                                                              
Get:21 http://in.archive.ubuntu.com/ubuntu focal/main amd64 nvidia-settings amd64 440.64-0ubuntu1 [963 kB]                                                                                                
Fetched 156 MB in 3min 1s (864 kB/s)                                                                                                                                                                      
Preconfiguring packages ...
(Reading database ... 210058 files and directories currently installed.)
Removing ubuntu-standard (1.450.2) ...
Removing bind9-dnsutils (1:9.16.1-0ubuntu2.4) ...
Removing command-not-found (20.04.4) ...
Removing deja-dup (40.7-0ubuntu1) ...
Removing eog (3.36.3-0ubuntu1) ...
Removing evince (3.36.7-0ubuntu1) ...
Removing gdb (9.2-0ubuntu1~20.04) ...
Removing gdbserver (9.2-0ubuntu1~20.04) ...
Removing gnome-calendar (3.36.2-0ubuntu1) ...
Removing google-chrome-stable (87.0.4280.141-1) ...
update-alternatives: using /usr/bin/firefox to provide /usr/bin/x-www-browser (x-www-browser) in auto mode
update-alternatives: using /usr/bin/firefox to provide /usr/bin/gnome-www-browser (gnome-www-browser) in auto mode
Removing libc6-dbg:amd64 (2.31-0ubuntu9.1) ...
Removing libevview3-3:amd64 (3.36.7-0ubuntu1) ...
Removing libevdocument3-4:amd64 (3.36.7-0ubuntu1) ...
Removing ubuntu-minimal (1.450.2) ...
Removing netplan.io (0.100-0ubuntu4~20.04.3) ...
dpkg: warning: while removing netplan.io, directory '/etc/netplan' not empty so not removed
Removing libnetplan0:amd64 (0.100-0ubuntu4~20.04.3) ...
Removing libreoffice-gnome (1:6.4.6-0ubuntu0.20.04.1) ...
Removing libreoffice-gtk3 (1:6.4.6-0ubuntu0.20.04.1) ...
Removing libreoffice-math (1:6.4.6-0ubuntu0.20.04.1) ...
Removing linux-generic-hwe-20.04 ( ...
Removing linux-headers-5.4.0-58-generic (5.4.0-58.64) ...
Removing linux-headers-generic-hwe-20.04 ( ...
Removing linux-headers-5.8.0-36-generic (5.8.0-36.40~20.04.1) ...
Removing linux-modules-nvidia-440-generic-hwe-20.04 (5.8.0-36.40~20.04.1) ...
Removing linux-modules-nvidia-450-generic-hwe-20.04 (5.8.0-36.40~20.04.1) ...
Removing mesa-vulkan-drivers:amd64 (20.2.6-0ubuntu0.20.04.1) ...
Removing nautilus-dropbox (2019.02.14-1ubuntu1) ...
Dropbox isn't running!
Removing nvidia-kernel-common-450 (450.102.04-0ubuntu0.20.04.1) ...
update-initramfs: deferring update (trigger activated)
Removing orca (3.36.2-1ubuntu1~20.04.1) ...
Removing python3-brlapi:amd64 (6.0+dfsg-4ubuntu6) ...
Removing python3-commandnotfound (20.04.4) ...
Removing python3-gdbm:amd64 (3.8.5-1~20.04.1) ...
Removing rsyslog (8.2001.0-1ubuntu1.1) ...
/usr/sbin/policy-rc.d returned 101, not running 'stop dmesg.service rsyslog.service'
invoke-rc.d: policy-rc.d denied execution of stop.
Removing simple-scan (3.36.3-0ubuntu0.20.04.0) ...
Removing snapd (2.48+20.04) ...
Stopping snap.anbox.container-manager.service
Stopping unit snap.anbox.container-manager.service
Waiting until unit snap.anbox.container-manager.service is stopped [attempt 1]
snap.anbox.container-manager.service is stopped.
Stopping snap.canonical-livepatch.canonical-livepatchd.service
Stopping unit snap.canonical-livepatch.canonical-livepatchd.service
Waiting until unit snap.canonical-livepatch.canonical-livepatchd.service is stopped [attempt 1]
snap.canonical-livepatch.canonical-livepatchd.service is stopped.
Stopping snap.deluge-lukewh.deluge-web-service.service
Stopping unit snap.deluge-lukewh.deluge-web-service.service
Waiting until unit snap.deluge-lukewh.deluge-web-service.service is stopped [attempt 1]
snap.deluge-lukewh.deluge-web-service.service is stopped.
Stopping snap.deluge-lukewh.deluged-service.service
Stopping unit snap.deluge-lukewh.deluged-service.service
Waiting until unit snap.deluge-lukewh.deluged-service.service is stopped [attempt 1]
snap.deluge-lukewh.deluged-service.service is stopped.
/usr/sbin/policy-rc.d returned 101, not running 'stop snapd.apparmor.service snapd.autoimport.service snapd.core-fixup.service snapd.failure.service snapd.recovery-chooser-trigger.service snapd.seeded.service snapd.service snapd.snap-repair.service snapd.snap-repair.timer snapd.socket snapd.system-shutdown.service'
Removing ubuntu-desktop (1.450.2) ...
Removing ubuntu-desktop-minimal (1.450.2) ...
Removing spice-vdagent (0.19.0-2ubuntu0.2) ...
/usr/sbin/policy-rc.d returned 101, not running 'stop spice-vdagentd.service spice-vdagentd.socket'
invoke-rc.d: policy-rc.d denied execution of stop.
Removing strace (5.5-3ubuntu1) ...
Removing sudo (1.8.31-1ubuntu1.1) ...
You have asked that the sudo package be removed,
but no root password has been set.
Without sudo, you may not be able to gain administrative privileges.

If you would prefer to access the root account with su(1)
or by logging in directly,
you must set a root password with "sudo passwd".

If you have arranged other means to access the root account,
and you are sure this is what you want,
you may bypass this check by setting an environment variable 
(export SUDO_FORCE_REMOVE=yes).

Refusing to remove sudo.
dpkg: error processing package sudo (--remove):
 installed sudo package pre-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

Update 2: After I run above command using root user. All 4 problems got solved. However, new problems arose;

  1. sudo got removed. So I installed it again.
  2. I was not able to run any application. Eg firefox. So I reinstalled it and it is working fine. But now I'll have to install all the software. Is their any easy way?
  • "some warning" is too vague to offer advice upon. Review your /var/log/apt/history.log and /var/log/apt/term.log to see the old apt output. If it's really related to your current problem, add the complete output of that apt session to the question. – user535733 Jan 12 at 5:19

As I detected the problem with graphics card I ran following command to solve the issue;

$ sudo ubuntu-drivers autoinstall

It removed the sudo command and I was not able to run installed software too. So I reinstalled snapd and executed following 3 commands.

$ systemctl unmask snapd.service
$ systemctl enable snapd.service
$ systemctl start snapd.service

After restarting laptop, everything was working as expected. I had to reinstall a few applications. But they picked their configuration from their temp directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.