[SOLVED] udev package is broken

Questions about applications and software
Forum rules
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.
alkanshel
Level 1
Level 1
Posts: 46
Joined: Sun Sep 26, 2021 9:26 pm

[SOLVED] udev package is broken

Post by alkanshel »

(note, solution is at the bottom of this post)

Using mint vera 21.1, --fix-broken doesn't resolve an issue I'm seeing with udev

I have been using linux 6 (the oem version) without trouble for a couple months now, but at some point this showed up.

The salient part is "unable to make backup link of './lib/udev/rules.d/70-power-switch.rules' before installing new version: Operation not permitted"

But permissions can not be widened in /lib/udev even when I am root

Code: Select all

$ sudo apt --fix-broken install

The following additional packages will be installed:
  udev
The following packages will be upgraded:
  udev
1 upgraded, 0 newly installed, 0 to remove and 22 not upgraded.
Need to get 0 B/1,557 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 482103 files and directories currently installed.)
Preparing to unpack .../udev_249.11-0ubuntu3.7_amd64.deb ...
Unpacking udev (249.11-0ubuntu3.7) over (249.11-0ubuntu3.6) ...
dpkg: error processing archive /var/cache/apt/archives/udev_249.11-0ubuntu3.7_amd64.deb (--unpack):
 unable to make backup link of './lib/udev/rules.d/70-power-switch.rules' before installing new version: Operation not permitted
Errors were encountered while processing:
 /var/cache/apt/archives/udev_249.11-0ubuntu3.7_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
SOLUTION:
Make sure apt cache does not contain the problem file (surprisingly the apt cache stuck around after using timeshift)
ls -lta /var/cache/apt/archives/udev_249.11-0ubuntu3.7_amd64.deb

Modify the file to make it not immutable
sudo chattr -i -a /lib/udev/rules.d/70-power-switch.rules
Last edited by alkanshel on Thu Mar 23, 2023 1:28 am, edited 2 times in total.
alkanshel
Level 1
Level 1
Posts: 46
Joined: Sun Sep 26, 2021 9:26 pm

Re: udev package is broken

Post by alkanshel »

Slight bump.. does anyone know what this means or what I can do about it? Why is "sudo apt --fix broken install" unable to make this backup link even though sudo is used? The file in question has the same permissions as all else in that directory. I don't think I can safely update anything on this system if something fundamental like udev has problems.
User avatar
SMG
Level 24
Level 24
Posts: 22240
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: udev package is broken

Post by SMG »

alkanshel wrote: Wed Mar 15, 2023 3:59 am Using mint vera 21.1, --fix-broken doesn't resolve an issue I'm seeing with udev

I have been using linux 6 (the oem version) without trouble for a couple months now, but at some point this showed up.
I'm not familiar with others having "udev problems". How did you originally install this package update?

Do you have a Timeshift snapshot of your system when it was working? If so, revert to it.

Please open the System Reports app and click the System Information tab on the left. Your computer's information should come up in the right pane. Then click the Copy button in the lower right and paste the results into a reply window here so we can see how Linux Mint views your hardware.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
alkanshel
Level 1
Level 1
Posts: 46
Joined: Sun Sep 26, 2021 9:26 pm

Re: udev package is broken

Post by alkanshel »

Thank you for looking, this was a package update through the update manager

Code: Select all

System:
  Kernel: 6.0.0-1012-oem x86_64 bits: 64 compiler: N/A Desktop: Cinnamon 5.6.7 tk: GTK 3.24.33
    wm: muffin dm: LightDM Distro: Linux Mint 21.1 Vera base: Ubuntu 22.04 jammy
Machine:
  Type: Desktop System: Alienware product: Alienware Aurora R12 v: 1.1.18
    serial: <superuser required> Chassis: type: 3 serial: <superuser required>
  Mobo: Alienware model: 0P0JWX v: A00 serial: <superuser required> UEFI: Alienware v: 1.1.18
    date: 11/16/2022
Battery:
  Device-1: hidpp_battery_0 model: Logitech Wireless Touch Keyboard K400 Plus serial: <filter>
    charge: 55% (should be ignored) status: Discharging
