Ubuntu 17.04 Gnome 3.24 Wayland Session - Can't get Hybrid Graphics to work





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







2















I've been struggling with gnome 3.24 over many distros for the past week.



I have a dell XPS 9560 that uses NVIDIA Optimus technology, which is basically having a dual GPU (CPU integrated + discrete). In my case it is a Kaby Lake graphics from my i7 and an NVIDIA GTX 1050.



I tried to install Ubuntu 17.04 Gnome as it is the most recent distro and I imagined it would be better out of the box than my many failed attempts (arch, tumbleweed, fedora 26).



The thing is I can start a Wayland session (after fresh install) but I can't use the secondary GPU (nvidia) for opening apps, games etc. it doesn't show up anywhere in the settings either.



I then ran a Xorg session to get the additional drivers and installed the nvidia one, rebooted and my default GPU was now NVIDIA, in the Xorg session, however I can't start my Wayland session.



So I opened Nvidia-settings and in Prime Profiles switched my GPU to the Intel one, rebooted and now I could start the Wayland session but now the Xorg one, I'd just get a gray screen.
And even in Wayland with the nvidia driver and my prime profile set on my Intel Graphics I can't open using the secondary GPU.
So as of now I reverted to default xorg nouveau driver and am using my Wayland session with my Intel Graphics.



I haven't tried installing the latest beta drivers on this distro yet, but when I attempted it on my precedent tries I couldn't even get the prime profiles to show up in the nvidia-settings.



I have no clue if my problem comes from out of date drivers, hardware support, a glitch in the matrix whatsoever so any help of any kind would be appreciated.



EDIT: The nvidia version I tried to install was the current 375, I also tried the 381 beta in other distros but not in Ubuntu 17.04 yet.
Also :



$ lspci | grep -E "VGA|3D"
00:02.0 VGA compatible controller: Intel Corporation Device 591b (rev 04)
01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile] (rev a1)









share|improve this question

























  • You forgot to mention the Nvidia driver version that partially worked. Please edit and add it.

    – user589808
    Apr 17 '17 at 17:38











  • I added extra information at the end of the post.

    – Kevin
    Apr 17 '17 at 17:44











  • Have you tried setting DRI_PRIME=1 before launching an app on Wayland? It should use the secondary GPU. When using wayland, you basically need to tell it which GPU to use per each application, not the whole session.

    – Piotr Kolaczkowski
    Apr 19 '17 at 11:27











  • Hi @Kevin I have the same prblem. Any news? thanks

    – Glats
    Jun 1 '17 at 3:06


















2















I've been struggling with gnome 3.24 over many distros for the past week.



I have a dell XPS 9560 that uses NVIDIA Optimus technology, which is basically having a dual GPU (CPU integrated + discrete). In my case it is a Kaby Lake graphics from my i7 and an NVIDIA GTX 1050.



I tried to install Ubuntu 17.04 Gnome as it is the most recent distro and I imagined it would be better out of the box than my many failed attempts (arch, tumbleweed, fedora 26).



The thing is I can start a Wayland session (after fresh install) but I can't use the secondary GPU (nvidia) for opening apps, games etc. it doesn't show up anywhere in the settings either.



I then ran a Xorg session to get the additional drivers and installed the nvidia one, rebooted and my default GPU was now NVIDIA, in the Xorg session, however I can't start my Wayland session.



So I opened Nvidia-settings and in Prime Profiles switched my GPU to the Intel one, rebooted and now I could start the Wayland session but now the Xorg one, I'd just get a gray screen.
And even in Wayland with the nvidia driver and my prime profile set on my Intel Graphics I can't open using the secondary GPU.
So as of now I reverted to default xorg nouveau driver and am using my Wayland session with my Intel Graphics.



I haven't tried installing the latest beta drivers on this distro yet, but when I attempted it on my precedent tries I couldn't even get the prime profiles to show up in the nvidia-settings.



I have no clue if my problem comes from out of date drivers, hardware support, a glitch in the matrix whatsoever so any help of any kind would be appreciated.



EDIT: The nvidia version I tried to install was the current 375, I also tried the 381 beta in other distros but not in Ubuntu 17.04 yet.
Also :



