NVIDIA: Difference between revisions
imported>Nicbk Wrong spelling |
imported>Legendofmiracles Adds another way to get the PCI of the graphics card when doing optimus. |
||
| Line 71: | Line 71: | ||
''Note: Bus ID is important and needs to be formatted properly'' | ''Note: Bus ID is important and needs to be formatted properly'' | ||
The Nvidia driver expects the bus ID to be in decimal format; | The Nvidia driver expects the bus ID to be in decimal format; | ||
There are two ways you can get the bus IDs, one is with <nowiki>lspci</nowiki>, which shows the bus IDs in hexadecimal format and the other with <nowiki>lshw</nowiki>, which shows it in decimal format, as wanted by nixos. | |||
===== lspci ===== | |||
You can convert the value by: | You can convert the value by: | ||
| Line 88: | Line 91: | ||
<code>PCI:9:31:0</code> | <code>PCI:9:31:0</code> | ||
===== lshw ===== | |||
If you don't have <nowiki>lshw</nowiki> installed, you can get it temporarily in a ephemeral shell by running: | |||
<code>nix-shell -p lshw --run "lshw -c display</code> | |||
The two bus ID's will be in the corresponding "bus info" field. | |||
For example: | |||
<code> | |||
bus info: pci@0000:01:00.0 | |||
</code> | |||
and | |||
<code> | |||
bus info: pci@0000:00:02.0 | |||
</code> | |||
Now you have to take everything after the first colon, and replace the <code>.</code> with another colon. | |||
<code> | |||
01:00:0 | |||
</code> | |||
and | |||
<code> | |||
00:02:0 | |||
</code> | |||
A possible configuration: | A possible configuration: | ||