You are not logged in.

#1 2017-02-26 20:24:41

jeffpodolski
Member
Registered: 2017-02-26
Posts: 6

Unpredictable Boot Behavior on MacBook Pro

MacBookPro10,1
OS X 10.8.5


Hey guys, let me first preface this post by saying that I'm rather new to Linux and I've pretty much been figuring this process out as I go. I'm not sure what information is relevant/needed to diagnose this type of issue, but if you tell me what I need to post and how to obtain it from my system I will be more than happy to update.

Now, on to the problem.

I'm trying to get Hydrogen running on my MacBook Pro, and I've "successfully" installed it a couple times now during the troubleshooting process. Everything seems fine, and my filesystem and user accounts are properly set up. However, I'm only able to login maybe 1/20 times (after various guess-and-check troubleshooting attempts), and I'm not sure what I'm doing wrong (or right). It seems like black magic every time I am able to get the login GUI to show on screen, and then next boot attempt, nothing.

What usually happens is I load Hydrogen from rEFInd, two sets of text/boot info scroll across the screen as it boots, and then it hangs with just an underscore in the top left corner. At this point the system is completely locked and unresponsive. No kind of input has any effect.

However, there have been a few times where I can get past this hang, but I can't seem to find any reasonable correlation between what I've done and the results I've gotten.


First time:

I re-installed rEFInd from my OSX partition, since I remember it saying it detected a Linux partition, and installed an ext4fs driver. A shot in the dark, but after doing this, Hydrogen booted normally, fully functional. I went through the post-installation setup process and all that jazz, and was able to boot into Hydrogen successfully only one more time after the initial success, and then it was back to the hang on boot.


Second time:

I freshly installed Hydrogen using the same settings as the last time (All standard, guided installation, after manually partitioning up 20GB of free space, GRUB on main disk). After getting the boot hang again, I tried booting into single-user, and ran sudo apt-get install gdm, and sudo apt-get update. Now the weird thing is is that after exiting single user, the system booted noramlly, and the GUI loaded. However, from what I understood, the above commands didn't really do anything, because network is not configured in single-user, correct? And yet again, I tried booting again after this second success, and Hydrogen hangs on boot again. Even after trying the apt-get commands again, I can't reproduce the initial success.

It's worth noting that all installations have been successful thus far. I am able to peruse my filesystem and login to my account from command line in single-user mode, it seems that booting into a Desktop Environment is the only issue.

I'm losing my mind here, and I've been scanning forums and wikis trying to find some solutions, but I'm at a loss. I suspect that there's something fishy with EFI and GRUB going on, but I don't think it should be necessary to completely change my computers boot process, because I've occasionally achieved successful results, no? Any help is appreciated, even just a point in the direction of someone else with a similar problem would be helpful. Thanks a lot guys, I'll be joining you all in Hydrogen-land soon wink

[b]  Hardware:[/b]

  Model Name:	MacBook Pro
  Model Identifier:	MacBookPro10,1
  Processor Name:	Intel Core i7
  Processor Speed:	2.4 GHz
  Number of Processors:	1
  Total Number of Cores:	4
  L2 Cache (per Core):	256 KB
  L3 Cache:	6 MB
  Memory:	8 GB
  Boot ROM Version:	MBP101.00EE.B0A
  SMC Version (system):	2.3f36
  Serial Number (system):	C02L53YGFFT0
  Hardware UUID:	A74DE2A5-4C53-5C29-B9D8-464FCEB87057

-----------------------------------------------------------------------

[b]
  Physical Drive:[/b]
  Media Name:	APPLE SSD SD256E Media
  Medium Type:	SSD
  Protocol:	SATA
  Internal:	Yes
  Partition Map Type:	GPT (GUID Partition Table)
  S.M.A.R.T. Status:	Verified

-----------------------------------------------------------------------

[b]  Partition Info:[/b]

  #sudo gdisk /dev/disk0

  Partition table scan:
    MBR: hybrid
    BSD: not present
    APM: not present
    GPT: present

  Disk size is 490234752 sectors (233.8 GiB)
  MBR disk identifier: 0x00000000
  MBR partitions:

  Number  Boot  Start Sector   End Sector   Status      Code
     1                     1       409639   primary     0xEE
     2                409640    254622511   primary     0xAF
     3             254622512    255892055   primary     0xAF
     4      *      294922240    490233855   primary     0x07
  
  -----------------------------------------------------------------------
  
  #diskutil list
  
  /dev/disk0
     #:                       TYPE NAME                    SIZE       IDENTIFIER
     0:      GUID_partition_scheme                        *251.0 GB   disk0
     1:                        EFI                         209.7 MB   disk0s1
     2:                  Apple_HFS Hard Drive              130.2 GB   disk0s2
     3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
     4:       Microsoft Basic Data BOOTCAMP                100.0 GB   disk0s4
     5: 21686148-6449-6E6F-744E-656564454649               1.0 MB     disk0s5
     6: 0FC63DAF-8483-4772-8E79-3D69D8477DE4               19.1 GB    disk0s6
     7:                 Linux Swap                         864.0 MB   disk0s7


Note: #4 belongs to a Windows 7 Partition. It has since been broken due to messing with BIOS/EFI/GRUB, but I'm not too concerned about that. I've heard that Linux and Windows can't coexist on a Mac machine, but there was once a point where all three were able to boot, so I'm optimistic.

Last edited by jeffpodolski (2017-02-26 20:47:52)

Offline

#2 2017-02-26 20:49:40

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,169
Website

Re: Unpredictable Boot Behavior on MacBook Pro

Our stable builds are built on Debian stable (jessie) using its live-build tool, which does NOT support EFI. But despair ye not!

Team Member @johnraff has recently released a test ISO capable of booting into a EFI system! It is the same as our stable amd64 image except for the bootloader, try it! ...
https://forums.bunsenlabs.org/viewtopic.php?id=3357

Transfer and install it the same way as our standard images...
https://www.bunsenlabs.org/installation … ey-install

Please post back and tell us how it went. I'll leave this thread here for now, but eventually we'll move it to the Development forum (since it's a UEFI issue).

Thanks for registering!


I don't care what you do at home. Would you care to explain?

Offline

#3 2017-02-26 21:12:19

jeffpodolski
Member
Registered: 2017-02-26
Posts: 6

Re: Unpredictable Boot Behavior on MacBook Pro

Ah, this makes sense! I'll try the new ISO and report back shortly. I am however curious still how Hydrogen managed to load though EFI, something with hybrid MBR perhaps? Regardless, I'm out of my element.

Thank you very much for the reply, I'll post soon.

Also, FWIW for development, there is one thing that is recognized during the hang: if a monitor is plugged into the displayport during the hang, the display will work and mirror the main monitor.

Offline

#4 2017-02-26 22:37:20

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: Unpredictable Boot Behavior on MacBook Pro

jeffpodolski wrote:

What usually happens is I load Hydrogen from rEFInd, two sets of text/boot info scroll across the screen as it boots, and then it hangs with just an underscore in the top left corner. At this point the system is completely locked and unresponsive. No kind of input has any effect.

This is usually a symptom of the kernel handling the handover from the TTY to the X server incorrectly and failing to send a signal to the display.

In point of fact your machine is not "hung" at all but it is fact booted and functional — you can confirm this by using `ssh` from another machine — it's just that the display is not working.

To correct this, you can try disabling kernel mode setting.

https://wiki.debian.org/KernelModesetting#Disabling_KMS

Is your laptop an Optimus device?

lspci -knn | grep -iA2 'vga\|3d'

Finally, in respect of UEFI support, I think that rEFInd is capable of booting a non-UEFI system in UEFI mode (I know that GRUB can do this) so I don't think that you need to re-install from the experimental ISO image.

Offline

#5 2017-02-27 00:22:39

jeffpodolski
Member
Registered: 2017-02-26
Posts: 6

Re: Unpredictable Boot Behavior on MacBook Pro

hhh wrote:

Team Member @johnraff has recently released a test ISO capable of booting into a EFI system! It is the same as our stable amd64 image except for the bootloader, try it! ...
https://forums.bunsenlabs.org/viewtopic.php?id=3357

Unfortunately my problem persists, despite more troubleshooting. Same issue as before.

Head_on_a_Stick wrote:

This is usually a symptom of the kernel handling the handover from the TTY to the X server incorrectly and failing to send a signal to the display.

In point of fact your machine is not "hung" at all but it is fact booted and functional — you can confirm this by using `ssh` from another machine — it's just that the display is not working.

To correct this, you can try disabling kernel mode setting.

https://wiki.debian.org/KernelModesetting#Disabling_KMS

So, I successfully disabled KMS (I think) and we're getting, somewhere. Not sure if it's closer to a solution on not. I suspect that it's an issue with lightdm. After following all the steps, both for NVIDIA and Intel (I have both), I now boot into text-only, different from single-user. I can log-in with my user info, and exit will only log me out. If I want to try to get to the GUI I need to manually launch lightdm, however, this now leads to the familiar black screen with underscore. I would try using gdm or some other Default Display Manager, but I don't have them installed. Is it possible/worth my time to try to install another DDM from my install USB? Will this help anything?


Additional Graphics Specs:

Intel HD Graphics 4000:

  Chipset Model:	Intel HD Graphics 4000
  Type:	GPU
  Bus:	Built-In
  VRAM (Total):	512 MB
  Vendor:	Intel (0x8086)
  Device ID:	0x0166
  Revision ID:	0x0009
  gMux Version:	3.2.19 [3.2.8]


NVIDIA GeForce GT 650M:

  Chipset Model:	NVIDIA GeForce GT 650M
  Type:	GPU
  Bus:	PCIe
  PCIe Lane Width:	x8
  VRAM (Total):	1024 MB
  Vendor:	NVIDIA (0x10de)
  Device ID:	0x0fd5
  Revision ID:	0x00a2
  ROM Revision:	3688
  gMux Version:	3.2.19 [3.2.8]
  Displays:
Color LCD:
  Display Type:	LCD
  Resolution:	2880 X 1800
  Retina:	Yes
  Pixel Depth:	32-Bit Color (ARGB8888)
  Main Display:	Yes
  Mirror:	Off
  Online:	Yes
  Built-In:	Yes
  Connection Type:	DisplayPort
Display:
  Resolution:	1280 x 1024 @ 60 Hz
  Pixel Depth:	32-Bit Color (ARGB8888)
  Display Serial Number:	F5WZ4C321695U
  Mirror:	Off
  Online:	Yes
  Rotation:	Supported
  Adapter Type:	Analog VGA Or Analog Over DVI-I
  Adapter Firmware Version:	0.00

Offline

#6 2017-02-27 03:07:11

jeffpodolski
Member
Registered: 2017-02-26
Posts: 6

Re: Unpredictable Boot Behavior on MacBook Pro

Also, I realized that since I'm in a network-enabled environment, I ran sudo apt-get update, and sudo apt-get install gdm in an effort to use an alternative to lightdm. I couldn't get this to work however, my knowledge is lacking on how exactly lightdm is selected in the boot process. I'm going to try a clean install of the original Hydrogen .img and play with that for a bit.

Last edited by jeffpodolski (2017-02-27 03:07:33)

Offline

#7 2017-02-27 07:35:27

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: Unpredictable Boot Behavior on MacBook Pro

jeffpodolski wrote:

After following all the steps, both for NVIDIA and Intel

Please post the exact steps that you followed — which commands did you enter and what was the content of any configuration files you created or edited?

This will show whether mode setting is disabled or not:

cat /proc/cmdline

If I want to try to get to the GUI I need to manually launch lightdm

Please post the exact command(s) that you entered to do this.

Have you tried:

startx

This will bypass any display manager.

Additional Graphics Specs:

Yes, that's all very well but what I really need to see is:

I wrote:
lspci -knn | grep -iA2 'vga\|3d'

Last edited by Head_on_a_Stick (2017-02-27 07:37:51)

Offline

#8 2017-02-27 08:10:00

jeffpodolski
Member
Registered: 2017-02-26
Posts: 6

Re: Unpredictable Boot Behavior on MacBook Pro

Yes, sorry, I've been poking around at a few things here and there and tend to get ahead of myself, I'll get to the pertinent details.

lspci -knn | grep -iA2 'vga\|3d'

Output:

00:02.0 VGA compatible controller [0300]: Intel Corporation 3rg Gen Core processor Graphics Controller [8086:0166] (rev 09)
        Subsystem: Apple Inc. Device [106b:00f7]
        Kernel driver in use: i915
--
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK107M [GeForce GT 650M Mac Edition] [10de:0fd5] (rev a1)
        Subsystem: Apple Inc. Device [106b:00f7]
        Kernel driver in use: nouveau

Steps taken from wiki.debian.org:

- Added nomodeset and splash as parameters/arguments in GRUB_CMDLINE_LINUX_DEFAULT and removed quiet, so the line in grub read as:

 GRUB_CMDLINE_LINUX_DEFAULT="splash nomodeset"

- Neither etc/modprobe.d/i915-kms.conf or /etc/modprobe.d/radeon-kms.conf were found on my system, so this step was disregarded.

- Executed #echo blacklist nouveau > /etc/modprobe.d/blacklist-nouveau.conf
I then ran cat blacklist-nouveau.conf and confirmed its contents were "blacklist nouveau" (no quotes, ofc)

- Ran sudo nano /etc/X11/xorg.conf and created the following file:

Section "Device"
        Identifier      "n"
        Driver          "nv"
EndSection

(again, xorg.conf contents were confirmed with cat after saving)

- Ran the two following commands:

# echo "GRUB_GFXPAYLOAD_LINUX=1152x864x24" >> /etc/default/grub
# update-grub

(again checking grub with cat)


I'm bouncing back and forth on partitions, so I cannot copy paste quickly. I'll try cat /proc/cmdline and startx and edit this post shortly with results

Offline

#9 2017-02-27 08:16:51

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: Unpredictable Boot Behavior on MacBook Pro

jeffpodolski wrote:

- Neither etc/modprobe.d/i915-kms.conf or /etc/modprobe.d/radeon-kms.conf were found on my system, so this step was disregarded.

- Executed #echo blacklist nouveau > /etc/modprobe.d/blacklist-nouveau.conf
I then ran cat blacklist-nouveau.conf and confirmed its contents were "blacklist nouveau" (no quotes, ofc)

- Ran sudo nano /etc/X11/xorg.conf and created the following file:

Section "Device"
        Identifier      "n"
        Driver          "nv"
EndSection

(again, xorg.conf contents were confirmed with cat after saving)

The Debian wiki guide advised to use either kernel parameters or the module & xorg.conf method — you have used *both* and you should therefore delete the xorg.conf file.

You should also remove /etc/modprobe.d/blacklist-nouveau.conf because this will stop your NVIDIA card from working at all.

I don't actually know if BunsenLabs configures Bumblebee for Optimus systems automatically but here is the Debian wiki guide for your graphics hardware:

https://wiki.debian.org/Bumblebee

Test if you are using Bumblebee with:

optirun glxgears -info

Offline

#10 2017-02-27 09:30:27

jeffpodolski
Member
Registered: 2017-02-26
Posts: 6

Re: Unpredictable Boot Behavior on MacBook Pro

Huzzah! I'm posting from inside Hydrogen right now.

I was able to solve this problem by following steps on this page:
https://wiki.debian.org/NvidiaGraphicsD … figuration

I then installed nvidia-detect to find out what recommended driver I would need and went from there. I'm going to leave the nouveau blacklist in place because I don't think it was doing me much good, and the nvidia drivers seem to be working much better (though my resolution options are extremely limited).

It was a matter of adding jessie-backports to /etc/apt/sources.list then running

 # apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') 

then running

# apt-get update
# apt-get install -t jessie-backports nvidia-driver 

once that was all in place, I also installed nvidia-xconfig to let it configure my xorg.conf file rather than do it manually.

Then a reboot, and a quick sudo nano /etc/X11/default-display-manager to switch from gdm3 back to lightdm, and everything was set the way I was hoping it would be, only I can't adjust my resolution on my main monitor, and my external monitor's resolution maxes out at 1280x1024, which makes the GUI comically large.

Thank you both for replying and helping me out, I learned a lot about Debian in the process, and I hope this thread can eventually help someone else with a MacBook and NVIDIA problems.

Is there anything else I should be wary of that I may not be noticing? Though everything seems to be working alright, I can't help but feel like success is fragile, especially after all the troubleshooting big_smile

Offline

#11 2017-03-02 09:05:41

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: Unpredictable Boot Behavior on MacBook Pro

jeffpodolski wrote:

However, there have been a few times where I can get past this hang, but I can't seem to find any reasonable correlation between what I've done and the results I've gotten.

Glad to read that the issue is solved (had similar experiences with an nVidia chipset notebook).

When I read the quoted sentence, I had to laugh, because I had the situation mentioned above quite a few times (also with some hardware issues...)  big_smile    Short but "to the point" description... :DD  (not funny though when you're in the middle of it...)

Offline

Board footer

Powered by FluxBB