$ lspci | grep -E "VGA|3D"
00:02.0 VGA compatible controller: Intel Corporation Device 591b (rev 04)
01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile] (rev a1)









share|improve this question

























  • You forgot to mention the Nvidia driver version that partially worked. Please edit and add it.

    – user589808
    Apr 17 '17 at 17:38











  • I added extra information at the end of the post.

    – Kevin
    Apr 17 '17 at 17:44











  • Have you tried setting DRI_PRIME=1 before launching an app on Wayland? It should use the secondary GPU. When using wayland, you basically need to tell it which GPU to use per each application, not the whole session.

    – Piotr Kolaczkowski
    Apr 19 '17 at 11:27











  • Hi @Kevin I have the same prblem. Any news? thanks

    – Glats
    Jun 1 '17 at 3:06














2












2








2


4






I've been struggling with gnome 3.24 over many distros for the past week.



I have a dell XPS 9560 that uses NVIDIA Optimus technology, which is basically having a dual GPU (CPU integrated + discrete). In my case it is a Kaby Lake graphics from my i7 and an NVIDIA GTX 1050.



I tried to install Ubuntu 17.04 Gnome as it is the most recent distro and I imagined it would be better out of the box than my many failed attempts (arch, tumbleweed, fedora 26).



The thing is I can start a Wayland session (after fresh install) but I can't use the secondary GPU (nvidia) for opening apps, games etc. it doesn't show up anywhere in the settings either.



I then ran a Xorg session to get the additional drivers and installed the nvidia one, rebooted and my default GPU was now NVIDIA, in the Xorg session, however I can't start my Wayland session.



So I opened Nvidia-settings and in Prime Profiles switched my GPU to the Intel one, rebooted and now I could start the Wayland session but now the Xorg one, I'd just get a gray screen.
And even in Wayland with the nvidia driver and my prime profile set on my Intel Graphics I can't open using the secondary GPU.
So as of now I reverted to default xorg nouveau driver and am using my Wayland session with my Intel Graphics.



I haven't tried installing the latest beta drivers on this distro yet, but when I attempted it on my precedent tries I couldn't even get the prime profiles to show up in the nvidia-settings.



I have no clue if my problem comes from out of date drivers, hardware support, a glitch in the matrix whatsoever so any help of any kind would be appreciated.



EDIT: The nvidia version I tried to install was the current 375, I also tried the 381 beta in other distros but not in Ubuntu 17.04 yet.
Also :



$ lspci | grep -E "VGA|3D"
00:02.0 VGA compatible controller: Intel Corporation Device 591b (rev 04)
01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile] (rev a1)









share|improve this question
















I've been struggling with gnome 3.24 over many distros for the past week.



I have a dell XPS 9560 that uses NVIDIA Optimus technology, which is basically having a dual GPU (CPU integrated + discrete). In my case it is a Kaby Lake graphics from my i7 and an NVIDIA GTX 1050.



I tried to install Ubuntu 17.04 Gnome as it is the most recent distro and I imagined it would be better out of the box than my many failed attempts (arch, tumbleweed, fedora 26).



The thing is I can start a Wayland session (after fresh install) but I can't use the secondary GPU (nvidia) for opening apps, games etc. it doesn't show up anywhere in the settings either.



I then ran a Xorg session to get the additional drivers and installed the nvidia one, rebooted and my default GPU was now NVIDIA, in the Xorg session, however I can't start my Wayland session.



So I opened Nvidia-settings and in Prime Profiles switched my GPU to the Intel one, rebooted and now I could start the Wayland session but now the Xorg one, I'd just get a gray screen.
And even in Wayland with the nvidia driver and my prime profile set on my Intel Graphics I can't open using the secondary GPU.
So as of now I reverted to default xorg nouveau driver and am using my Wayland session with my Intel Graphics.



I haven't tried installing the latest beta drivers on this distro yet, but when I attempted it on my precedent tries I couldn't even get the prime profiles to show up in the nvidia-settings.



I have no clue if my problem comes from out of date drivers, hardware support, a glitch in the matrix whatsoever so any help of any kind would be appreciated.



EDIT: The nvidia version I tried to install was the current 375, I also tried the 381 beta in other distros but not in Ubuntu 17.04 yet.
Also :



