Disable a specific PCI device in GRUB

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
YoungPizza
Level 1
Level 1
Posts: 8
Joined: Mon Mar 09, 2020 5:27 pm

Disable a specific PCI device in GRUB

Post by YoungPizza »

Hello guys,
I need some help. :(
My laptop has Ryzen 5 2500u with Vega 8 graphics card with a dedicated gpu RX560x.
My dedicated gpu is momentarily dead and i can use just the integrated one (i made some test on Windows and the integrated one has no problem, and yes I have a Dual Boot).
The problem is in Linux Mint, cause the kernel module name of the integrated and dedicated gpu is both "amdgpu".
Now for pass the boot in Linux Mint without errors, I must put in grub or "nomodeset" or "modprobe.blacklist=amdgpu".
The point is that I want to use only my integreted gpu and not disable both with these instructions.
Can I put in /ect/default/grub an instruction that disable the SPECIFIC PCI ID device? And not blacklist the kernel module name cause both gpu has the same "name". Just the PCI ID is different.
With lspci the integrated is 04:00.0 and the dedicated is 01:00.0.
I need just an instruction that disable the pci 01:00.0 before the system boots.
Thanks in advice guys!
YoungPizza
Level 1
Level 1
Posts: 8
Joined: Mon Mar 09, 2020 5:27 pm

Re: Disable a specific PCI device in GRUB

Post by YoungPizza »

Bump :|
Hubo38
Level 1
Level 1
Posts: 1
Joined: Fri Mar 13, 2020 3:50 am

Re: Disable a specific PCI device in GRUB

Post by Hubo38 »

Have a look at setpci
YoungPizza
Level 1
Level 1
Posts: 8
Joined: Mon Mar 09, 2020 5:27 pm

Re: Disable a specific PCI device in GRUB

Post by YoungPizza »

Hello,

setpci
setpci: No operation specified.
Try `setpci --help' for more information.

davide@davide-Nitro:~$ setpci --help
Usage: setpci [<options>] (<device>+ <reg>[=<values>]*)*

General options:
-f Don't complain if there's nothing to do
-v Be verbose
-D List changes, don't commit them
--dumpregs Dump all known register names and exit

PCI access options:
-A <method> Use the specified PCI access method (see `-A help' for a list)
-O <par>=<val> Set PCI access parameter (see `-O help' for a list)
-G Enable PCI access debugging
-H <mode> Use direct hardware access (<mode> = 1 or 2)

Setting commands:
<device>: -s [[[<domain>]:][<bus>]:][<slot>][.[<func>]]
-d [<vendor>]:[<device>]
<reg>: <base>[+<offset>][.(B|W|L)]
<base>: <address>
<named-register>
[E]CAP_<capability-name>
[E]CAP<capability-number>
<values>: <value>[,<value>...]
<value>: <hex>
<hex>:<mask>
YoungPizza
Level 1
Level 1
Posts: 8
Joined: Mon Mar 09, 2020 5:27 pm

Re: Disable a specific PCI device in GRUB

Post by YoungPizza »

ReBump. :?
User avatar
powerwagon75
Level 4
Level 4
Posts: 277
Joined: Sun Feb 28, 2016 4:05 pm
Location: USA

Re: Disable a specific PCI device in GRUB

Post by powerwagon75 »

You could try going to your BIOS Setup at power-on, and find the graphics settings, and toggle it to Integrated only, if the option is available. If this is a possibility, try it, and once the PC is repaired, return it to its original value.

If you’re not sure how to get in to BIOS, read your screen display quickly at the power-on, typically during the OEM branding splash screen; in one of the corners in small print it should tell you what Function key you need to press to get into Setup. (You may have to power-on again to catch it with the F-key, once you know which F-key, as they don’t usually give you much time to make a decision. Right after power on, press F-key repetitively until the screen (should) say “Entering Setup”.).

If your BIOS display is the classic blue/white/gray setup, be sure to carefully read the box that shows you the navigation keys (usually the arrow keys, and enter key to select an item), so you don’t inadvertently change something along the way accidentally. Once you’re confident you’ve changed the setting you want, be sure to save changes before exiting.
Image
Custom tower w/Mint 18
HP laptop w/Mint 18
Acer w/W10/Mint 18.3
Macbook w/El Capitan/Mint 18.3
Optiplex 960 "Frankenbox" w/Fedora 30/Mint 18.3/Mint 19.2
Acer C720 Chromebook w/GalliumOS
Mac PPC G4 w/Lubuntu
YoungPizza
Level 1
Level 1
Posts: 8
Joined: Mon Mar 09, 2020 5:27 pm

Re: Disable a specific PCI device in GRUB

Post by YoungPizza »

My BIOS hasn't the option to switch graphics or turn off the dedicated one. My BIOS is awful. Thats why im searching for something via software.
However thanks for the reply.
User avatar
Kadaitcha Man
Level 9
Level 9
Posts: 2588
Joined: Mon Aug 27, 2012 10:17 pm

Re: Disable a specific PCI device in GRUB

Post by Kadaitcha Man »

YoungPizza wrote:
Fri Mar 13, 2020 5:12 pm
setpci
I have no idea why you posted that or what point you were trying to make. That said, the generally accepted ways of getting the information you need for a command are to use a search engine and/or man <command>, as in man setpci.
It's pronounced kad-eye-cha, not kada-itcha.
YoungPizza
Level 1
Level 1
Posts: 8
Joined: Mon Mar 09, 2020 5:27 pm

Re: Disable a specific PCI device in GRUB

Post by YoungPizza »

You are my search engine. I posted that for make that user understanding that the "setpci" alone does nothing. So please could you tell me which command I have to write in terminal for helping you and me?
Thanks for the reply!
User avatar
Kadaitcha Man
Level 9
Level 9
Posts: 2588
Joined: Mon Aug 27, 2012 10:17 pm

Re: Disable a specific PCI device in GRUB

Post by Kadaitcha Man »

YoungPizza wrote:
Sat Mar 14, 2020 6:28 pm
You are my search engine.
Wrong guess, and welcome to my ignore list.
It's pronounced kad-eye-cha, not kada-itcha.
YoungPizza
Level 1
Level 1
Posts: 8
Joined: Mon Mar 09, 2020 5:27 pm

Re: Disable a specific PCI device in GRUB

Post by YoungPizza »

Touchy :shock:
fabien85
Level 7
Level 7
Posts: 1765
Joined: Tue Mar 11, 2014 4:30 pm

Re: Disable a specific PCI device in GRUB

Post by fabien85 »

Well yeah, that message of yours was wrong.
People here are volunteers, no one is going to spoon-feed you.

Here is a reference showing the use of setpci in GRUB to enable VGA output on a PCI device : https://askubuntu.com/questions/264247/ ... 573#613573
That's basically the opposite of what you want to do, which means you should be able to do your stuff with a similar approach with modifications.
Which modifications ? That's where you need to do your own research, find the memory addresses, the bits to enable or disable etc. Web and man are your ressources of choice.
Good luck.
YoungPizza
Level 1
Level 1
Posts: 8
Joined: Mon Mar 09, 2020 5:27 pm

Re: Disable a specific PCI device in GRUB

Post by YoungPizza »

Thanks for the reply.
I tried this befor posting the topic on forum.
My notebook, after follow that guide, stucks on ACER logo and does not go in "booting mode". So i had to force shutdown with power off button.
Post Reply

Return to “Installation & Boot”