diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 894bdd34769f3f69d0982789c157e20bc6346224..2fb9639bccc2d4df707280b60767769b7162d485 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -4,6 +4,12 @@ This file will be processed and will be distributed with Recalbox Releases. The text, located between the first `## Version XXX` and the second one, will appear as release notes for end user on a Recalbox upgrade. +## Version 9.0.1-Pulstar + +### Fixes + +- Fix black screen on older PC with Intel graphic card + ## Version 9-Pulstar ### News diff --git a/board/recalbox/fsoverlay/recalbox/scripts/recalbox-utils.sh b/board/recalbox/fsoverlay/recalbox/scripts/recalbox-utils.sh index a527b21ebd97e52ecb0a42593297f42eeab1eefd..05b460e4bd7dddd00c19e8ebc50f5f50f524671d 100644 --- a/board/recalbox/fsoverlay/recalbox/scripts/recalbox-utils.sh +++ b/board/recalbox/fsoverlay/recalbox/scripts/recalbox-utils.sh @@ -165,3 +165,19 @@ getStepNumber() { sed -E '/^\s*case=/!d;s/\s*case=[^:]+:(.*)/\1/' /boot/recalbox-boot.conf } +# isOldIntelChipset +# chipset number is 4 hexa digit (without the 8086) +# return 0 if the given device id mathces a Gen3 and older GPU +isOldIntelChipset() { + local OLD_CHIPSETS=(7800 1240 7121 7123 7125 1132 \ + 2562 3577 2572 3582 358e 3582 \ + 2582 258a 2592 2772 27a2 27ae 29d2 29b2 29c2 a001 a011 \ + ) + local chipset=$(echo "$1" | tr "[:upper:]" "[:lower:]") + for old_chipset in "${OLD_CHIPSETS[@]}"; do + if [ "$chipset" = "$old_chipset" ]; then + return 0 + fi + done + return 1 +} diff --git a/board/recalbox/x86/fsoverlay/etc/init.d/S31emulationstation b/board/recalbox/x86/fsoverlay/etc/init.d/S31emulationstation index 01b8f3f2196801dd18e2b19053270ed46bcd4e77..86ca1a98a3ecc5ffefc062f09950c9899d78c879 100755 --- a/board/recalbox/x86/fsoverlay/etc/init.d/S31emulationstation +++ b/board/recalbox/x86/fsoverlay/etc/init.d/S31emulationstation @@ -8,6 +8,30 @@ INIT_SCRIPT=$(basename "$0") case "$1" in start) + intel_chip_id=$(lspci -d 8086::0300 -mm -n | sed -E 's/^.*8086"\s*"([^"]+)".*/\1/') + if [ -n "$intel_chip_id" -a ! -f /etc/X11/xorg.conf ]; then + # we should reach this part if we have an intel GPU and no hybrid laptop + # nor prime configuration (which configures /etc/X11/xorg.conf) + source /recalbox/scripts/recalbox-utils.sh + mount -o remount,rw / + if isOldIntelChipset "$intel_chip_id"; then + recallog -s "${INIT_SCRIPT}" -t "ES" "Older intel chipset detected (${intel_chip_id}), using intel Xorg driver" + cat >/etc/X11/xorg.conf <<" EOF" + Section "Device" + Identifier "intel" + Driver "intel" + EndSection + EOF + else + recallog -s "${INIT_SCRIPT}" -t "ES" "Newer intel chipset detected (${intel_chip_id}), using modesetting Xorg driver" + cat >/etc/X11/xorg.conf <<" EOF" + Section "Module" + Load "modesetting" + EndSection + EOF + fi + mount -o remount,ro / + fi enabled="`$systemsetting -command load -key system.es.atstartup`" if [ "$enabled" != "0" ];then settings_lang="`$systemsetting -command load -key system.language`" diff --git a/configs/recalbox-x86_64_defconfig b/configs/recalbox-x86_64_defconfig index 1e64f05903141b3ecd633c17ab2720b02df45f32..48a2219c15ba9155b4b7e63ef4666a11b1f606fc 100644 --- a/configs/recalbox-x86_64_defconfig +++ b/configs/recalbox-x86_64_defconfig @@ -139,6 +139,7 @@ BR2_PACKAGE_XDRIVER_XF86_INPUT_LIBINPUT=y BR2_PACKAGE_XDRIVER_XF86_VIDEO_AMDGPU=y BR2_PACKAGE_XDRIVER_XF86_VIDEO_ATI=y BR2_PACKAGE_XDRIVER_XF86_VIDEO_FBDEV=y +BR2_PACKAGE_XDRIVER_XF86_VIDEO_INTEL=y BR2_PACKAGE_XDRIVER_XF86_VIDEO_NOUVEAU=y BR2_PACKAGE_XDRIVER_XF86_VIDEO_NV=y BR2_PACKAGE_XTERM=y