$ lspci | grep -E "VGA|3D"
00:02.0 VGA compatible controller: Intel Corporation Device 591b (rev 04)
01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile] (rev a1)






drivers nvidia gnome nvidia-optimus nvidia-prime






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 17 '17 at 17:41







Kevin

















asked Apr 17 '17 at 17:03









KevinKevin

1113




1113













  • You forgot to mention the Nvidia driver version that partially worked. Please edit and add it.

    – user589808
    Apr 17 '17 at 17:38











  • I added extra information at the end of the post.

    – Kevin
    Apr 17 '17 at 17:44











  • Have you tried setting DRI_PRIME=1 before launching an app on Wayland? It should use the secondary GPU. When using wayland, you basically need to tell it which GPU to use per each application, not the whole session.

    – Piotr Kolaczkowski
    Apr 19 '17 at 11:27











  • Hi @Kevin I have the same prblem. Any news? thanks

    – Glats
    Jun 1 '17 at 3:06



















  • You forgot to mention the Nvidia driver version that partially worked. Please edit and add it.

    – user589808
    Apr 17 '17 at 17:38











  • I added extra information at the end of the post.

    – Kevin
    Apr 17 '17 at 17:44











  • Have you tried setting DRI_PRIME=1 before launching an app on Wayland? It should use the secondary GPU. When using wayland, you basically need to tell it which GPU to use per each application, not the whole session.

    – Piotr Kolaczkowski
    Apr 19 '17 at 11:27











  • Hi @Kevin I have the same prblem. Any news? thanks

    – Glats
    Jun 1 '17 at 3:06

















You forgot to mention the Nvidia driver version that partially worked. Please edit and add it.

– user589808
Apr 17 '17 at 17:38





You forgot to mention the Nvidia driver version that partially worked. Please edit and add it.

– user589808
Apr 17 '17 at 17:38













I added extra information at the end of the post.

– Kevin
Apr 17 '17 at 17:44





I added extra information at the end of the post.

– Kevin
Apr 17 '17 at 17:44













Have you tried setting DRI_PRIME=1 before launching an app on Wayland? It should use the secondary GPU. When using wayland, you basically need to tell it which GPU to use per each application, not the whole session.

– Piotr Kolaczkowski
Apr 19 '17 at 11:27





Have you tried setting DRI_PRIME=1 before launching an app on Wayland? It should use the secondary GPU. When using wayland, you basically need to tell it which GPU to use per each application, not the whole session.

– Piotr Kolaczkowski
Apr 19 '17 at 11:27













Hi @Kevin I have the same prblem. Any news? thanks

– Glats
Jun 1 '17 at 3:06





Hi @Kevin I have the same prblem. Any news? thanks

– Glats
Jun 1 '17 at 3:06










1 Answer
1






active

oldest

votes


















0














Try this:



1.- Make a folder to store the SSDT files. Then extract it from the ACPI tables (run this part as root):



# mkdir dsdt
# cd dsdt
# SSDT_FILES=`ls /sys/firmware/acpi/tables/ | grep SSDT`
# for file in $SSDT_FILES ; do cat "/sys/firmware/acpi/tables/$file" > "$file.dat"; done
# cat /sys/firmware/acpi/tables/DSDT > DSDT.dat


2.- Make sure you have IASL installed. On ubuntu, sudo apt install iasl should suffice. I downloaded the source and compiled it myself to get the latest version, but I don't think thats necessary.



3.- There's a duplicate definition in one SSDT file which won't let us dissassemble it. Find out which one it is and delete it:



# grep PRT0 *.dat
Binary file DSDT.dat matches
Binary file SSDT1.dat matches
# mv SSDT1.dat SSDT1.bak


So in my case it is SSDT1. Replace it with whatever you get. Do not touch DSDT.dat



