Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: use custom dsdt

  1. #1
    Join Date
    Jun 2008
    Location
    Canada
    Posts
    436

    Default use custom dsdt

    hi

    i use suse 12.2, my dstp have some errors.
    i fixed them.

    how to load my custom dsdt?

    thanks

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,865
    Blog Entries
    15

    Default Re: use custom dsdt

    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3
    Join Date
    Jun 2008
    Location
    Canada
    Posts
    436

    Default Re: use custom dsdt

    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

    Code:
    #! /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:
    Code:
    grub2-mkconfig -o /boot/grub2/grub.cfg
    after boot, i checked /var/log/message don't find custom acpi text....

    any idea?

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,865
    Blog Entries
    15

    Default Re: use custom dsdt

    Hi
    Unfortunately no I've asked for some assistance from a user who is more up to speed on grub2.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  5. #5

    Default Re: use custom dsdt

    Quote Originally Posted by malcolmlewis View Post
    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:

    Code:
    ### 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

    Code:
    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.

  6. #6
    Join Date
    Sep 2012
    Posts
    5,141

    Default Re: use custom dsdt

    Quote Originally Posted by collinm View Post
    after boot, i checked /var/log/message don't find custom acpi text....

    any idea?
    Please show your generated grub.cfg

  7. #7

    Default Re: use custom dsdt

    Code:
    # 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:

    Code:
    # 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:

    Code:
    # cp /tmp/dsdt.aml /boot/dsdt.aml
    Once the file /boot/dsdt.aml exists, your script will write this to grub.cfg:

    Code:
    ### 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 ###
    * I think one should move GRUB_CUSTOM_ACPI to /etc/default/grub.

  8. #8
    Join Date
    Sep 2012
    Posts
    5,141

    Default Re: use custom dsdt

    Quote Originally Posted by collinm View Post
    how to load my custom dsdt?
    Just use standard feature of openSUSE mkinitrd. Edit /etc/sysconfig/kernel and put path to your DSDT (binary) there:
    Code:
    # 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.

  9. #9

    Default Re: use custom dsdt

    @collinm,

    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.

  10. #10
    Join Date
    Jun 2008
    Location
    Canada
    Posts
    436

    Default Re: use custom dsdt

    Quote Originally Posted by arvidjaar View Post
    Just use standard feature of openSUSE mkinitrd. Edit /etc/sysconfig/kernel and put path to your DSDT (binary) there:
    Code:
    # 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.

    it's the first thing i tried.
    there is a bug report that work since a while...

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •