hi
i use suse 12.2, my dstp have some errors.
i fixed them.
how to load my custom dsdt?
thanks
hi
i use suse 12.2, my dstp have some errors.
i fixed them.
how to load my custom dsdt?
thanks
Hi
Have a read through this archive article;http://forums.opensuse.org/opensuseforums/archives/sf-archives/archives-tips-tricks-tweaks/320199-howto-fix-your-buggy-dsdt.html
i already read this stuff.
in yast dsdt existe for system config but in bugzilla this way failed to work since a while.
i tried the grub2 way.
added my dsdt file to boot
added script below to /etc/grup/01_acpi
#! /bin/sh -e
# Uncomment to load custom ACPI table
GRUB_CUSTOM_ACPI="/boot/dsdt.aml"
# DON'T MODIFY ANYTHING BELOW THIS LINE!
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
. /usr/share/grub2/grub-mkconfig_lib
#. ${libdir}/grub/grub-mkconfig_lib
# Load custom ACPI table
if x${GRUB_CUSTOM_ACPI} != x ] && -f ${GRUB_CUSTOM_ACPI} ] \
&& is_path_readable_by_grub ${GRUB_CUSTOM_ACPI}; then
echo "Found custom ACPI table: ${GRUB_CUSTOM_ACPI}" >&2
prepare_grub_to_access_device `${grub_probe} --target=device ${GRUB_CUSTOM_ACPI}` | sed -e "s/^/ /"
cat << EOF
acpi (\$root)`make_system_path_relative_to_its_root ${GRUB_CUSTOM_ACPI}`
EOF
fi
after i runned this command:
grub2-mkconfig -o /boot/grub2/grub.cfg
after boot, i checked /var/log/message don’t find custom acpi text…
any idea?
Hi
Unfortunately no I’ve asked for some assistance from a user who is more up to speed on grub2.
I don’t know either. But if you added a script which name starts with ‘01’ in /etc/grub.d w and made it executable (Don’t forget that!), it should be sourced right after 00_header, and you should see its output written in /boot/grub2/grub.cfg. Check if you have a section:
### BEGIN /etc/grub.d/01_acpi ###
....
### END /etc/grub.d/01_acpi ###
in that file and what’s in there. If it does’t do what you want, try to edit this part, but don’t run
grub2-mkconfig -o /boot/grub2/grub.cfg
until you get it work, or your changes will be overwritten. I don’t know which commands you need to put there, sorry.
Please show your generated grub.cfg
# Uncomment to load custom ACPI table
**GRUB_CUSTOM_ACPI="/boot/dsdt.aml"**
# DON'T MODIFY ANYTHING BELOW THIS LINE!
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
. /usr/share/grub2/grub-mkconfig_lib
#. ${libdir}/grub/grub-mkconfig_lib
# Load custom ACPI table
if x${GRUB_CUSTOM_ACPI} != x ] && -f ${GRUB_CUSTOM_ACPI} ] \
&& is_path_readable_by_grub ${GRUB_CUSTOM_ACPI}; then
echo "Found custom ACPI table: ${GRUB_CUSTOM_ACPI}" >&2
prepare_grub_to_access_device `${grub_probe} --target=device ${GRUB_CUSTOM_ACPI}` | sed -e "s/^/ /"
cat << EOF
acpi (\$root)`make_system_path_relative_to_its_root ${GRUB_CUSTOM_ACPI}`
EOF
fi
If the file /boot/dsdt.aml doesn’t exist, your script will do nothing. See here on how to recompile the DSDT: https://wiki.archlinux.org/index.php/DSDT
You need to perform at least these steps:
# cd /tmp
# cat /sys/firmware/acpi/tables/DSDT > /tmp/dsdt.dat
# iasl -d dsdt.dat
# iasl -tc dsdt.dsl
Fix the errors (don’t know how). Then compile again and copy dsdt.aml:
# cp /tmp/dsdt.aml /boot/dsdt.aml
Once the file /boot/dsdt.aml exists, your script will write this to grub.cfg:
### BEGIN /etc/grub.d/01_acpi ###
insmod part_msdos
insmod ext2
set root='hd0,msdos9'
if x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos9 --hint-efi=hd0,msdos9 --hint-baremetal=ahci0,msdos9 --hint='hd0,msdos9' aa192116-690d-4420-af5f-544d1e58b46c
else
search --no-floppy --fs-uuid --set=root aa192116-690d-4420-af5f-544d1e58b46c
fi
acpi ($root)/boot/dsdt.aml
### END /etc/grub.d/01_acpi ###
Just use standard feature of openSUSE mkinitrd. Edit /etc/sysconfig/kernel and put path to your DSDT (binary) there:
# The file name of a binary ACPI Differentiated System Description Table
# (DSDT). This table is appended to the initial ram disk (initrd) that
# the mkinitrd script creates. If the kernel finds that its initrd
# contains a DSDT, this table replaces the DSDT of the bios. If the file
# specified in ACPI_DSDT is not found or ACPI_DSDT is empty/not specified,
# no DSDT will be appended to the initrd.
# Example path /etc/acpi/DSDT.aml
# You can also override Secondary System Description Tables (SSDTs).
# Add DSDT and SSDT files separated by spaces, e.g. "DSDT.aml SSDT1.aml"
# The files must be named DSDT.aml and/or SSDT[1-9]*.aml.
# For compatiblity reasons, if only one file is added it is assumed it is
# the DSDT and will be used as such, in future the above naming scheme
# will be enforce.
# Be aware that overriding these tables can harm your system.
# Only do this if you know what you are doing and file a bug on
# bugzilla.kernel.org so that the root cause of the issue will get fixed.
ACPI_DSDT=""
Do not forget to run mkinitrd after that.
Either load the dsdt fom Grub (post #7) or include it in initrd (post #8). Don’t use both methods! The method suggested by @arvidjaar seems better and easier, and doesn’t rely on the boot loader.
it’s the first thing i tried.
there is a bug report that work since a while…
if -s $prefix/grubenv ]; then
load_env
fi
set default="${saved_entry}"
if x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="–id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if “${prev_saved_entry}” ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if -z “${boot_once}” ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root=‘hd0,msdos1’
if x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint=‘hd0,msdos1’ 7160ec60-bbf2-4c0c-ad03-7dfcadbc9455
else
search --no-floppy --fs-uuid --set=root 7160ec60-bbf2-4c0c-ad03-7dfcadbc9455
fi
font="/usr/share/grub2/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=fr_FR
insmod gettext
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root=‘hd0,msdos1’
if x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint=‘hd0,msdos1’ 7160ec60-bbf2-4c0c-ad03-7dfcadbc9455
else
search --no-floppy --fs-uuid --set=root 7160ec60-bbf2-4c0c-ad03-7dfcadbc9455
fi
insmod gfxmenu
loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans-Bold14.pf2
loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans10.pf2
loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans12.pf2
loadfont ($root)/boot/grub2/themes/openSUSE/ascii.pf2
insmod png
set theme=($root)/boot/grub2/themes/openSUSE/theme.txt
export theme
insmod part_msdos
insmod ext2
set root=‘hd0,msdos1’
if x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint=‘hd0,msdos1’ 7160ec60-bbf2-4c0c-ad03-7dfcadbc9455
else
search --no-floppy --fs-uuid --set=root 7160ec60-bbf2-4c0c-ad03-7dfcadbc9455
fi
insmod png
background_image -m stretch /boot/grub2/themes/openSUSE/background.png
if x${boot_once} = xtrue ]; then
set timeout=0
elif sleep --interruptible 0 ; then
set timeout=8
fi
insmod part_msdos
insmod ext2
set root=‘hd0,msdos1’
if x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint=‘hd0,msdos1’ 7160ec60-bbf2-4c0c-ad03-7dfcadbc9455
else
search --no-floppy --fs-uuid --set=root 7160ec60-bbf2-4c0c-ad03-7dfcadbc9455
fi
acpi ($root)/boot/dsdt.aml
menuentry ‘openSUSE’ --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option ‘gnulinux-simple-7160ec60-bbf2-4c0c-ad03-7dfcadbc9455’ {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root=‘hd0,msdos1’
if x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint=‘hd0,msdos1’ 7160ec60-bbf2-4c0c-ad03-7dfcadbc9455
else
search --no-floppy --fs-uuid --set=root 7160ec60-bbf2-4c0c-ad03-7dfcadbc9455
fi
echo ‘Loading Linux 3.6.6-1-desktop …’
linux /boot/vmlinuz-3.6.6-1-desktop root=UUID=7160ec60-bbf2-4c0c-ad03-7dfcadbc9455 splash=silent quiet showopts
echo ‘Loading initial ramdisk …’
initrd /boot/initrd-3.6.6-1-desktop
}
submenu ‘Advanced options for openSUSE’ $menuentry_id_option ‘gnulinux-advanced-7160ec60-bbf2-4c0c-ad03-7dfcadbc9455’ {
menuentry ‘openSUSE, with Linux 3.6.6-1-desktop’ --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option ‘gnulinux-3.6.6-1-desktop-advanced-7160ec60-bbf2-4c0c-ad03-7dfcadbc9455’ {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root=‘hd0,msdos1’
if x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint=‘hd0,msdos1’ 7160ec60-bbf2-4c0c-ad03-7dfcadbc9455
else
search --no-floppy --fs-uuid --set=root 7160ec60-bbf2-4c0c-ad03-7dfcadbc9455
fi
echo ‘Loading Linux 3.6.6-1-desktop …’
linux /boot/vmlinuz-3.6.6-1-desktop root=UUID=7160ec60-bbf2-4c0c-ad03-7dfcadbc9455 splash=silent quiet showopts
echo ‘Loading initial ramdisk …’
initrd /boot/initrd-3.6.6-1-desktop
}
menuentry ‘openSUSE, with Linux 3.6.6-1-desktop (recovery mode)’ --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option ‘gnulinux-3.6.6-1-desktop-recovery-7160ec60-bbf2-4c0c-ad03-7dfcadbc9455’ {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root=‘hd0,msdos1’
if x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint=‘hd0,msdos1’ 7160ec60-bbf2-4c0c-ad03-7dfcadbc9455
else
search --no-floppy --fs-uuid --set=root 7160ec60-bbf2-4c0c-ad03-7dfcadbc9455
fi
echo ‘Loading Linux 3.6.6-1-desktop …’
linux /boot/vmlinuz-3.6.6-1-desktop root=UUID=7160ec60-bbf2-4c0c-ad03-7dfcadbc9455 showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe
echo ‘Loading initial ramdisk …’
initrd /boot/initrd-3.6.6-1-desktop
}
menuentry ‘openSUSE, with Linux 3.4.11-2.16-desktop’ --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option ‘gnulinux-3.4.11-2.16-desktop-advanced-7160ec60-bbf2-4c0c-ad03-7dfcadbc9455’ {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root=‘hd0,msdos1’
if x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint=‘hd0,msdos1’ 7160ec60-bbf2-4c0c-ad03-7dfcadbc9455
else
search --no-floppy --fs-uuid --set=root 7160ec60-bbf2-4c0c-ad03-7dfcadbc9455
fi
echo ‘Loading Linux 3.4.11-2.16-desktop …’
linux /boot/vmlinuz-3.4.11-2.16-desktop root=UUID=7160ec60-bbf2-4c0c-ad03-7dfcadbc9455 splash=silent quiet showopts
echo ‘Loading initial ramdisk …’
initrd /boot/initrd-3.4.11-2.16-desktop
}
menuentry ‘openSUSE, with Linux 3.4.11-2.16-desktop (recovery mode)’ --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option ‘gnulinux-3.4.11-2.16-desktop-recovery-7160ec60-bbf2-4c0c-ad03-7dfcadbc9455’ {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root=‘hd0,msdos1’
if x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint=‘hd0,msdos1’ 7160ec60-bbf2-4c0c-ad03-7dfcadbc9455
else
search --no-floppy --fs-uuid --set=root 7160ec60-bbf2-4c0c-ad03-7dfcadbc9455
fi
echo ‘Loading Linux 3.4.11-2.16-desktop …’
linux /boot/vmlinuz-3.4.11-2.16-desktop root=UUID=7160ec60-bbf2-4c0c-ad03-7dfcadbc9455 showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe
echo ‘Loading initial ramdisk …’
initrd /boot/initrd-3.4.11-2.16-desktop
}
}
if -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif -z “${config_directory}” -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
Waow! Here’s the interesting part though:
any info how is supposing to work?
This looks fine, assuming grub2 “acpi” command actually works. How do you check whether your DSDT is loaded?
after boot, i checked /var/log/message don’t find custom acpi text.
I do not understand it. Kernel will not see anything “custom”, magic is done before kernel is loaded. What do you expect to see there?
there is a bug report that work since a while…
Which is bug report number?