4.- Next, we find the SSDT file with the code we need to change. We look for the file with both "NVID" and "OSYS" are present: (There's probably a better way to do this in grep)



# grep NVID *.dat
Binary file SSDT10.dat matches
Binary file SSDT3.dat matches
# grep OSYS SSDT10.dat
# grep OSYS SSDT3.dat
Binary file SSDT3.dat matches


So in my case it was SSDT3, if its different you replace all further instances of SSDT3 with whatever you get.



5.- Disassemble!



# iasl -e *.dat -d SSDT3.dat


6.- Hopefully you don't see any errors at this point. Replace all instances of OSYS except the declaration with the constant for Windows 7, and bump the definition block number by one:



# sed -i '/^ *External/! s/OSYS/0x07D9/g' SSDT3.dsl
# sed -i '/^ *DefinitionBlock/ s/0x00001000/0x00001001/g' SSDT3.dsl


If you have a different BIOS, the Definition Block number might not be 1000. Just open SSDT3.dsl in a text editor and look for DefinitionBlock. Whatever number you see on that line, increment it by one.



7.- Compile everything and hope there are no errors.



# iasl -ve -tc -p SSDT3 SSDT3.dsl


8.- Make an image:



# mkdir -p kernel/firmware/acpi
# cp SSDT3.aml kernel/firmware/acpi/ssdt3.aml
# find kernel | cpio -H newc --create > acpi_gpufix


8.- All the following instructions corresponding to Ubuntu and GRUB2. Copy it to the boot folder. the initrd.img it's your default img from boot folder:



# cp acpi_gpufix /boot/


you can permanently add it to your GRUB by editing /etc/grub.d/10_linux. I had to change the line initrd ${rel_dirname}/${initrd} to initrd ${rel_dirname}/acpi_gpufix ${rel_dirname}/${initrd}. Then run update-grub2.



9.- To check if it works:



$ dmesg | grep ACPI | grep override
[ 0.000000] ACPI: Table Upgrade: override [SSDT-PegSsd- PegSsdt]
[ 0.000000] ACPI: SSDT 0x000000007A715080 Physical table override, new table: 0x0000000079493000


Now you can change the GPU wihtout freezes



source:



https://github.com/Bumblebee-Project/Bumblebee/issues/764#issuecomment-306543064
https://devtalk.nvidia.com/default/topic/1012369/linux/laptop-freezes-changing-video-cards
https://askubuntu.com/a/923216/680254






share|improve this answer
























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f905891%2fubuntu-17-04-gnome-3-24-wayland-session-cant-get-hybrid-graphics-to-work%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Try this:



    1.- Make a folder to store the SSDT files. Then extract it from the ACPI tables (run this part as root):



    # mkdir dsdt
    # cd dsdt
    # SSDT_FILES=`ls /sys/firmware/acpi/tables/ | grep SSDT`
    # for file in $SSDT_FILES ; do cat "/sys/firmware/acpi/tables/$file" > "$file.dat"; done
    # cat /sys/firmware/acpi/tables/DSDT > DSDT.dat


    2.- Make sure you have IASL installed. On ubuntu, sudo apt install iasl should suffice. I downloaded the source and compiled it myself to get the latest version, but I don't think thats necessary.



    3.- There's a duplicate definition in one SSDT file which won't let us dissassemble it. Find out which one it is and delete it:



    # grep PRT0 *.dat
    Binary file DSDT.dat matches
    Binary file SSDT1.dat matches
    # mv SSDT1.dat SSDT1.bak


    So in my case it is SSDT1. Replace it with whatever you get. Do not touch DSDT.dat



    4.- Next, we find the SSDT file with the code we need to change. We look for the file with both "NVID" and "OSYS" are present: (There's probably a better way to do this in grep)



    # grep NVID *.dat
    Binary file SSDT10.dat matches
    Binary file SSDT3.dat matches
    # grep OSYS SSDT10.dat
    # grep OSYS SSDT3.dat
    Binary file SSDT3.dat matches


    So in my case it was SSDT3, if its different you replace all further instances of SSDT3 with whatever you get.



    5.- Disassemble!



    # iasl -e *.dat -d SSDT3.dat


    6.- Hopefully you don't see any errors at this point. Replace all instances of OSYS except the declaration with the constant for Windows 7, and bump the definition block number by one:



    # sed -i '/^ *External/! s/OSYS/0x07D9/g' SSDT3.dsl
    # sed -i '/^ *DefinitionBlock/ s/0x00001000/0x00001001/g' SSDT3.dsl


    If you have a different BIOS, the Definition Block number might not be 1000. Just open SSDT3.dsl in a text editor and look for DefinitionBlock. Whatever number you see on that line, increment it by one.



    7.- Compile everything and hope there are no errors.



    # iasl -ve -tc -p SSDT3 SSDT3.dsl


    8.- Make an image:



    # mkdir -p kernel/firmware/acpi
    # cp SSDT3.aml kernel/firmware/acpi/ssdt3.aml
    # find kernel | cpio -H newc --create > acpi_gpufix


    8.- All the following instructions corresponding to Ubuntu and GRUB2. Copy it to the boot folder. the initrd.img it's your default img from boot folder:



    # cp acpi_gpufix /boot/


    you can permanently add it to your GRUB by editing /etc/grub.d/10_linux. I had to change the line initrd ${rel_dirname}/${initrd} to initrd ${rel_dirname}/acpi_gpufix ${rel_dirname}/${initrd}. Then run update-grub2.



    9.- To check if it works:



    $ dmesg | grep ACPI | grep override
    [ 0.000000] ACPI: Table Upgrade: override [SSDT-PegSsd- PegSsdt]
    [ 0.000000] ACPI: SSDT 0x000000007A715080 Physical table override, new table: 0x0000000079493000


    Now you can change the GPU wihtout freezes



    source:



    https://github.com/Bumblebee-Project/Bumblebee/issues/764#issuecomment-306543064
    https://devtalk.nvidia.com/default/topic/1012369/linux/laptop-freezes-changing-video-cards
    https://askubuntu.com/a/923216/680254






    share|improve this answer




























      0














      Try this:



      1.- Make a folder to store the SSDT files. Then extract it from the ACPI tables (run this part as root):



      # mkdir dsdt
      # cd dsdt
      # SSDT_FILES=`ls /sys/firmware/acpi/tables/ | grep SSDT`
      # for file in $SSDT_FILES ; do cat "/sys/firmware/acpi/tables/$file" > "$file.dat"; done
      # cat /sys/firmware/acpi/tables/DSDT > DSDT.dat


      2.- Make sure you have IASL installed. On ubuntu, sudo apt install iasl should suffice. I downloaded the source and compiled it myself to get the latest version, but I don't think thats necessary.



      3.- There's a duplicate definition in one SSDT file which won't let us dissassemble it. Find out which one it is and delete it:



      # grep PRT0 *.dat
      Binary file DSDT.dat matches
      Binary file SSDT1.dat matches
      # mv SSDT1.dat SSDT1.bak


      So in my case it is SSDT1. Replace it with whatever you get. Do not touch DSDT.dat



      4.- Next, we find the SSDT file with the code we need to change. We look for the file with both "NVID" and "OSYS" are present: (There's probably a better way to do this in grep)



      # grep NVID *.dat
      Binary file SSDT10.dat matches
      Binary file SSDT3.dat matches
      # grep OSYS SSDT10.dat
      # grep OSYS SSDT3.dat
      Binary file SSDT3.dat matches


      So in my case it was SSDT3, if its different you replace all further instances of SSDT3 with whatever you get.



      5.- Disassemble!



      # iasl -e *.dat -d SSDT3.dat


      6.- Hopefully you don't see any errors at this point. Replace all instances of OSYS except the declaration with the constant for Windows 7, and bump the definition block number by one:



      # sed -i '/^ *External/! s/OSYS/0x07D9/g' SSDT3.dsl
      # sed -i '/^ *DefinitionBlock/ s/0x00001000/0x00001001/g' SSDT3.dsl


      If you have a different BIOS, the Definition Block number might not be 1000. Just open SSDT3.dsl in a text editor and look for DefinitionBlock. Whatever number you see on that line, increment it by one.



      7.- Compile everything and hope there are no errors.



      # iasl -ve -tc -p SSDT3 SSDT3.dsl


      8.- Make an image:



      # mkdir -p kernel/firmware/acpi
      # cp SSDT3.aml kernel/firmware/acpi/ssdt3.aml
      # find kernel | cpio -H newc --create > acpi_gpufix


      8.- All the following instructions corresponding to Ubuntu and GRUB2. Copy it to the boot folder. the initrd.img it's your default img from boot folder:



      # cp acpi_gpufix /boot/


      you can permanently add it to your GRUB by editing /etc/grub.d/10_linux. I had to change the line initrd ${rel_dirname}/${initrd} to initrd ${rel_dirname}/acpi_gpufix ${rel_dirname}/${initrd}. Then run update-grub2.



      9.- To check if it works:



      $ dmesg | grep ACPI | grep override
      [ 0.000000] ACPI: Table Upgrade: override [SSDT-PegSsd- PegSsdt]
      [ 0.000000] ACPI: SSDT 0x000000007A715080 Physical table override, new table: 0x0000000079493000


      Now you can change the GPU wihtout freezes



      source:



      https://github.com/Bumblebee-Project/Bumblebee/issues/764#issuecomment-306543064
      https://devtalk.nvidia.com/default/topic/1012369/linux/laptop-freezes-changing-video-cards
      https://askubuntu.com/a/923216/680254






      share|improve this answer


























        0












        0








        0







        Try this:



        1.- Make a folder to store the SSDT files. Then extract it from the ACPI tables (run this part as root):



        # mkdir dsdt
        # cd dsdt
        # SSDT_FILES=`ls /sys/firmware/acpi/tables/ | grep SSDT`
        # for file in $SSDT_FILES ; do cat "/sys/firmware/acpi/tables/$file" > "$file.dat"; done
        # cat /sys/firmware/acpi/tables/DSDT > DSDT.dat


        2.- Make sure you have IASL installed. On ubuntu, sudo apt install iasl should suffice. I downloaded the source and compiled it myself to get the latest version, but I don't think thats necessary.



        3.- There's a duplicate definition in one SSDT file which won't let us dissassemble it. Find out which one it is and delete it:



        # grep PRT0 *.dat
        Binary file DSDT.dat matches
        Binary file SSDT1.dat matches
        # mv SSDT1.dat SSDT1.bak


        So in my case it is SSDT1. Replace it with whatever you get. Do not touch DSDT.dat



        4.- Next, we find the SSDT file with the code we need to change. We look for the file with both "NVID" and "OSYS" are present: (There's probably a better way to do this in grep)



        # grep NVID *.dat
        Binary file SSDT10.dat matches
        Binary file SSDT3.dat matches
        # grep OSYS SSDT10.dat
        # grep OSYS SSDT3.dat
        Binary file SSDT3.dat matches


        So in my case it was SSDT3, if its different you replace all further instances of SSDT3 with whatever you get.



        5.- Disassemble!



        # iasl -e *.dat -d SSDT3.dat


        6.- Hopefully you don't see any errors at this point. Replace all instances of OSYS except the declaration with the constant for Windows 7, and bump the definition block number by one:



        # sed -i '/^ *External/! s/OSYS/0x07D9/g' SSDT3.dsl
        # sed -i '/^ *DefinitionBlock/ s/0x00001000/0x00001001/g' SSDT3.dsl


        If you have a different BIOS, the Definition Block number might not be 1000. Just open SSDT3.dsl in a text editor and look for DefinitionBlock. Whatever number you see on that line, increment it by one.



        7.- Compile everything and hope there are no errors.



        # iasl -ve -tc -p SSDT3 SSDT3.dsl


        8.- Make an image:



        # mkdir -p kernel/firmware/acpi
        # cp SSDT3.aml kernel/firmware/acpi/ssdt3.aml
        # find kernel | cpio -H newc --create > acpi_gpufix


        8.- All the following instructions corresponding to Ubuntu and GRUB2. Copy it to the boot folder. the initrd.img it's your default img from boot folder:



        # cp acpi_gpufix /boot/


        you can permanently add it to your GRUB by editing /etc/grub.d/10_linux. I had to change the line initrd ${rel_dirname}/${initrd} to initrd ${rel_dirname}/acpi_gpufix ${rel_dirname}/${initrd}. Then run update-grub2.



        9.- To check if it works:



        $ dmesg | grep ACPI | grep override
        [ 0.000000] ACPI: Table Upgrade: override [SSDT-PegSsd- PegSsdt]
        [ 0.000000] ACPI: SSDT 0x000000007A715080 Physical table override, new table: 0x0000000079493000


        Now you can change the GPU wihtout freezes



        source:



        https://github.com/Bumblebee-Project/Bumblebee/issues/764#issuecomment-306543064
        https://devtalk.nvidia.com/default/topic/1012369/linux/laptop-freezes-changing-video-cards
        https://askubuntu.com/a/923216/680254






        share|improve this answer













        Try this:



        1.- Make a folder to store the SSDT files. Then extract it from the ACPI tables (run this part as root):



        # mkdir dsdt
        # cd dsdt
        # SSDT_FILES=`ls /sys/firmware/acpi/tables/ | grep SSDT`
        # for file in $SSDT_FILES ; do cat "/sys/firmware/acpi/tables/$file" > "$file.dat"; done
        # cat /sys/firmware/acpi/tables/DSDT > DSDT.dat


        2.- Make sure you have IASL installed. On ubuntu, sudo apt install iasl should suffice. I downloaded the source and compiled it myself to get the latest version, but I don't think thats necessary.



        3.- There's a duplicate definition in one SSDT file which won't let us dissassemble it. Find out which one it is and delete it:



        # grep PRT0 *.dat
        Binary file DSDT.dat matches
        Binary file SSDT1.dat matches
        # mv SSDT1.dat SSDT1.bak


        So in my case it is SSDT1. Replace it with whatever you get. Do not touch DSDT.dat



        4.- Next, we find the SSDT file with the code we need to change. We look for the file with both "NVID" and "OSYS" are present: (There's probably a better way to do this in grep)



        # grep NVID *.dat
        Binary file SSDT10.dat matches
        Binary file SSDT3.dat matches
        # grep OSYS SSDT10.dat
        # grep OSYS SSDT3.dat
        Binary file SSDT3.dat matches


        So in my case it was SSDT3, if its different you replace all further instances of SSDT3 with whatever you get.



        5.- Disassemble!



        # iasl -e *.dat -d SSDT3.dat


        6.- Hopefully you don't see any errors at this point. Replace all instances of OSYS except the declaration with the constant for Windows 7, and bump the definition block number by one:



        # sed -i '/^ *External/! s/OSYS/0x07D9/g' SSDT3.dsl
        # sed -i '/^ *DefinitionBlock/ s/0x00001000/0x00001001/g' SSDT3.dsl


        If you have a different BIOS, the Definition Block number might not be 1000. Just open SSDT3.dsl in a text editor and look for DefinitionBlock. Whatever number you see on that line, increment it by one.



        7.- Compile everything and hope there are no errors.



        # iasl -ve -tc -p SSDT3 SSDT3.dsl


        8.- Make an image:



        # mkdir -p kernel/firmware/acpi
        # cp SSDT3.aml kernel/firmware/acpi/ssdt3.aml
        # find kernel | cpio -H newc --create > acpi_gpufix


        8.- All the following instructions corresponding to Ubuntu and GRUB2. Copy it to the boot folder. the initrd.img it's your default img from boot folder:



        # cp acpi_gpufix /boot/


        you can permanently add it to your GRUB by editing /etc/grub.d/10_linux. I had to change the line initrd ${rel_dirname}/${initrd} to initrd ${rel_dirname}/acpi_gpufix ${rel_dirname}/${initrd}. Then run update-grub2.



        9.- To check if it works:



        $ dmesg | grep ACPI | grep override
        [ 0.000000] ACPI: Table Upgrade: override [SSDT-PegSsd- PegSsdt]
        [ 0.000000] ACPI: SSDT 0x000000007A715080 Physical table override, new table: 0x0000000079493000


        Now you can change the GPU wihtout freezes



        source:



        https://github.com/Bumblebee-Project/Bumblebee/issues/764#issuecomment-306543064
        https://devtalk.nvidia.com/default/topic/1012369/linux/laptop-freezes-changing-video-cards
        https://askubuntu.com/a/923216/680254







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jun 17 '17 at 23:24









        GlatsGlats

        157112




        157112






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f905891%2fubuntu-17-04-gnome-3-24-wayland-session-cant-get-hybrid-graphics-to-work%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to change which sound is reproduced for terminal bell?

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

            Can I use Tabulator js library in my java Spring + Thymeleaf project?