Tag Archives: NVIDIA

Fixing Blank Screen if Ubuntu 9.10 Started with HDTV or Monitor Turned Off

Lord knows this was painful to fix as I’m a relative Linux newbie.

Problem:

My HTPC, when started up with my HDTV turned off does not detect the TV and results in a blank screen. I can VNC into the Ubuntu OS but the resolution is very low (800×600). I suspect this is due to the television as I’ve read in some forums that this is just ‘one of those things’ on certain models. The graphics card is an Nvidia MSI 8400GS, connected to a Toshiba 37AV505D HDTV via an HDMI cable with a DVI adapter into the card.

After some research it appears the graphics card is waiting for monitor information to come down the connected cable via EDID. As the monitor is off, the card defaults to ‘failsafe’ settings and switches output to the VGA port at 800×600.

Solution:

Force the graphics to ignore missing EDID information, force output to DVI and also force the resolution.

Brief Solution Explanation:

Export EDID settings for connected and correctly configured flatscreen/HDTV. Point xorg.conf to use the exported settings and to ignore all else.

This is what I did to fix it:

Warning: This is, apparently, dangerous and can spanner your TV/monitor if done incorrectly. Proceed at your own risk etc etc

  1. Ensure ssh is installed
    This is so you can restore your xorg.conf file if everything goes tits up.
  2. Backup the xorg.conf file
    This file is, apparently, somewhat old and rarely used. When I totally spannered this setup (which I did a couple of times), I was be able to SSH back into the box and return the file to the original.
    First, open terminal and change permissions:
    cd /etc/X11
    sudo chmod 777 xorg.conf

    then make a new copy:
    sudo mv xorg.conf xorg.conf.original
  3. Make a new xorg.conf file
    At the moment no xorg.conf file exists. As I am using the Nvidia driver, I created a new xorg.conf file by starting the Nvidia settings in terminal:
    sudo nvidia-xconfig
  4. Start up the NVIDIA settings manager
    sudo nvidia-settings
    (You can also get to it by going to ‘System’ – ‘Preferences’ – ‘Display’. It should be present if your system is fully up-to-date) . Looks something like this:
  5. NVIDIA X Server Settings in Ubuntu 9.10Ensure the monitor/screen/LCD/HDTV or whatever is the ONLY monitor connected and save the settings
    Go to the ‘X Server Display Configuration’ option and ensure you select the correct resolution, frequency.
    Click on the ‘Advanced…’ button.
    Take a note of the ‘Model’ (in my case ‘TSB TOSHIBA (DFP-0 on GPU-0)’) and the ‘Mode Name’ (in my case ‘1920x1080_60i’).
    Click ‘Save to X Configuration File’ and save to ‘/etc/X11/xorg.conf’.
    If you have problems saving you will probably have to reset the permissions, as per step 2 (‘sudo chmod 777 xorg.conf’).

    Screenshot-NVIDIA X Server Settings

    Don't forget to save your settings

  6. Quit and restart Ubuntu.
  7. Export your EDID settings
    In terminal, start the Nvidia Settings GUI again with:
    sudo nvidia-settings
    Now go to the settings for your flat panel (in my case it was ‘DFP-0 – (TSB TOSHIBA-TV)’
    Click the ‘Acquire EDID…’ button and note where you saved it (in my case I chose ‘/home/mark/Desktop/edid.bin)
    Acquire EDID...
  8. Modify the xorg.conf file to use exported EDID file
    Open terminal and ensure you have write permissions for xorg.conf:
    cd /etc/X11
    sudo chmod 777 xorg.conf
    sudo gedit xorg.conf

    This should open your xorg.conf file.
    Under the ‘Section “Device”‘ I added:
    Option “CustomEDID” “DFP-0:/home/mark/Desktop/edid.bin”
    ‘DFP-0’ is ‘Digital Flat Panel – 0’, we noted this in step 5. Yours may well be different.
    The section ended up looking like this:
    Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 8400 GS"
    Option         "CustomEDID" "DFP-0:/home/mark/Desktop/edid.bin"
    EndSection

    It’s probably worth restarting just to see that everything’s still ok. Still with the monitor on, it should boot up ‘normally’.
  9. Force the screen to use DVI and ignore other modes
    I added these two lines under the ‘Section “Screen”‘:
    Option         "ConnectedMonitor" "DFP-0"
    (This forces the graphics card to assume the above monitor is connected)
    Option         "ExactModeTimingsDVI" "TRUE"
    (This gets the graphics card to ignore any other possible modes available)
    I then removed all but the mode I wished to use and locked it to the monitor I wished to use:
    Option         "metamodes" "DFP-0: 1920x1080_60i +0+0"
    (This line had lots more modes specified, separated by commas and semicolons).
    The section ended up looking like this:
    Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "ConnectedMonitor" "DFP-0"
    Option         "ExactModeTimingsDVI" "TRUE"
    Option         "metamodes" "DFP-0: 1920x1080_60i +0+0"
    SubSection     "Display"
    Depth       24
    EndSubSection
    EndSection
  10. Reboot and check it boots up with monitor turned on
    The display should look totally normal.
  11. Reboot with monitor turned off to test
    Turn display on after it’s booted into the OS.

Problems? Troubleshooting? Try opening up ‘/var/log/xorg.0.log’ and looking through to see what’s not working.

If your display was hosed, you can see the log from the time BEFORE you just booted by checking out ‘/var/log/xorg.0.log.old’.

This post and this post really helped me out.

Installing OSX86 (Hackintosh) onto Gigabyte G41M-ES2H with iDeneb v1.5.1 (Mac OSX 10.5.7) and NVIDIA MSI N8400GS D512H

This walkthrough is for those of you smart enough to buy an NVIDIA GPU rather than go through the torture of trying to get the onboard Intel X4500 graphics to work with OSX. Below, I basically copied 95% of the walkthrough I did for the vanilla, basic walkthrough without the NVIDIA card installed, but changed the bits that were pertinent to the video card.

I’ve done another write up about how to install with iATKOS v7 but graphics functionality is reduced as it uses the onboard Intel GPU. The installation on this page, in my opinion, is better. Click here to see the iATKOS installation.

Please note – I used an MSI N8400GS D512H which fit the bill as it was cheap (under £50), fanless (nice and quiet for my HTPC) and had OSX86 compatibility (QE/CI) and Ubuntu compatibility.

Originally I bought this motherboard with the intention of running XBMC on top of OSX. It was a toss-up between Ubuntu 9.10 and an OSX86 Hackintosh flavour and in the end Ubuntu won, but only because it was marginally quicker to boot up and support for this setup on the XBMC forums seemed to be a little better.

Anyhow, I think that at least a few people should find this walk-through useful so I thought I’d write it up. Originally I was going to write it up using iATKOS but you needed to mess around with NVinject, and the installation with iDeneb seems to be so much easier.

I installed the MSI card before I began and used the DVI output to connect to my monitor.

Setting up the BIOS

So, onwards and upwards. After installing all the components into the case (I used a SATA hard drive and port closest to the edge of the board) and having downloaded iATKOS V7 iso from one of the usual sources and burnt it to a DVD I had a quick wade through the BIOS to check the settings.

To start with I selected ‘Load Optimized Defaults’, save and exited in case the HDD needed to be redetected, then went back into the BIOS.

Here’s what I did on each page – I am only documenting settings I changed from the default:

Standard CMOS Features

On all IDE channels that weren’t in use I went into each and selected ‘NONE’. Although on the main page it already says ‘NONE’ I go into each and manually disable those not in use. In my experience it stops the motherboard detecting drives every time and can speed up the POST.
Drive A – ‘NONE
Halt on – ‘No Errors’Standard CMOS Features BIOS screen

Advanced BIOS Features

First Boot Device – ‘Hard Disk’
Second Boot Device – ‘Disabled’
Third Boot Device – ‘Disabled’

Advanced BIOS Features screen

Advanced Chipset Features

As I was using the MSI card I’d bought I chaged the ‘Init Display First’ to ‘PEG’Advanced Chipset Utilities BIOS screen

Integrated Peripherals

Onboard Serial Port 1 – ‘Disabled’
Onboard Parallel Port – ‘Disabled’ – I don’t use any parallel or serial devices.
USB Keyboard Function – ‘Enabled’
USB Mouse Function – ‘Enabled’ – Otherwise your (USB) keyboard won’t work during setup.

Integrated Peripherals BIOS screen

Power Management Setup

I left all these settings as default.

Power Management Setup BIOS screen

PnP/PCI Configurations

I left these as default.

PnP/PCI Configurations BIOS screen

PC Health Status

I left these settings as default, and couldn’t be bothered to take a screenshot.

OSX86 Installation

Please note – it is best to do this part connected to a standard computer monitor/flatscreen. Otherwise you end up having to choose options and press buttons that aren’t visible on the screen, a bit like this (this is from an earlier iATKOS installation):

iATKOS Welcome Screen on widescreen TV

If you use a widescreen TV, you may not be able to see or select buttons during installation

Now the BIOS is sorted, let’s get on with the actual installation. Connect the DVI cable to your NVIDIA card, pop the iDeneb v1.5.1 DVD into in the caddy, hit ‘F12’ as it runs through the POST to bring up the Boot Menu and select ‘CDROM’.

When it asks to ‘Boot from CD/DVD’ make sure you hit return. Another message with something like ”Press any key to start up from CD ROM…’ pops up a few seconds after, hit return again.

You should have the Apple logo up whilst the installer loads – after 10 or so minutes the a asking to select an installation language.

Choose your language screen

This next bit is important. You will now prepare your hard drive. When the ‘Welcome’ screen pops up you get the Apple menu along the top of the screen. Click ‘Utilities’ – ‘Disk Utility…’

The entire contents of this drive are about to be erased. Please ensure you have no important information on your drive because if you come whining to me I will honestly not give a fuck.

Select your drive in the left hand pane (in the screen below I already had a ‘Mac OSX’ partition created, ignore this), and click on the ‘Erase’ option to the right of ‘First Aid’. Choose ‘Mac OS Extended (Journaled)’ and name your new partition (I used ‘Mac OSX’). Hit the ‘Erase…’ button. A warning dialogue box will pop up, just hit the ‘Erase’ button again.

iDeneb Disk Utility

Close the Disk Utility and you should be back to the Welcome screen. Click the ‘Continue’ button and the Software licence agreement should pop up. Now Click on the ‘Agree’ button.

Software licence agreement page

Next the ‘Select a Destination’ window will pop up. Select your drive and click ‘Continue’

Select Your Destination screen with iDeneb

The ‘Install Summary’ page pops up. This bit is REALLY important.

Click the ‘Customize’ button.

Customize button in iDeneb

Don't forget to hit the 'Customize' button

Under ‘iDeneb Patches 10.5.7 Ready’ – ‘Drivers’ – ‘Video’ – ‘NVidia’ select ‘NVinject 0.2.1’. Don’t select anything else. Click the ‘Done’ button.

Selecting the NVinject driver in iDeneb

Hit install and make a nice cup of tea whilst it writes the data to disk.

I normally skip the DVD consistency test that next pops up. If it is the first time you are intalling you may want to let this run.

The installation time will depend on the speed of your DVD (hardware) and hard drive. My DVD is pretty old and slow, so it took about 15 minutes to install.

Your machine should reboot and you should see that hideous Chameleon graphic before it boots into OSX. Next you should be asked to identify your keyboard. Follow the instructions and choose the country you’re in and your keyboard layout.

When it asked me if I already owned a Mac, I chose ‘Do not transfer my information now’.

On the ‘Registration Information’ screen, I typed in my name and made up everything else in the compulsory fields.

When ‘Create Your Account’ popped up, I filled in all the fields and chose a password.

I selected ‘I don’t want to try MobileMe for free right now’.

When the ‘Thank You’ screen pops up, hit ‘Go’. Boom, all done.

Thank You installation screen on iDeneb

You're welcome.

Your new Hackintosh is all finished. I know the network/ethernet works fine, as does the sound. As for the troublesome power management capabilities, the ‘Sleep’ function works, but when you shut down the power light stays on, so it’s not quite there. As soon as I figure out the fix I’ll edit this post, or if anyone knows how to sort it, let me know!

Installing OSX86 (Hackintosh) onto Gigabyte G41M-ES2H with iATKOS v7 (Mac OSX 10.5.7)

Please note: I’ve done another post detailing how to get OSX86 working (on iDeneb v1.5.1) with the same motherboard and an NVIDIA card, as the onboard Intel graphics don’t have full functionality. Click here to see the post.

Originally I bought this motherboard with the intention of running XBMC on top of OSX. It was a toss-up between Ubuntu 9.10 and an OSX86 Hackintosh flavour and in the end Ubuntu won, but only because it was marginally quicker to boot up and support for this setup on the XBMC forums seemed to be a little better.

Anyhow, I think that at least a few people should find this walk-through useful so I thought I’d write it up.

A word of warning before we begin – the highest resolution currently possible by the onboard Intel X4500 graphics card is 1280 x 1024px, nowhere near big enough to fill the 1920 x 1080 px resolution of the 37″ widescreen Toshiba TV I wanted to use it with. As it happens, support seems to be pretty dismal on Ubuntu as well, so after hours of research I found a graphics card that fit my requirements:

  • OSX86 compatibility, including QE/CI (a bit like DirectX for Windows this does not work with the onboard Intel GPU)
  • Ubuntu 9.10 compatibility
  • DVI output at 1920 x 1080 px
  • Low noise (eg, silent, fanless)
  • Under £40
  • NVIDIA chipset

Eventually I found the winner, an MSI N8400GS D512H graphics card which provided, as I discovered, near out-of-the-box functionality with OSX86 with only one box needing to be ticked in the setup – and that was good enough for me.

Setting up the BIOS

So, onwards and upwards. After installing all the components into the case (I used a SATA hard drive and port closest to the edge of the board) and having downloaded iATKOS V7 iso from one of the usual sources and burnt it to a DVD I had a quick wade through the BIOS to check the settings.

To start with I selected ‘Load Optimized Defaults’, save and exited in case the HDD needed to be redetected, then went back into the BIOS.

Here’s what I did on each page – I am only documenting settings I changed from the default:

Standard CMOS Features

On all IDE channels that weren’t in use I went into each and selected ‘NONE’. Although on the main page it already says ‘NONE’ I go into each and manually disable those not in use. In my experience it stops the motherboard detecting drives every time and can speed up the POST.
Drive A – ‘NONE
Halt on – ‘No Errors’Standard CMOS Features BIOS screen

Advanced BIOS Features

First Boot Device – ‘Hard Disk’
Second Boot Device – ‘Disabled’
Third Boot Device – ‘Disabled’

Advanced BIOS Features screen

Advanced Chipset Features

Don’t change any of these settings. I started messing around with the ‘PAVP Lite Mode’ and bumped up the memory allocation and had problems booting.

Advanced Chipset Features BIOS screen

Integrated Peripherals

Onboard Serial Port 1 – ‘Disabled’
Onboard Parallel Port – ‘Disabled’ – I don’t use any parallel or serial devices.
USB Keyboard Function – ‘Enabled’
USB Mouse Function – ‘Enabled’ – Otherwise your (USB) keyboard won’t work during setup.

Integrated Peripherals BIOS screen

Power Management Setup

I left all these settings as default.

Power Management Setup BIOS screen

PnP/PCI Configurations

I left these as default.

PnP/PCI Configurations BIOS screen

PC Health Status

I left these settings as default, and couldn’t be bothered to take a screenshot.

OSX86 Installation

Please note – it is best to do this part connected to a standard computer monitor/flatscreen. Otherwise you end up having to choose options and press buttons that aren’t visible on the screen, a bit like this:

iATKOS Welcome Screen on widescreen TV

If you use a widescreen TV, you may not be able to see or select buttons during installation

Now the BIOS is sorted, let’s get on with the actual installation. Pop the CD in the caddy, hit ‘F12’ as it runs through the POST to bring up the Boot Menu and select ‘CDROM’.

When it asks to ‘Boot from CD/DVD’ make sure you hit return. Another message with something like ”Press any key to start up from CD ROM…’ pops up a few seconds after, hit return again.

You should have the Apple logo up whilst the installer loads – after a few minutes the a dialogue box pops up asking to ‘Click the button to continue..’

First installation screen on iATKOS v7

The next thing to do is prepare your hard drive. When the ‘Welcome’ screen pops up you get the Apple menu along the top of the screen. Click ‘Utilities’ – ‘Disk Utility…’

The entire contents of this drive are about to be erased. Please ensure you have no important information on your drive because if you come whining to me I will honestly not give a fuck.

Select your drive in the left hand pane (in the screen below I already had a ‘Mac OSX’ partition created, ignore this), and click on the ‘Erase’ option to the right of ‘First Aid’. Choose ‘Mac OS Extended (Journaled)’ and name your new partition  (I used ‘Mac OSX’). Hit the ‘Erase…’ button. A warning dialogue box will pop up, just hit the ‘Erase’ button again.

Disk Utility in iATKOS v7

As soon as that’s finished, close Disk Utility and click ‘Continue’ on the welcome screen.

Agree to the ‘Terms and Conditions’ that pop up.

Next the ‘Select a Destination’ window will pop up. Select your drive and click ‘Continue’

Select a Destination for your OSX86 installation screen

This next part is important. On the ‘Install Summary’ screen, hit the ‘Customize’ button.

Under ‘Drivers’ – ‘VGA’ – ‘Intel’ select the ‘GMA X3100’ box. Apparently the X3100 chipset shares some of the same features as the onboard X4500. I have no idea whether the installer will work without this ticked, but this is how I did it.

Customize screen for iATKOS v7

After clicking ‘Done’, hit ‘Install’. I normally skip the DVD consistency test that next pops up. If it is the first time you are intalling you may want to let this run.

The installation time will depend on the speed of your DVD (hardware) and hard drive. My DVD is pretty old and slow, so it took about 15 minutes to install.

Your machine should reboot and you should see that hideous Chameleon graphic before it boots into OSX. Next you should be asked to identify your keyboard. Follow the instructions and choose the country you’re in and your keyboard layout.

When it asked me if I already owned a Mac, I chose ‘Do not transfer my information now’.

On the ‘Registration Information’ screen, I typed in my name and made up everything else in the compulsory fields.

When ‘Create Your Account’ popped up, I filled in all the fields and chose a password.

I selected ‘I don’t want to try MobileMe for free right now’.

When the ‘Thank You’ screen popps up, hit ‘Go’. Boom, all done.

OSX86 installation 'Thank You' screen

So you’ve got OSX installed. Now all you got to do is tackle the crappy resolution on your screen. Remember, without an NVIDIA GPU you’re pretty much stuck with it (don’t believe me? Check the thread on the insanelymac.com forum). But it is possible to up the resolution to 1280 x 1024. If you’re extremely stubborn and love banging your head against a brick wall I think I upped the resolution to 1280 x 1024 px by adding an entry to ‘/Library/Preferences/SystemConfiguration/com.apple.Boot.plist’. It is WAY easier to buy an NVIDIA card than fuck about with a legacy GPU that Apple have no interest in supporting. Trust me. Buy an NVIDIA card and be done with it.