Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
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
etersoft
eepm
Commits
516ae627
Commit
516ae627
authored
Jul 11, 2024
by
Boris Yumankulov
Committed by
Vitaly Lipatov
Nov 09, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm play switch-to-nvidia: use fbdev wherever possible (eterbug #17500)
parent
156be46b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
6 deletions
+21
-6
switch-to-nvidia.sh
prescription.d/switch-to-nvidia.sh
+21
-6
No files found.
prescription.d/switch-to-nvidia.sh
View file @
516ae627
...
...
@@ -39,6 +39,13 @@ check_run_kernel () {
ls
/boot |
grep
"vmlinuz"
|
grep
-vE
'vmlinuz-un-def|vmlinuz-std-def'
|
grep
"
${
USED_KFLAVOUR
}
"
|
sort
-Vr
|
head
-n1
|
grep
-q
$(
uname
-r
)
}
check_old_nvidia
()
{
local
lspci_output
=
$(
lspci
-k
2>/dev/null |
grep
-E
'VGA|3D'
|
tr
-d
'\n'
)
# Fermi, Kepler and Tesla
[[
"
$lspci_output
"
==
*
GF[0-9]
*
]]
||
[[
"
$lspci_output
"
==
*
GK[0-9]
*
]]
[[
"
$lspci_output
"
==
*
G[0-9]
*
]]
||
[[
"
$lspci_output
"
==
*
GT[0-9]
*
]]
||
[[
"
$lspci_output
"
==
*
MCP[0-9]
*
]]
&&
return
0
return
1
}
if
check_run_kernel
;
then
echo
"The most newer installed
${
USED_KFLAVOUR
}
kernel is running."
else
...
...
@@ -73,12 +80,20 @@ epm install --skip-installed nvidia-settings nvidia-vaapi-driver ocl-nvidia libc
epm play i586-fix
# Убирает «Неизвестный монитор» в настройках дисплеев в сессии Wayland
# Данное решение приводит к невозможности входа в tty, к отсутствию вывода логов во время загрузки (Если не включён Plymouth)
if
!
grep
"initcall_blacklist=simpledrm_platform_driver_init"
/etc/sysconfig/grub2 &>/dev/null
;
then
# Делаем копию
cp
/etc/sysconfig/grub2 /etc/sysconfig/grub2.epmbak
sed
-i
"s|^
\(
GRUB_CMDLINE_LINUX_DEFAULT='.*
\)
'
\$
|
\1
initcall_blacklist=simpledrm_platform_driver_init'|"
/etc/sysconfig/grub2
# Убирает «Неизвестный монитор» в настройках дисплеев
if
check_old_nvidia
;
then
# Данное решение приводит к невозможности входа в tty, к отсутствию вывода логов во время загрузки, а так же к поломке luks
if
!
grep
"initcall_blacklist=simpledrm_platform_driver_init"
/etc/sysconfig/grub2 &>/dev/null
;
then
# Делаем копию
cp
/etc/sysconfig/grub2 /etc/sysconfig/grub2.epmbak
sed
-i
"s|^
\(
GRUB_CMDLINE_LINUX_DEFAULT='.*
\)
'
\$
|
\1
initcall_blacklist=simpledrm_platform_driver_init'|"
/etc/sysconfig/grub2
fi
else
if
!
grep
"nvidia_drm.fbdev=1"
/etc/sysconfig/grub2 &>/dev/null
;
then
# Делаем копию
cp
/etc/sysconfig/grub2 /etc/sysconfig/grub2.epmbak
sed
-i
"s|^
\(
GRUB_CMDLINE_LINUX_DEFAULT='.*
\)
'
\$
|
\1
nvidia_drm.fbdev=1'|"
/etc/sysconfig/grub2
fi
fi
# Активируем службы управления питания 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