如何使NVIDIA的Optimus在Linux上运行

image

Many new laptops come with NVIDIA’s Optimus technology – the laptop includes both a discrete NVIDIA GPU for gaming power and an onboard Intel GPU for power savings. The notebook switches between the two when necessary.

许多新的笔记本电脑都采用了NVIDIA的Optimus技术–笔记本电脑既包括独立的NVIDIA GPU(用于提供游戏功能),又包括板载Intel GPU(用于节省功耗)。 笔记本在必要时在两者之间切换。

However, this isn’t yet well-supported on Linux. Linus Torvalds had some choice words for NVIDIA regarding Optimus not working on Linux, and NVIDIA is now currently working on official support.

但是,这在Linux上尚未得到很好的支持。 Linus Torvalds对NVIDIA说Optimus无法在Linux上运行有一些选择的话,而NVIDIA现在正在提供官方支持。

However, if you have a laptop with Optimus support, you don’t have to wait for NVIDIA — you can use the Bumblebee project’s solution to enable Optimus on Linux today.

但是,如果您有一台支持Optimus的笔记本电脑,则不必等待NVIDIA-您可以使用Bumblebee项目的解决方案在Linux上启用Optimus。

Image Credit: Jemimus on Flickr

图片来源: Flickr上的Jemimus

安装大WaSP (Installing Bumblebee)

We’ll be going over installation instructions for Ubuntu here. Installation on many other Linux distributions is fairly simple — you can find instructions on the Bumblee project’s website. The page includes instructions for Fedora, Debian, Arch, Mandriva, and Gentoo.

我们将在这里介绍Ubuntu的安装说明。 在许多其他Linux发行版上的安装非常简单-您可以在Bumblee项目的网站上找到说明 。 该页面包含有关Fedora,Debian,Arch,Mandriva和Gentoo的说明。

First, you’ll have to run the following command in a terminal window to add the Bumblebee project’s software repository to your Ubuntu system:

首先,您必须在终端窗口中运行以下命令,以将Bumblebee项目的软件存储库添加到Ubuntu系统:

sudo add-apt-repository ppa:bumblebee/stable

sudo add-apt-repository ppa:大WaSP/稳定

image

Next, run the following command to download updated information about available packages:

接下来,运行以下命令以下载有关可用软件包的更新信息:

sudo apt-get update

sudo apt-get更新

Run the following command to install Optimus support:

运行以下命令以安装Optimus支持:

sudo apt-get install bumblebee bumblebee-nvidia

sudo apt-get install Bumblebee Bumblebee-nvidia

image

Restart your computer or log out and log back in after running this command.

运行此命令后,重新启动计算机或注销并重新登录。

image

在集成显卡和NVIDIA之间切换 (Switching Between Integrated Graphics and NVIDIA)

Your laptop will now use its integrated Intel graphics most of the time, cutting off power to the NVIDIA graphics card and improving your battery life.

现在,您的笔记本电脑将大部分时间使用其集成的Intel显卡,从而切断NVIDIA显卡的电源并延长电池寿命。

When you want to run a program that takes advantage of your NVIDIA graphics, you’ll need to run it with the optirun command.

如果要运行一个利用NVIDIA图形的程序,则需要使用optirun命令来运行它。

For example, if you want to run a game named game with NVIDIA graphics support, you’d run the following command in the terminal:

例如,如果要运行具有NVIDIA图形支持的名为game的游戏 ,则可以在终端中运行以下命令:

optirun game

optirun游戏

While the game is running with the optirun command, the NVIDIA graphics will be enabled. When the game quits and optirun is no longer running, your notebook will switch to integrated graphics.

使用optirun命令运行游戏时,将启用NVIDIA图形。 当游戏退出并且optirun不再运行时,您的笔记本将切换到集成显卡。

You should only use this command with games and other applications that require 3D graphics acceleration — don’t use it with an application that runs most of the time, such as your window manager, or you won’t see any power savings because the NVIDIA graphics will be in-use all of the time.

您仅应将此命令用于需要3D图形加速的游戏和其他应用程序-请勿将其用于大多数时间运行的应用程序(例如窗口管理器),否则由于NVIDIA不会看到任何节能效果图形将一直使用。

To test whether it’s working, you can try using the glxspheres graphics demo. First, run it without optirun:

要测试它是否正常工作,可以尝试使用glxspheres图形演示。 首先,不带optirun来运行它:

glxspheres

球体

Next, run glxspheres with optirun:

接下来,使用optirun运行glxspheres:

optirun glxspheres

optirun glxspheres

You should see higher FPS with the second command, as it’s using your NVIDIA graphics.

使用第二条命令时,您应该会看到更高的FPS,因为它使用的是NVIDIA图形。

image


NVIDIA will ideally bring official support that works out-of-the-box for everyone in the future, but Bumblebee is the best we can do for now.

理想情况下,NVIDIA将带来正式的支持,为每个人提供即开即用的支持,但是Bumblebee是目前我们能做的最好的事情。

翻译自: https://www.howtogeek.com/124685/how-to-make-nvidias-optimus-work-on-linux/

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值