CPU:
  Info: 6-core model: 11th Gen Intel Core i5-11400F bits: 64 type: MT MCP arch: Rocket Lake rev: 1
    cache: L1: 480 KiB L2: 3 MiB L3: 12 MiB
  Speed (MHz): avg: 1215 high: 2600 min/max: 800/4400 cores: 1: 1100 2: 1078 3: 1101 4: 1096
    5: 2600 6: 1088 7: 1101 8: 1074 9: 1046 10: 1101 11: 1100 12: 1101 bogomips: 62208
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: NVIDIA TU106 [GeForce RTX 2070] vendor: eVga.com. driver: nvidia v: 525.85.05 pcie:
    speed: 2.5 GT/s lanes: 8 ports: active: none off: HDMI-A-1 empty: DP-1, DP-2, DP-3, Unknown-1
    bus-ID: 02:00.0 chip-ID: 10de:1f02
  Display: x11 server: X.Org v: 1.21.1.3 driver: X: loaded: nvidia
    unloaded: fbdev,modesetting,nouveau,vesa gpu: nvidia display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 44
  Monitor-1: HDMI-0 res: 1920x1080 dpi: 45 diag: 1256mm (49.5")
  OpenGL: renderer: NVIDIA GeForce RTX 2070/PCIe/SSE2 v: 4.6.0 NVIDIA 525.85.05
    direct render: Yes
Audio:
  Device-1: Intel vendor: Dell driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:f1c8
  Device-2: NVIDIA TU106 High Definition Audio vendor: eVga.com. driver: snd_hda_intel v: kernel
    pcie: speed: 8 GT/s lanes: 8 bus-ID: 02:00.1 chip-ID: 10de:10f9
  Sound Server-1: ALSA v: k6.0.0-1012-oem running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
  Device-1: Realtek Killer E3000 2.5GbE vendor: Dell driver: r8169 v: kernel pcie: speed: 5 GT/s
    lanes: 1 port: 3000 bus-ID: 05:00.0 chip-ID: 10ec:3000
  IF: enp5s0 state: down mac: <filter>
  Device-2: Intel Wi-Fi 6 AX210/AX211/AX411 160MHz driver: iwlwifi v: kernel pcie: speed: 5 GT/s
    lanes: 1 bus-ID: 06:00.0 chip-ID: 8086:2725
  IF: wlp6s0 state: up mac: <filter>
Bluetooth:
  Device-1: Intel AX210 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 1-14:5 chip-ID: 8087:0032
  Report: hciconfig ID: hci0 rfk-id: 0 state: down bt-service: enabled,running rfk-block:
    hardware: no software: yes address: <filter>
Drives:
  Local Storage: total: 1.14 TiB used: 730.88 GiB (62.5%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: PM9A1 NVMe 256GB size: 238.47 GiB speed: 31.6 Gb/s
    lanes: 4 serial: <filter> temp: 39.9 C
  ID-2: /dev/nvme1n1 vendor: Samsung model: SSD 980 PRO 1TB size: 931.51 GiB speed: 63.2 Gb/s
    lanes: 4 serial: <filter> temp: 24.9 C
Partition:
  ID-1: / size: 125.43 GiB used: 87.97 GiB (70.1%) fs: ext4 dev: /dev/nvme1n1p1
  ID-2: /boot/efi size: 146 MiB used: 89.6 MiB (61.3%) fs: vfat dev: /dev/nvme0n1p1
  ID-3: /home size: 789.84 GiB used: 642.82 GiB (81.4%) fs: ext4 dev: /dev/nvme1n1p2
Swap:
  Alert: No swap data was found.
Sensors:
  System Temperatures: cpu: 27.8 C pch: 32.0 C mobo: N/A gpu: nvidia temp: 38 C
  Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
Repos:
  Packages: 2947 note: see --pkg apt: 2936 flatpak: 11
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/apandada1-xournalpp-stable-focal.list
    1: deb-src http: //ppa.launchpad.net/apandada1/xournalpp-stable/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/brave-browser-release.list
    1: deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https: //brave-browser-apt-release.s3.brave.com/ stable main
  Active apt repos in: /etc/apt/sources.list.d/christian-boxdoerfer-fsearch-stable-jammy.list
    1: deb [arch=amd64 signed-by=/etc/apt/keyrings/christian-boxdoerfer-fsearch-stable-jammy.gpg] https: //ppa.launchpadcontent.net/christian-boxdoerfer/fsearch-stable/ubuntu jammy main
  Active apt repos in: /etc/apt/sources.list.d/fossfreedom-rhythmbox-plugins-jammy.list
    1: deb [arch=amd64 signed-by=/etc/apt/keyrings/fossfreedom-rhythmbox-plugins-jammy.gpg] https: //ppa.launchpadcontent.net/fossfreedom/rhythmbox-plugins/ubuntu jammy main
  No active apt repos in: /etc/apt/sources.list.d/google-earth-pro.list
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
    1: deb https: //mirrors.ocf.berkeley.edu/linuxmint-packages vera main upstream import backport
    2: deb http: //archive.ubuntu.com/ubuntu jammy main restricted universe multiverse
    3: deb http: //archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse
    4: deb http: //archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
    5: deb http: //security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
  No active apt repos in: /etc/apt/sources.list.d/postgresql.list
  Active apt repos in: /etc/apt/sources.list.d/steam.list
    1: deb [arch=amd64,i386] https: //repo.steampowered.com/steam/ stable steam
    2: deb-src [arch=amd64,i386] https: //repo.steampowered.com/steam/ stable steam
Info:
  Processes: 356 Uptime: 10d 4h 12m Memory: 62.48 GiB used: 8.56 GiB (13.7%) Init: systemd v: 249
  runlevel: 5 Compilers: gcc: 11.3.0 alt: 10/11/12/9 Client: Cinnamon v: 5.6.7 inxi: 3.3.13
Last edited by SMG on Sat Mar 18, 2023 7:48 pm, edited 1 time in total.
Reason: Changed quote tags to code tags. Code tags properly format inxi output.
User avatar
SMG
Level 24
Level 24
Posts: 22240
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: udev package is broken

Post by SMG »

alkanshel wrote: Sat Mar 18, 2023 7:42 pm Thank you for looking, this was a package update through the update manager
I guess that means you do not have snapshots.

Have you gone into Synaptic Package Manager and selected Broken (left column) to see if that packages shows and if there are any other problems? You should be able to fix broken using Synaptic (if it is showing as broken).

Nothing in your data jumps out as a potential issue.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
alkanshel
Level 1
Level 1
Posts: 46
Joined: Sun Sep 26, 2021 9:26 pm

Re: udev package is broken

Post by alkanshel »

It seems like udev is the only one with issues. I do have a snapshot, one question relating to that is under the snapshot Restore "Select target device" menu, /home is given as an option. If I want the backup to not modify /home, would I select "Keep on root device" for /home ?
User avatar
SMG
Level 24
Level 24
Posts: 22240
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: udev package is broken

Post by SMG »

alkanshel wrote: Sat Mar 18, 2023 8:18 pm It seems like udev is the only one with issues.
And selecting to Fix Broken there did not work either?
alkanshel wrote: Sat Mar 18, 2023 8:18 pmI do have a snapshot, one question relating to that is under the snapshot Restore "Select target device" menu, /home is given as an option. If I want the backup to not modify /home, would I select "Keep on root device" for /home ?
I have always just used the defaults on the screen that I think you are referencing and my personal files were not changed.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
alkanshel
Level 1
Level 1
Posts: 46
Joined: Sun Sep 26, 2021 9:26 pm

Re: udev package is broken

Post by alkanshel »

Well, I restored to a snapshot from about a month ago when I definitely was not having this problem, and the issue with udev appears again after trying to run updates. So it seems that an update is bringing this about. I'm using kernel 6.0.11 when the update issue occurs, I'll try moving to an earlier version and see if that helps.

E: /tmp/apt-dpkg-install-Hvvo8f/015-udev_249.11-0ubuntu3.7_amd64.deb: unable to make backup link of './lib/udev/rules.d/70-power-switch.rules' before installing new version: Operation not permitted
Last edited by alkanshel on Sun Mar 19, 2023 10:09 pm, edited 1 time in total.
User avatar
SMG
Level 24
Level 24
Posts: 22240
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: udev package is broken

Post by SMG »

alkanshel wrote: Sat Mar 18, 2023 10:00 pm ./lib/udev/rules.d/70-power-switch.rules
Does this file exist on your system? And if so, what is the date on it?
Image
A woman typing on a laptop with LM20.3 Cinnamon.
alkanshel
Level 1
Level 1
Posts: 46
Joined: Sun Sep 26, 2021 9:26 pm

Re: udev package is broken

Post by alkanshel »

Looks like a newer file from within the last half year. The dot at the beginning of the printed path would be a problem if the script isn't being run at the root directory, but I think it is (or it would just be saying file not found)

Code: Select all

ls -la --time-style=+%Y-%m-%d  /lib/udev/rules.d/70-power-switch.rules 
-rw-r--r-- 1 root root 576 2022-12-07 /lib/udev/rules.d/70-power-switch.rules

stat  /lib/udev/rules.d/70-power-switch.rules 
  File: /lib/udev/rules.d/70-power-switch.rules
  Size: 576       	Blocks: 8          IO Block: 4096   regular file
Device: 10308h/66312d	Inode: 3148762     Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2023-03-18 14:04:21.655375338 -0700
Modify: 2022-12-07 00:01:06.700679450 -0800
Change: 2022-12-07 00:01:12.544672987 -0800
 Birth: 2022-12-07 00:01:06.700679450 -0800
User avatar
SMG
Level 24
Level 24
Posts: 22240
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: udev package is broken

Post by SMG »

Trying some detective work to figure out what is happening/may have happened.

From your first post

Code: Select all

Unpacking udev (249.11-0ubuntu3.7) over (249.11-0ubuntu3.6) ..
dpkg: error processing archive /var/cache/apt/archives/udev_249.11-0ubuntu3.7_amd64.deb (--unpack):
 unable to make backup link of './lib/udev/rules.d/70-power-switch.rules' before installing new version: Operation not permitted
Looking at the systemd_249.11-0ubuntu3.7/changelog:
version 3.6 was dated for Fri, 09 Sep 2022
version 3.7 was dated for Thu, 02 Mar 2023
Your file said it was birthed 2022-12-07. Is that when you installed LM21? Or upgraded to LM21?

On 31 Jan 2023 you created a topic [SOLVED] The "grub-pc" package is stuck as broken where you said you were running LM21.1 and "any time I, say, remove an old kernel or install from the update manager, I get errors about grub-pc" and in that listing in the first post I see something similar to what you posted in this topic

Code: Select all

sed: cannot rename /etc/default/sedL8ha6z: Operation not permitted
so it would seem you may have had the underlying issue for a while?

I am running LM20.3, but I ran the same commands you did in your previous posts and other than the birthed being - and the size slightly smaller, my output is pretty much the same. Somehow this seems like it might be a permissions issue to be, but I don't know what given the file permissions are the same and I presume you are able to update the rest of the files.

Maybe someone else reading will have an idea of what is happening.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
alkanshel
Level 1
Level 1
Posts: 46
Joined: Sun Sep 26, 2021 9:26 pm

Re: udev package is broken

Post by alkanshel »

Your file said it was birthed 2022-12-07. Is that when you installed LM21? Or upgraded to LM21?
IIRC I upgraded to Mint Vera (using the mint upgrader tool) a couple weeks later on 2022-12-20 when it was formally released. According to dpkg logs, these are what was installed on 2022-12-07. The only thing that stands out to me is "ubuntu-release-upgrader-core"

Code: Select all

2022-12-07 12:31:28 status half-installed ubuntu-release-upgrader-core:all 1:22.04.14
2022-12-07 12:31:28 status half-installed python3-distupgrade:all 1:22.04.14
2022-12-07 12:31:29 status installed python3-distupgrade:all 1:22.04.15
2022-12-07 12:31:29 status installed ubuntu-release-upgrader-core:all 1:22.04.15
2022-12-07 12:31:29 status installed man-db:amd64 2.10.2-1
2022-12-07 19:47:36 status half-installed brave-browser:amd64 1.46.134
2022-12-07 19:47:42 status installed brave-browser:amd64 1.46.138
2022-12-07 19:47:42 status installed desktop-file-utils:amd64 0.26+mint1+vanessa
2022-12-07 19:47:42 status installed gnome-menus:amd64 3.36.0-1ubuntu3
2022-12-07 19:47:42 status installed man-db:amd64 2.10.2-1
2022-12-07 19:47:42 status installed mailcap:all 3.70+nmu1ubuntu1
I figured the other "operation not permitted" regrading grub-pc was unrelated since it's a different directory
User avatar
SMG
Level 24
Level 24
Posts: 22240
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: udev package is broken

Post by SMG »

alkanshel wrote: Sun Mar 19, 2023 6:29 pmIIRC I upgraded to Mint Vera (using the mint upgrader tool) a couple weeks later on 2022-12-20 when it was formally released.
But when did you install Vanessa?
alkanshel wrote: Sun Mar 19, 2023 6:29 pmAccording to dpkg logs, these are what was installed on 2022-12-07. The only thing that stands out to me is "ubuntu-release-upgrader-core"
Looking at the change log for Package: ubuntu-release-upgrader-core (1:22.04.16) , that doesn't sound like it would be a Linux Mint package. And it is not one installed on my LM20.3 install.
alkanshel wrote: Sun Mar 19, 2023 6:29 pmI figured the other "operation not permitted" regrading grub-pc was unrelated since it's a different directory
It was an update-related problem which is why it caught my attention.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
alkanshel
Level 1
Level 1
Posts: 46
Joined: Sun Sep 26, 2021 9:26 pm

Re: udev package is broken

Post by alkanshel »

But when did you install Vanessa?
My bad I meant vanessa, it was installed on 2022-12-20
User avatar
SMG
Level 24
Level 24
Posts: 22240
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: udev package is broken

Post by SMG »

alkanshel wrote: Sun Mar 19, 2023 8:11 pm
But when did you install Vanessa?
My bad I meant vanessa, it was installed on 2022-12-20
Vera is LM21.1 and was released on 2022-12-20. I just checked the announcement topic.

Vanessa is LM21 and was released 2022-07-31.

In this post from early December you indicate you were using Cinnamon on Ubuntu.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
alkanshel
Level 1
Level 1
Posts: 46
Joined: Sun Sep 26, 2021 9:26 pm

Re: udev package is broken

Post by alkanshel »

I have the names mixed up, I installed that one back when it was released, so must have been around 2022-07-31. I always update Mint itself ASAP when there are new releases

Regarding that other thread with ubuntu + cinnamon, that actually is for a different machine where I'm using straight ubuntu. I didn't mean to say "ubuntu 6.0.11" earlier in this thread also, meant linux. The grub-pc issues were on this Mint machine however, so it definitely could be related like you said.
User avatar
SMG
Level 24
Level 24
Posts: 22240
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: udev package is broken

Post by SMG »

Did you try taking a Timeshift snapshot and then removing it and re-installing the package?

Usually, if there are problem packages we have multiple people experiencing issues. I don't recall seeing anyone have issues with this package so I don't really have any ideas of what might have happened.

You have been able to make others updates, correct? It's not like the cache might be full?
Image
A woman typing on a laptop with LM20.3 Cinnamon.
alkanshel
Level 1
Level 1
Posts: 46
Joined: Sun Sep 26, 2021 9:26 pm

Re: udev package is broken

Post by alkanshel »

So it won't allow me to uninstall the package once it's the broken version.
It looks like my problem is specifically with systemd version 249.11-ubuntu3.7
Both the 5.15 and 6.0.0.12 kernels see the issue if I try to install it.
I can stave off this issue by not updating systemd, which isn't a permanent solution, but maybe a future version of it won't have whatever issue is making my system choke in this newer version.
Edit: I also made extra sure that the apt cache was cleared before trying to update again (surprisingly the timeshift doesn't affect apt cache)
User avatar
SMG
Level 24
Level 24
Posts: 22240
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: udev package is broken

Post by SMG »

alkanshel wrote: Wed Mar 22, 2023 12:17 am So it won't allow me to uninstall the package once it's the broken version.
It looks like my problem is specifically with systemd version 249.11-ubuntu3.7
How did the problem go from being udev to being systemd?
alkanshel wrote: Wed Mar 22, 2023 12:17 amEdit: I also made extra sure that the apt cache was cleared before trying to update again (surprisingly the timeshift doesn't affect apt cache)
Timeshift is a system restore utility. It saves system files. It does not save every directory.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
alkanshel
Level 1
Level 1
Posts: 46
Joined: Sun Sep 26, 2021 9:26 pm

Re: udev package is broken

Post by alkanshel »

The error message says udev but it seems to happen when installing systemd.. so I figured they were the same thing..
Sorry to waste your time.
Post Reply

Return to “Software & Applications”