Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PortWINE
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav
PortWINE
Commits
04dcd480
Unverified
Commit
04dcd480
authored
Aug 19, 2020
by
Castro-Fidel
Committed by
GitHub
Aug 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add check optimus-manager
parent
5f803831
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
16 deletions
+12
-16
runlib
data_from_portwine/scripts/runlib
+12
-16
No files found.
data_from_portwine/scripts/runlib
View file @
04dcd480
...
...
@@ -132,25 +132,21 @@ else
echo
"Use OpenGL mod."
fi
########################################################################
export
gpu_card
=
""
if
[
-x
"
`
which optimus-manager 2>/dev/null
`
"
]
;
then
export
gpu_card
=
`
optimus-manager
--status
|
grep
Current |
cut
-f
2
-d
':'
|
sed
-e
's/^[[:space:]]*//'
`
fi
export
optirun_on
=
export
check_optimus_manager
=
export
PW_NVIDIA
=
"
$(
lspci |
grep
NVIDIA
)
"
if
[[
"
$gpu_card
"
==
"nvidia"
]]
||
[[
!
-z
"
${
PW_NVIDIA
}
"
]]
&&
[[
"
$gpu_card
"
!=
"intel"
]]
;
then
if
[
-x
"
`
which primusrun 2>/dev/null
`
"
]
;
then
if
[[
"
$gpu_card
"
==
""
]]
;
then
export
optirun_on
=
"primusrun"
else
export
VK_ICD_FILENAMES
=
/usr/share/vulkan/icd.d/nvidia_icd.json
fi
if
[
-x
"
`
which optimus-manager 2>/dev/null
`
"
]
;
then
export
check_optimus_manager
=
`
optimus-manager
--status
|
grep
Current |
cut
-f
2
-d
':'
|
sed
-e
's/^[[:space:]]*//'
`
fi
if
[
!
-z
"
${
PW_NVIDIA
}
"
]
&&
[
"
${
check_optimus_manager
}
"
!=
"intel"
]
;
then
if
[
"
${
check_optimus_manager
}
"
=
"nvidia"
]
;
then
export
VK_ICD_FILENAMES
=
/usr/share/vulkan/icd.d/nvidia_icd.json
elif
[
-x
"
`
which primusrun 2>/dev/null
`
"
]
;
then
export
optirun_on
=
"primusrun"
export
VK_ICD_FILENAMES
=
/usr/share/vulkan/icd.d/nvidia_icd.json
elif
[
-x
"
`
which optirun 2>/dev/null
`
"
]
;
then
if
[[
"
$gpu_card
"
==
""
]]
;
then
export
optirun_on
=
"optirun -b primus"
else
export
VK_ICD_FILENAMES
=
/usr/share/vulkan/icd.d/nvidia_icd.json
fi
export
optirun_on
=
"optirun -b primus"
export
VK_ICD_FILENAMES
=
/usr/share/vulkan/icd.d/nvidia_icd.json
fi
export
__NV_PRIME_RENDER_OFFLOAD
=
1
export
__GLX_VENDOR_LIBRARY_NAME
=
nvidia
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment