LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 06-02-2017, 02:53 PM   #1
glats
Member
 
Registered: Mar 2012
Distribution: Artix
Posts: 35

Rep: Reputation: Disabled
Ubuntu freezes on login after nvidia-prime


I have an Asus GL553 with Intel 560 and Nvidia GTX 1050 and I'm tried to configure my hybrid cards with nvidia-prime.
I installed Ubuntu Gnome 17.04 then installed nvidia-381 and ran prime-select intel I had to hard reboot and when I tried to login the system freezes.
I have researched and read all these topics but I can't find a solution.

https://devtalk.nvidia.com/default/t...rime/?offset=8
https://devtalk.nvidia.com/default/t...ime/?offset=18
https://askubuntu.com/questions/8319...h-4-7-2-kernel
https://askubuntu.com/questions/8798...witch-to-intel
https://bugs.launchpad.net/lightdm/+bug/1637733
https://bugs.launchpad.net/ubuntu/+s...e/+bug/1663926

Has anyone could configure nvidia properly?

Thanks for advanced.
 
Old 06-10-2017, 08:53 PM   #2
glats
Member
 
Registered: Mar 2012
Distribution: Artix
Posts: 35

Original Poster
Rep: Reputation: Disabled
I finally did it.

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

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

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

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

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

Code:
# iasl -ve -tc -p SSDT3 SSDT3.dsl
8.- Make an image:

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

Code:
# cp acpi_gpufix /boot/
y
ou 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:

Code:
$ 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...ment-306543064
https://devtalk.nvidia.com/default/t...ng-video-cards
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Ubuntu freezes on login after nvidia-prime glats Linux - Laptop and Netbook 2 06-10-2017 08:53 PM
ubuntu freezes after login entered thehatstore Ubuntu 3 05-13-2014 03:47 PM
System freezes after login in Ubuntu 11.10 redale Ubuntu 4 01-03-2012 03:56 AM
ubuntu freezes at login j360 Linux - Laptop and Netbook 2 02-24-2010 05:57 PM
Why freezes Ubuntu 8.10 every time after login? (1 month ubuntu worked fine) makrophage Linux - General 8 02-19-2009 11:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration