-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
config wildcard handling script #901
Open
TheTesla
wants to merge
6
commits into
Bumblebee-Project:develop
Choose a base branch
from
TheTesla:develop-wild
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
aa52d9f
working wildcard operation; working installation
ec3b6f5
save ls handling - only last line
65cdaca
correct cleanup - distcheck no error
5aa9ed5
AllowEmptyInitialConfiguration - because less confusing issues and mo…
0c7105a
build flag to enable broken distro support (wildcard config) optionally
22a49b2
quickinstall for non wildcard should have usefull non wildcard content
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
autoreconf -fi | ||
./configure CONF_DRIVER=nvidia CONF_DRIVER_MODULE_NVIDIA=nvidia-375 \ | ||
CONF_PRIMUS_LD_PATH=/usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus \ | ||
CONF_LDPATH_NVIDIA=/usr/lib/nvidia-375:/usr/lib32/nvidia-375 \ | ||
CONF_MODPATH_NVIDIA=/usr/lib/nvidia-375/xorg,/usr/lib/xorg/modules \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is prone to getting outdated. Remove it? Instructions in the README should be clear |
||
|
||
make clean | ||
make | ||
sudo make install | ||
sudo cp scripts/systemd/bumblebeed.service /lib/systemd/system/. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
autoreconf -fi | ||
./configure CONF_DRIVER=nvidia CONF_DRIVER_MODULE_NVIDIA=nvidia???? \ | ||
CONF_PRIMUS_LD_PATH=/usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus \ | ||
CONF_LDPATH_NVIDIA=/usr/lib/nvidia????:/usr/lib32/nvidia???? \ | ||
CONF_MODPATH_NVIDIA=/usr/lib/nvidia????/xorg,/usr/lib/xorg/modules \ | ||
--enable-wild | ||
make clean | ||
make | ||
sudo make install | ||
sudo cp scripts/systemd/bumblebeed.service /lib/systemd/system/. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/bash | ||
|
||
|
||
if [ 0 -eq $# ] | ||
then | ||
ConfFile="@BBCONFDIR@/bumblebee.conf" | ||
else | ||
ConfFile=$1 | ||
fi | ||
|
||
|
||
ConfDriver=$( crudini --get $ConfFile bumblebeed driver ) | ||
ConfKernelDriver=$( crudini --get $ConfFile driver-nvidia kerneldriver ) | ||
ConfLibraryPath=$( crudini --get $ConfFile driver-nvidia librarypath ) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. crudini is not installed by default. |
||
ConfXorgModulePath=$( crudini --get $ConfFile driver-nvidia xorgmodulepath ) | ||
|
||
echo "Bumblebee config file: $ConfFile" | ||
echo " Raw config parameters: " | ||
echo " Driver = $ConfDriver" | ||
echo " KernelDriver = $ConfKernelDriver" | ||
echo " LibraryPath = $ConfLibraryPath" | ||
echo " XorgModulePath = $ConfXorgModulePath" | ||
|
||
Driver=$ConfDriver | ||
|
||
KernelDriver=$(find /lib/modules/$(uname -r) -name $ConfKernelDriver.ko -printf "%f\n" | tail --lines=1 ) | ||
KernelDriver=${KernelDriver:0:-3} | ||
|
||
LibraryPath= | ||
for i in $(echo "$ConfLibraryPath" | sed "s/:/ /g") | ||
do | ||
LibraryPath=$LibraryPath:$(ls -drt $i | tail --lines=1 ) | ||
done | ||
LibraryPath=${LibraryPath:1} | ||
|
||
XorgModulePath= | ||
for i in $(echo "$ConfXorgModulePath" | sed "s/,/ /g") | ||
do | ||
XorgModulePath=$XorgModulePath,$(ls -drt $i | tail --lines=1 ) | ||
done | ||
XorgModulePath=${XorgModulePath:1} | ||
|
||
echo " After applying wildcard:" | ||
echo " Driver = $Driver" | ||
echo " KernelDriver = $KernelDriver" | ||
echo " LibraryPath = $LibraryPath" | ||
echo " XorgModulePath = $XorgModulePath" | ||
|
||
bboptions="--driver $Driver --driver-module $KernelDriver --ldpath $LibraryPath --module-path $XorgModulePath" | ||
|
||
@SBINDIR@/bumblebeed -C $ConfFile -vvvv --use-syslog $bboptions | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Unit] | ||
Description=Bumblebee C Daemon | ||
|
||
[Service] | ||
Type=simple | ||
ExecStartPre=-/usr/bin/prime-select intel | ||
ExecStart=@SBINDIR@/bumblebee.bash @BBCONFDIR@/bumblebee.conf | ||
Restart=always | ||
RestartSec=60 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A "wild" daemon is probably not a good idea ;)
Maybe the option and description could be changed to more accurately reflect its functionality?