LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-12-2021, 11:03 PM   #1
TheJooomes
Member
 
Registered: May 2019
Posts: 191

Rep: Reputation: Disabled
Apt is broken and I can't figure out how to fix it


I'm using Pop!_OS 20.10 AMD/Intel version

apt upgrade and --fix-broken

Trying to upgrade as you see will tell me there's unmet dependencies and to try --fix-broken, trying that results in dpkg returning an error code (1).

I've tried deleting the mentioned packages in /var/cache/apt/archives/ and doing all that apt clean and dpkg --configure -a stuff that every search result tells me to do. Nothing works.

I'm no expert, but it looks like the xanmod kernel and some firmware packages are having a fight. I've got no idea how to fix it though.
I installed xanmod quite a long time ago and I know apt has been working fine up until now.
 
Old 03-13-2021, 07:22 AM   #2
TorC
Member
 
Registered: Dec 2020
Location: as far S and E as I want to go in the U.S.
Distribution: Fossapup64
Posts: 224

Rep: Reputation: 78
First of all, which kernel is in usage?
Code:
uname -a
Second, are the commands issued as root? or is sudo being used? Do you know the difference?

Your pastebin shows
Code:
 firmware-linux : Depends: firmware-linux-free but it is not installed
 firmware-linux-nonfree : Depends: firmware-misc-nonfree (= 20210208-2) but it is not installed
                          Depends: firmware-amd-graphics (= 20210208-2) but it is not installed
and command(s) issued are incorrect (remember that linux assumes user knows exactly what he is doing)

Tell us what kernel is used and we'll go from there.
But if the kernel is not the problem, install the dependencies first beginning with
Code:
apt update && apt install firmware-linux free
What happens?

Last edited by TorC; 03-13-2021 at 07:25 AM.
 
Old 03-13-2021, 07:23 AM   #3
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Conflicting packages are
linux-firmware and firmware-linux-free
linux-firmware and firmware-misc-nonfree
linux-firmware and firmware-amd-graphics

linux-firmware is the standard Ubuntu package. This commit tells me that it's also part of Pop!_OS. OTOH, firmware-* packages probably come from Debian.

Try this
Code:
sudo apt purge firmware-linux

Last edited by shruggy; 03-13-2021 at 08:04 AM.
 
Old 03-13-2021, 11:53 AM   #4
TheJooomes
Member
 
Registered: May 2019
Posts: 191

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TorC View Post
First of all, which kernel is in usage?
Code:
uname -a
Second, are the commands issued as root? or is sudo being used? Do you know the difference?
Linux pop-os 5.10.21-xanmod1 #0~git20210307.35fa437 SMP PREEMPT Sun Mar 7 15:26:50 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Quote:
Your pastebin shows
Code:
 firmware-linux : Depends: firmware-linux-free but it is not installed
 firmware-linux-nonfree : Depends: firmware-misc-nonfree (= 20210208-2) but it is not installed
                          Depends: firmware-amd-graphics (= 20210208-2) but it is not installed
and command(s) issued are incorrect (remember that linux assumes user knows exactly what he is doing)

Tell us what kernel is used and we'll go from there.
But if the kernel is not the problem, install the dependencies first beginning with
Code:
apt update && apt install firmware-linux free
What happens?
I assume you mean firemware-linux-free?

https://pastebin.com/ceF2yENJ

And there's that --fix-broken suggestion again. It's always either --fix-broken or that dpkg error code (1), no matter what I do.
 
Old 03-13-2021, 11:57 AM   #5
TheJooomes
Member
 
Registered: May 2019
Posts: 191

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by shruggy View Post
Conflicting packages are
linux-firmware and firmware-linux-free
linux-firmware and firmware-misc-nonfree
linux-firmware and firmware-amd-graphics

linux-firmware is the standard Ubuntu package. This commit tells me that it's also part of Pop!_OS. OTOH, firmware-* packages probably come from Debian.

Try this
Code:
sudo apt purge firmware-linux
Code:
james@pop-os:~$ sudo apt purge firmware-linux
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 firmware-linux-nonfree : Depends: firmware-misc-nonfree (= 20210208-2) but it is not going to be installed
                          Depends: firmware-amd-graphics (= 20210208-2) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
james@pop-os:~$
Again the --fix-broken suggestion.
 
Old 03-13-2021, 12:42 PM   #6
TorC
Member
 
Registered: Dec 2020
Location: as far S and E as I want to go in the U.S.
Distribution: Fossapup64
Posts: 224

Rep: Reputation: 78
Do what @shruggy said. (Not in the mood, today) I'll let him take it from there.
 
Old 03-13-2021, 01:09 PM   #7
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Ok, let's try this:
Code:
sudo dpkg --force-depends -r firmware-linux{,-free,-nonfree}
 
Old 03-13-2021, 01:25 PM   #8
TheJooomes
Member
 
Registered: May 2019
Posts: 191

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by shruggy View Post
Ok, let's try this:
Code:
sudo dpkg --force-depends -r firmware-linux{,-free,-nonfree}
https://pastebin.com/sLr0zQzm

