{
  "$type": "site.standard.document",
  "content": {
    "$type": "pub.leaflet.content",
    "pages": [
      {
        "$type": "pub.leaflet.pages.linearDocument",
        "blocks": [
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": "Despite my expectations, Fedora didn't run very well on my laptop with a NVIDIA GPU out of the box. Use these steps to fix issues with your monitor or display and battery life – I'll update the blog post should I make further optimisations."
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.header",
              "level": 2,
              "plaintext": "Installing propietary graphics drivers"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": "By default, Fedora comes with the Nouveau drivers which causes all sorts of issues – for me the battery life was < 1 hour and my external monitor didn't work with it."
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "facets": [
                {
                  "features": [
                    {
                      "$type": "pub.leaflet.richtext.facet#link",
                      "uri": "https://rpmfusion.org/Howto/NVIDIA#Installing_the_drivers"
                    }
                  ],
                  "index": {
                    "byteEnd": 47,
                    "byteStart": 0
                  }
                }
              ],
              "plaintext": "RPM Fusion has documented the installation well. If you're running a modern laptop you should only need to run this command – note that you should have enabled propietary repositories during installation for this to work."
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.code",
              "language": "shellsession",
              "plaintext": "sudo dnf update \nsudo dnf install akmod-nvidia"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": "This made my external display work and brought battery life up to 4 hours, but we can still do better..."
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.header",
              "level": 2,
              "plaintext": "Manually switching between integrated and dedicated GPU with envycontrol"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": "On windows, your graphics run in hybrid mode, where windows will decide wether to run a task on the dedicated (NVIDIA) GPU or the integrated GPU (that ships with your CPU). On Linux this also happens, but unfortunately doesn't work well in my experience."
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "facets": [
                {
                  "features": [
                    {
                      "$type": "pub.leaflet.richtext.facet#link",
                      "uri": "https://github.com/bayasdev/envycontrol"
                    }
                  ],
                  "index": {
                    "byteEnd": 245,
                    "byteStart": 234
                  }
                }
              ],
              "plaintext": "Unless you do graphics intensive tasks on the go, I recommend manually switching to integrated graphics by default and only switching to your NVIDIA GPU when connected to power/at home as the dedicated GPU consumes a lot more energy. Envycontrol is a useful tool that let's you do just that – note that the downside is that switching takes about 30 seconds and requires a reboot."
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "facets": [
                {
                  "features": [
                    {
                      "$type": "pub.leaflet.richtext.facet#link",
                      "uri": "https://github.com/bayasdev/envycontrol"
                    }
                  ],
                  "index": {
                    "byteEnd": 16,
                    "byteStart": 4
                  }
                }
              ],
              "plaintext": "The installation is straightforward and only requires you to activate their repository:"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.code",
              "language": "shellsession",
              "plaintext": "sudo dnf copr enable sunwire/envycontrol\nsudo dnf install python3-envycontrol"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": "After it is installed switch between the GPUs like this:"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.code",
              "language": "shellsession",
              "plaintext": "sudo envycontrol -s integrated # switch to integrated\nsudo envycontrol -s nvidia # switch to nvidia"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": "Don't forget to reboot after switching."
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": "This got me up to 8 or 9 hours of battery life and a power draw of only 6W when doing office work (LibreOffice, Xournal++ and Firefox open)"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.header",
              "level": 2,
              "plaintext": "Monitor your power usage with powertop"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": "Fedora unfortunately doesn't really show you detailed information about your power usage, but powertop is easily installed and shows you your current wattage, which component is responsible (CPU/GPU) and which processes are responsible allowing you to monitor your battery much more effectively. You can install it by running it:"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.code",
              "language": "shellsession",
              "plaintext": "powertop"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": "Fedora will prompt you to install it, should it not already be installed."
            }
          }
        ],
        "id": "019e6e8a-fb6f-7220-8c5e-e085afb26ba0"
      }
    ]
  },
  "description": "Steps to fix display and battery issues everyone with an NVIDIA laptop should take",
  "path": "/3mmvzgkbpp22s",
  "publishedAt": "2024-09-16T12:26:00.000Z",
  "site": "at://did:plc:z4yzhhsdetqfkq6hneiwc3cv/site.standard.publication/3m5k5jw2onk2h",
  "tags": [
    "linux",
    "tech"
  ],
  "title": "Fedora Post-Install Guide for NVIDIA Laptops"
}