diff options
Diffstat (limited to 'content/bsd/thinkpad/freebsd-configuring-nvidia-and-xorg-on-thinkpad-x1-extreme-g2.md')
-rw-r--r-- | content/bsd/thinkpad/freebsd-configuring-nvidia-and-xorg-on-thinkpad-x1-extreme-g2.md | 75 |
1 files changed, 40 insertions, 35 deletions
diff --git a/content/bsd/thinkpad/freebsd-configuring-nvidia-and-xorg-on-thinkpad-x1-extreme-g2.md b/content/bsd/thinkpad/freebsd-configuring-nvidia-and-xorg-on-thinkpad-x1-extreme-g2.md index 68254d0..a9e815d 100644 --- a/content/bsd/thinkpad/freebsd-configuring-nvidia-and-xorg-on-thinkpad-x1-extreme-g2.md +++ b/content/bsd/thinkpad/freebsd-configuring-nvidia-and-xorg-on-thinkpad-x1-extreme-g2.md @@ -1,55 +1,61 @@ ---- -title: "FreeBSD: configuring NVIDIA and Xorg on Thinkpad X1 Extreme G2" -category: bsd -abstract: A tutorial for making Nvidia work on FreeBSD -date: 2023-03-04T04:40:17+01:00 -year: 2023 -draft: false -tags: -- FreeBSD -- NVIDIA -- XOrg -- tutorial ---- -First, the bad news: I could not make FreeBSD work with Hybrid Graphics, so I use only the discrete one. To ensure this, open BIOS and - -1. Configuration -2. Display -3. Graphics Device -4. select `Discrete Graphics` ++++ +title = "FreeBSD: configuring Nvidia and Xorg" +author = ["Michał Sapka"] +date = 2023-03-16T23:02:00+01:00 +categories = ["bsd"] +draft = false +weight = 2005 +abstract = "A tutorial on making Nvidia work" +[menu] + [menu.bsd-thinkpad] + weight = 2005 + identifier = "freebsd-configuring-nvidia-and-xorg" + name = "Setting up Nvidia" ++++ + +First, the bad news: I could not make FreeBSD work with Hybrid Graphics, so I use only the discrete one. +To ensure this, open BIOS and: + +1. Configuration +2. Display +3. Graphics Device +4. select \`Discrete Graphics\` Then, log in as root and install the drivers: -``` -# pkg install nvidia-driver nvidia-xconfig +```shell +pkg install nvidia-driver nvidia-xconfig ``` The next step is to enable the drivers. -``` -# sysrc kld_list+=nvidia -# sysrc kld_list+=nvidia-modeset +```shell +sysrc kld_list+=nvidia +sysrc kld_list+=nvidia-modeset ``` -Some people advise adding Linux (`# sysrc kld_list+=linux`) to kld_list, but I got my GPU working without that. +Some people advise adding Linux (`sysrc kld_list+=linux`) to kld_list, but I got my GPU working without that. After that, either load the drivers manually or give the computer an old, good reboot. Login as root again and use the NVIDIA configurator to get Xorg configured. -``` -# nvidia-xconfig +```shell +nvidia-xconfig ``` -Then try starting your desktop environment, windows manager, or startx. You may be done, but I got an error about `Screen not found`. Tell Xorg where the NVIDIA GPU is if you have the same problem. Try probing the system for GPUs +Then try starting your desktop environment, windows manager, or startx. +You may be done, but I got an error about `Screen not found`. +Tell Xorg where the NVIDIA GPU is if you have the same problem. +Try probing the system for GPUs -``` -# pciconf -l | grep vga +```shell +pciconf -l | grep vga ``` You will see one on more elements on the list. The critical part is in the first column, for example: -``` +```shell vgapci0@pci0:1:0:0 ``` @@ -57,11 +63,11 @@ Our GPU is available under BUS 1:0:0 (we skip the first 0). You may need to try > For PCI/AGP cards, the bus−id string has the form PCI:bus:device:function (e.g., “PCI:1:0:0” might be appropriate for an AGP card). > -> [xorg documentation](https://www.x.org/releases/X11R7.7/doc/man/man5/xorg.conf.5.xhtml#heading10) +> [Xorg documentation](https://www.x.org/releases/X11R7.7/doc/man/man5/xorg.conf.5.xhtml#heading10X) Open `/etc/X11/xorg.conf`, look for `Section "Device"` and add: -``` +```shell BusID "PCI:1:0:0" ``` @@ -69,5 +75,4 @@ In my case, everything worked fine after that. Notes: -I learned the BUS trick from [Nude Systems](https://nudesystems.com/how-to-fix-no-screen-found-xorg-error-on-freebsd/) - +I learned the BUS trick from [Nude Systems](https://nudesystems.com/how-to-fix-no-screen-found-xorg-error-on-freebsd/). |