想问一下optirun和primusrun有什么区别?
Tofloor
poster avatar
180******16
deepin
2016-10-20 19:29
Author
装了bumblebee后,可以运行两个命令:optirun和primusrun,但是不知道它们的区别。尝试在终端里执行:(1)glxgears
(2)optirun glxgears
(3)primusrun glxgears
(4)vblank_mode=0 optirun glxgears
(5)vblank_mode=0 primusrun glxgears

其中前三项的结果差不多
292 frames in 5.0 seconds = 58.339 FPS
300 frames in 5.0 seconds = 59.830 FPS


后两项的结果明显有提升
7154 frames in 5.0 seconds = 1430.662 FPS
7578 frames in 5.0 seconds = 1515.557 FPS


另外在i-nex查看配置也是不一样的
直接执行i-nex显示的是:


optirun i-nex后是这样的:


看了看Deepin Wiki里不太明白


Chrome里看视频有时可以开启GPU加速,那是不是只有运行了optirun或primusrun才可以开启呢?
Reply Favorite View the author
All Replies
avatar
DebuggerX
deepin
2016-10-20 19:54
#1
只是chrome的话没必要切换显卡,GPU加速是指把softrender的一些工作交给显卡(不管集显核显独显都能支持)提高流畅度和性能。而独显切换主要是用在游戏和其他对图形处理尤其是3d性能要求较高的软件上。。
我的本子也长期直接禁用独显使用,完全无压力
Reply View the author
avatar
liujianfeng
deepin
2016-10-20 22:03
#2
optirun是bumblebee自带的,使用VirtualGL,但是后来bumblebee开发者建议使用性能更好的primus,具体技术异同点: https://github.com/amonakov/primus/blob/master/technotes.md
不过我具体测试过steam上一些游戏,有些只有optirun能正常跑,一般用primusrun跑
但是视频硬件解码就跟这个没关系了,optirun和primusrun都是重新开一个X,在新的X里面用nvidia的驱动模块和相关GL库,播放器则是需要用gpu去做一些解码的运算
从 https://github.com/amonakov/primus/issues/23 来看,primusrun还是不支持vdpau,而且作者并没有兴趣加入这个支持:
I'm not particularly interested in doing such work, because powering on the nVidia card, reading back the decoded frames and displaying them on Intel GPU is very likely to burn more power than decoding on Intel (plus, Intel chips that come in Optimus laptops have decent support for hardware video decoding via va-api)
optimus设备都是有两个显卡的,硬件加速交给集显是没有问题的,在播放器里设置vaapi即可, chrome的设置是在chrome://flags/, 可以在chrome://gpu看是否启用
Reply View the author
avatar
180******16
deepin
2016-10-20 22:09
#3
感谢详细解答
Reply View the author