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

Thread: use custom dsdt

Hybrid View

  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,846
    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,846
    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,138

    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
    Jun 2008
    Location
    Canada
    Posts
    436

    Default Re: use custom dsdt

    Quote Originally Posted by arvidjaar View Post
    Please show your generated grub.cfg

    #
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by grub2-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    #


    ### BEGIN /etc/grub.d/00_header ###
    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
    ### END /etc/grub.d/00_header ###


    ### BEGIN /etc/grub.d/01_acpi ###
    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
    ### END /etc/grub.d/01_acpi ###


    ### BEGIN /etc/grub.d/10_linux ###
    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
    }
    }


    ### END /etc/grub.d/10_linux ###


    ### BEGIN /etc/grub.d/20_linux_xen ###
    ### END /etc/grub.d/20_linux_xen ###


    ### BEGIN /etc/grub.d/20_ppc_terminfo ###
    ### END /etc/grub.d/20_ppc_terminfo ###


    ### BEGIN /etc/grub.d/30_os-prober ###
    ### END /etc/grub.d/30_os-prober ###


    ### BEGIN /etc/grub.d/40_custom ###
    # This file provides an easy way to add custom menu entries. Simply type the
    # menu entries you want to add after this comment. Be careful not to change
    # the 'exec tail' line above.
    ### END /etc/grub.d/40_custom ###


    ### BEGIN /etc/grub.d/41_custom ###
    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
    ### END /etc/grub.d/41_custom ###


    ### BEGIN /etc/grub.d/90_persistent ###
    ### END /etc/grub.d/90_persistent ###

  9. #9

    Default Re: use custom dsdt

    Waow! Here's the interesting part though:


    Quote Originally Posted by collinm View Post
    Code:
    ### BEGIN /etc/grub.d/01_acpi ###
      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
    ### END /etc/grub.d/01_acpi ###

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

    Default Re: use custom dsdt

    any info how is supposing to work?

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
  •