fix GPU driver detection bug with bumblebee-managed dual video cards#1131
fix GPU driver detection bug with bumblebee-managed dual video cards#1131xudong-yang wants to merge 2 commits intodylanaraps:masterfrom
Conversation
|
Since I don't know the impact of this commit to Intel+AMD GPUs and I can't test it at the moment, I'm going to wait for Dylan for this commit. |
|
This works for me on an intel machine. Not sure about AMD or AMD+Intel or NVIDIA. |
|
Yea it's probably better to ensure it's okay for AMD cards. Although I think it will not cause problems on AMD machines, I don't have any devices to test it. I noticed neofetch has a discord channel. Is anybody there using AMD? |
|
I'll ask around. |
…tion bug with bumblebee-managed dual video cards Upstream PR: dylanaraps/neofetch#1131 Thanks to @xudong-yang Co-authored-by: xudong-yang <xudong.yang@ucl.ac.uk>
|
Thank you for your contribution! This PR is merged into hyfetch since this repo (dylanaraps/neofetch) seems no longer maintained. HyFetch is a fork of neofetch with LGBTQ pride flags, but the repo also maintains an updated version of the original neofetch, addressing many pull requests that are not merged in the original repo. Read the "Running Updated Original Neofetch" section for more info! |
Description
gpu_driver is enabled in my console to reassure the video card I am currently using, as my laptop is equipped with dual graphic cards.
However, the output seems a bit curious:
The cause is explained in the picture below:
As I have used bumblebee to manage my graphic cards, normally the nvidia card is disabled. Simply add 2 to the NR where the nvidia card appears causes this incorrect result.
Features
Fix the bug described above.
Issues
I am sorry I did not come up with a simple solution to keep this line less than 100 characters. The line I altered has 117 characters now.I do have some ideas to shorten it, liketmp_str="first half"; str="$tmp_str && the rest", but I think that is even worse.To pass the travis check, the field name match is set as containing "nel driv" instead of exactly matching " Kernel driver in use" (as the line length should be smaller than 102 according to the .travis.yml).
This could be potentially problematic, but I think the keywords I choose should avoid much. Please Let me know if you you have any thoughts about this. You are also welcome to edit it directly if you like. Thanks!
TODO
No further work is required so far.