I verified this by using ubuntu-drivers in a chroot on a system with nvidia but "runtimepm" isn't supported on my system so I had to change the check for it from "if packages[p].get('runtimepm'):" to "if True:". After doing that I received the original Traceback:
...
File "/usr/bin/ubuntu-drivers", line 161, in command_install
pm_fd = open('/run/nvidia_runtimepm_supported', 'w')
PermissionError: [Errno 13] Permission denied: '/run/nvidia_runtimepm_supported'
Now for the verification:
Preparing to unpack .../ubuntu-drivers-common_1%3a0.8.6.4~0.20.04.1_amd64.deb ...
Unpacking ubuntu-drivers-common (1:0.8.6.4~0.20.04.1) over (1:0.8.6.3~0.20.04.2) ...
Setting up ubuntu-drivers-common (1:0.8.6.4~0.20.04.1) ...
(focal-amd64)root@impulse:~# vi /usr/bin/ubuntu-drivers
(focal-amd64)root@impulse:~# sudo -i -u ubuntu
(focal-amd64)ubuntu@impulse:~$ ubuntu-drivers install
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
I verified this by using ubuntu-drivers in a chroot on a system with nvidia but "runtimepm" isn't supported on my system so I had to change the check for it from "if packages[ p].get( 'runtimepm' ):" to "if True:". After doing that I received the original Traceback:
... ubuntu- drivers" , line 161, in command_install run/nvidia_ runtimepm_ supported' , 'w') runtimepm_ supported'
File "/usr/bin/
pm_fd = open('/
PermissionError: [Errno 13] Permission denied: '/run/nvidia_
Now for the verification:
Preparing to unpack .../ubuntu- drivers- common_ 1%3a0.8. 6.4~0.20. 04.1_amd64. deb ... drivers- common (1:0.8. 6.4~0.20. 04.1) over (1:0.8. 6.3~0.20. 04.2) ... drivers- common (1:0.8. 6.4~0.20. 04.1) ... amd64)root@ impulse: ~# vi /usr/bin/ ubuntu- drivers amd64)root@ impulse: ~# sudo -i -u ubuntu amd64)ubuntu@ impulse: ~$ ubuntu-drivers install dpkg/lock- frontend - open (13: Permission denied) dpkg/lock- frontend) , are you root?
Unpacking ubuntu-
Setting up ubuntu-
(focal-
(focal-
(focal-
E: Could not open lock file /var/lib/
E: Unable to acquire the dpkg frontend lock (/var/lib/