No red text appeared for that command. But trying apt upgrade produces a ton of "Possible missing firmware" messages and it ends with a dpkg error code (1).

I noticed all the old kernel versions that it wanted to remove and I had got a message that /boot was full. Using autoremove halved the size of /boot and apt began working as normal again. Thank you for the help!

Last edited by TheJooomes; 03-13-2021 at 01:35 PM.
 
Old 03-13-2021, 01:50 PM   #9
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
The update-initramfs warnings were about amdgpu firmware. What is your graphics card?
Code:
lspci -knn|grep -A2 VGA
Looks like firmware-amd-graphics still may be needed by the XanMod kernel if you're using the amdgpu driver.
 
Old 03-13-2021, 01:55 PM   #10
TheJooomes
Member
 
Registered: May 2019
Posts: 191

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by shruggy View Post
The update-initramfs warnings were about amdgpu firmware. What is your graphics card?
Code:
lspci -knn|grep -A2 VGA
Looks like firmware-amd-graphics still may be needed by the XanMod kernel if you're using the amdgpu driver.
It's an RX 560 4gb. I don't know if I should touch anything firmware related because it's working fine for now.
Code:
james@pop-os:~$ lspci -knn|grep -A2 VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller [8086:0412] (rev 06)
	DeviceName:  Onboard IGD
	Subsystem: Dell Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller [1028:05a4]
--
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Baffin [Radeon RX 550 640SP / RX 560/560X] [1002:67ff] (rev cf)
	Subsystem: Gigabyte Technology Co., Ltd Baffin [Radeon RX 550 640SP / RX 560/560X] [1458:230a]
	Kernel driver in use: amdgpu
james@pop-os:~$
 
Old 03-13-2021, 02:11 PM   #11
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Well, RX 560 is a renewed Polaris 11. Polaris 11 firmware wasn't reported as missing. I guess it's provided by the package linux-firmware. Check it with
Code:
dpkg -S /lib/firmware/amdgpu/polaris11_*.bin
 
Old 03-13-2021, 02:15 PM   #12
TheJooomes
Member
 
Registered: May 2019
Posts: 191

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by shruggy View Post
Well, RX 560 is a renewed Polaris 11. Polaris 11 firmware wasn't reported as missing. I guess it's provided by the package linux-firmware. Check it with
Code:
dpkg -S /lib/firmware/amdgpu/polaris11_*.bin
Well, there seems to be a lot there...

Code:
james@pop-os:~$ dpkg -S /lib/firmware/amdgpu/polaris11_*.bin
linux-firmware: /lib/firmware/amdgpu/polaris11_ce_2.bin
linux-firmware: /lib/firmware/amdgpu/polaris11_ce.bin
linux-firmware: /lib/firmware/amdgpu/polaris11_k2_smc.bin
linux-firmware: /lib/firmware/amdgpu/polaris11_k_mc.bin
linux-firmware: /lib/firmware/amdgpu/polaris11_k_smc.bin
linux-firmware: /lib/firmware/amdgpu/polaris11_mc.bin
linux-firmware: /lib/firmware/amdgpu/polaris11_me_2.bin
linux-firmware: /lib/firmware/amdgpu/polaris11_me.bin
linux-firmware: /lib/firmware/amdgpu/polaris11_mec2_2.bin
linux-firmware: /lib/firmware/amdgpu/polaris11_mec_2.bin
linux-firmware: /lib/firmware/amdgpu/polaris11_mec2.bin
linux-firmware: /lib/firmware/amdgpu/polaris11_mec.bin
linux-firmware: /lib/firmware/amdgpu/polaris11_pfp_2.bin
linux-firmware: /lib/firmware/amdgpu/polaris11_pfp.bin
linux-firmware: /lib/firmware/amdgpu/polaris11_rlc.bin
linux-firmware: /lib/firmware/amdgpu/polaris11_sdma1.bin
linux-firmware: /lib/firmware/amdgpu/polaris11_sdma.bin
linux-firmware: /lib/firmware/amdgpu/polaris11_smc.bin
linux-firmware: /lib/firmware/amdgpu/polaris11_smc_sk.bin
linux-firmware: /lib/firmware/amdgpu/polaris11_uvd.bin
linux-firmware: /lib/firmware/amdgpu/polaris11_vce.bin
james@pop-os:~$
 
Old 03-13-2021, 02:17 PM   #13
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Then I guess you're safe.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
python/wicd is broken in Slackware 14.0 on my system, and I can't figure out why. darkstarbyte Slackware 16 12-25-2015 04:38 PM
[SOLVED] I completely screwed my system up and can't figure out how to fix it... OriginalCrazyone Linux - Newbie 7 11-16-2012 03:10 AM
Can't figure out how to fix "Invalid mix of operators and operands" error in assembly steviebob Programming 25 07-10-2010 01:22 PM
FC6 update problems - can't figure out how to fix lucktsm Fedora 6 05-25-2007 12:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration