This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
fix GPU driver detection bug with bumblebee-managed dual video cards #1131
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.