Improving the Intel Extreme Driver (Was: Graphics on Dell laptop in Vesa mode only)

It’s my dayjob PC, so no, no Haiku on it. And yes, with the stick I use, it’s very slow (maybe some 20 secs or so) but that’s the stick’s fault. It’s the very el cheapo one (1Gb) which our company delivers with our equipment, I guess it costs way below 1 euro :wink:
Actually I am very pleased with the way Haiku responds/works booting off that stick: I even browse the web sometimes that way.

You can just create a fresh bootable stick, and have the kerneldriver and accelerant installed in home/config/non packaged there about.

I will point you at my driver site which I keep running: there’s a specific pointer on how to manually install a gfx driver there:
http://rudolfs-place.nl/BeOS/NVdriver/setinst.html#installation

of course instead of the nivdia file names it will be the names of the intel driver, so the files I’ll have in the zip I’ll link to. Oh yes: so there’s a specific Haiku part on that page. The intel driver has no settings file, so you can skip that.

Ah, and if you have a problem, just hit ‘ALT’+‘CTL’+‘DEL’ blindly to enter the dialog where you can kill processes and such. Of course you won’t see it. Wait a few secs, and hit those keys again, this time holding them for 5+ secs: the system will reboot.

Hit spacebar and choose ‘failsave video driver’ to boot with VESA mode. You’ll see the desktop again and you can simply remove the accelerant bin file for the next boot to be normal.

1 Like

This way surely works, but machines with working ACPI shuts down normally when the power button pressed, an i better prefer normal shutdown than reset.

Reset can results in inconsistent filesystem. Is there a better way for machines with non-working ACPI? Like adding a program to the launch_daemon which will be started after the desktop is ready, and it would check if a specific ke on the keyboard pressed. If not, it would reboot the machine or something similar.

1 Like

Ah OK, Nice to know.
The reset I advised does not corrupt the filesystem. Haiku nicely saves all open stuff before actually resetting. So it differs from just pressing a hard reset button in the old days :slight_smile:

I have done numerous resets in the way I described it in the past month: not once was there corruption. And always I could nicely checkout the previous_syslog file to see what exactly was happening in the system.

Edit: Hmm, maybe for one thing: if I change a display mode that renders my system ‘invisible’, and I hit ‘ENTER’ to make it final (which I often do for testing), the next reboot will not have remembered that for the icons screen startup resolution selection. (if you normally shutdown it -does-).

The system -does- switch to the selected resolution once the desktop comes up though.
Apart from often trouble with modesetting (Haiku often issues -two- set cmd’s instead of one most of the time during my tests) there’s a second problem (apparantly):

Haiku ‘remembers’ the current set mode not in -one-, but in -two- places. app_server_settings and vesa?
Deleting app_server_settings makes the system -still- use the resolution that was last set… With the BeOS this was not the case (and I liked that better in this respect :wink: )

1 Like

I suffer from a (temporary) black screen, see ticket #14643.
I’ve put this in my ~/config/settings/boot/UserBootscript:

response=$(alert --stop --modal "Can you see me?" "Cancel" "Reboot!")
if [ $response == "Reboot!" ] ; then
	echo reboot
	shutdown -r
else
	echo cancel
fi

This pops up an alert every boot-up. If my screen lights up after a minute, I click Cancel, if it doesn’t I blindly hit the ENTER key and the system reboots for another try.

2 Likes

Sounds bad, but i did not expected full solution in mere minutes :smiley:

Hi, the cleanup is done, so I compiled and tested a first driver testversion, 32bits Haiku.
I hope for it to work on a lot of analog output ports on Intel gfx systems outthere that currently only produce a black screen or so. And hopefully other outputs remain working as good, or as bad, as before.

Please test and let me know if you observe changes compared to the current git version… Thanks! :slight_smile:

Grab it here, and install it as instructed on my webpages.
File: http://www.rudolfs-place.nl/Haiku/Downloads/Intel_extreme_drv_v1_32bit.zip
For install see: http://rudolfs-place.nl/BeOS/NVdriver/setinst.html#installation

Oh:
What should work (on analog connected screens):

  • resolution (partly - see below)
  • refreshrate
  • colordepth

The resolutions that you can select will depend upon your startup resolution selected (the one the icons screen uses):

  • If that screen starts with a resolution lower or equal than 1024x768 approx: all resolutions lower than this (and this one) should work.
  • if that screen starts with a resolution higer or equal to 1280x1024 approx: all resolutions higher than this (and this mode also) should work (upto including 1920x1080 I expect).
  • if you have an even higher resolution screen more than two lanes are needed (Above are one, and two lane setups). This could work correctly as well, just try.

If you start a fresh system with this driver (where a modeset never took place) the native resolution of your screen should be activated without problems. Otherwise it may be you need to trick a bit to get things going. Beware of the keyboard drop-down shortcut ‘ctrl’+‘alt’+‘shift’+‘esc’ key combi: this drops you to a lower than current desktop setting, but which one depends on the current setting as fas as I understand it currently. I think this could be 800x600 or 640x480, Don’t know about others.

Also when you hit spacebar during start you can choose failsafe video driver so you can set a mode you want on the desktop with screen prefs, and then reboot, without hitting any key. The driver should kick in correctly then, and you should be able to set modes along the lines I just indicated.

When you hit spacebar you could also select another mode than ‘current’ to preinit the card for the mode-range (so to speak) you intend to use. What this boot-mode-select stuff does is pre-init the number of lanes for the FDI (flexible display interface) between north/cpu and southbridge so it’s able to handle the datastream needed for the mode. This is the one thing I was not yet able to get running correctly on my system for analog ports inside the driver: hence the needed cardBIOS help.

Good luck!

Oh, PS: the driver will only work with -one- screen connected as far as I currently know and expect. So on a laptop I expect/hope the internal screen stays working if it was working before, but an external analog screen, hmm, don’t really expect so. But you can try, of course :wink:

4 Likes

Progress!

screenshot1

6 Likes

The results with SandyBridge weren’t as good as this screenshot suggests. However, it was using the driver, and although the screen was distorted, it diplayed an image at full HD reslution of the monitor.
screenshot3

1 Like

Nice! So could you make a picture and share that? That would tell me more than a screenshot this way :wink:
Questions:

  • So Ivybridge works as expected as seen from my comments before?
  • Can you change to a bit lower mode and try another refreshrate to see if it behaves?
  • For the Sandy the same qustions: what happens there if you goto a bit lower mode and also try another refresrate? These are two seperate tests so to speak: try a lower mode at 60Hz, then same mode at 65Hz or even 70Hz and ask the monitor via it’s internal menu what it sees refreshrate wise…

Thanks!

1 Like

I’ll reference any further test results in my open Trac tickets for these graphics chipsets. I’ve also taken the liberty of reassigning both tickets to rudolfc (previously it was PulkoMandy).
https://dev.haiku-os.org/ticket/14301
https://dev.haiku-os.org/ticket/13669

1 Like

Ah, yes, I didn’t realize there were tickets for them. Please indeed lets take it there. Can you post updates there for both systems and also post the requested photo’s there? I’ll have a close look at them :wink:

@PulkoMandy: is it OK I’ll take those from you for now? Let’s see what I can make of it. I think I’d like it if you checkout my changes later on just to be sure it fits in the line of how things are, and/or you make changes to make it more object/c++ style (that’s not entirely my thing I’m afraid :wink: )

My focus for now is purely to get it running a bit more and style comes second: it might turn out the object stuff is not fitting good enough for the hardware as it is, is what I am thinking about as well.

So far I’m glad I could push it a bit forward at least as I think that would get others going again on this too.

@Vidrep: I am awaiting your photo’s, thanks in advance!

Oh @ others with intel hardware who are testing: if you have a specific ticket already let me know, ask the owner if it can be reassigned for now: that is if you are willing to go trough some lengths testing for me :wink:

4 Likes

Yes. I an happy to have less things on my TODO list :slight_smile:

I think I mostly agree with this. There are many variations of the hardware and in the end it is simpler to have if/else blocks where needed, rather than implement that by having objects and subclasses. The only place where objects may be useful is when we implement multiple displays, but we’re not quite there anyway…

1 Like

Intel Ironlake (PCI ID: 8086:0042, Dev ticket: #15241 (Intel HD Graphics Ironlake driver issue) – Haiku) : modesetting feature needs a little work on certain monitors. Otherwise, the intel_extreme driver now boots to Desktop from a hrev55117 LiveDVD:

I can stop individual GLTeapots without the “window smearing” during mouse movements over the GLteapot window.

GPU Specs:
Intel Corporation Core Processor Integrated Graphics Controller (rev 18) 256M - Gen 5
Outputs: VGA, DVI-D (dual link, digital)
Max. resolution output: 2560x1600x32 @ 60hz

5 Likes

Nice! Which gfx do you have? look at what it says in screenprefs for example (or the syslog in the intel_extreme messages).
If all is right you cannot yet change to other resolutions than the one you boot in, since I only updated partly yet. For the other changes needed to get to the full point where I am with my tests I am still looking a bit further in the driver, to see if I can use it on the external display port for example. Once I have a bit more on this I’ll commit the rest I expect…

Ah: Ironlake. Sorry did not see :slight_smile:
Could you give me the deviceID for completeness sake?
you have generation 5, at home I currently have gen 3, 4 and 7, Vidrep has a gen 6 and 7. Nice mix to test with :slight_smile:

BTW Is there a ticket for your card? Would be handy to know and have info in…

3 Likes

do you want me to do some testing? I don’t have a analog port.

Card Type
Skylake DataPort
Ivy Bridge, can be mobile as it’s a nuc HDMI
Ivy Bridge (Mobile GT2) Laptop
IronLake (Mobile) Laptop
Intel GMA 3150 (Atom N4xx) Laptop
1 Like

Intel Skylake Laptop I have:

I have a laptop with KabyLake Gen 9.5 Intel HD 630. Need a test on that one?

1 Like

Awesome stuff. I’ve always felt that Intel was a good place to start for native video drivers. I have a Sandy Lake desktop I could test out soon hopefully.

@rudolfc: do you have any tips for how someone could get started learning about graphics/GPU driver programming? Though maybe for Haiku long term it makes sense to get Linux drivers working through a DRM port. Though knowing the fundamentals is still important.

1 Like

Hi all,
Well that’s nice! More and more variations of cards. It will definately be interesting to see what these all will do, of course you’re welcome to see what the current state of these is and let me know.

For testing of changes I am doing you could already see what the testdriver (32bit) does, or get the 2nd one (32bit) with a fix for the older cards (regression fix). Upto now I would expect to only see improvement on analog connected screens. digitally connected screens, well, I don’t know the status of those yet, so let me know. Laptops internal panels might be / probably are a
‘special brand’ of digital screens which might already work? Let me know.

On my IvyBridge I did not get any signal on the eDP port until this morning, it now shows a picture. I had to shutoff the complete driver (well almost) to get it going, so now I have to re-enable piece by piece to see what will/won’t work (connection detection was already too much :wink: ). After I have this nailed on my system I’ll come up with another update and a testing driver (32bit): with that one you are encouraged to test with digitally connected screens (Again).

Still: one screen connected at the time (here): a seperate test would be having two connected screens simultaneously I expect.

Second testversion is here (forget about the first one I’d say):
http://www.rudolfs-place.nl/Haiku/Downloads/Intel_extreme_drv_v2_32bit.zip

5 Likes

Hi! Well, actually I am glad I did not start with Intel originally, at least in this era. The north/south bridge connection is a nasty beast to tackle and I still have to do that. Apart from that it’s nice there’s reasonable much information to look at for register level specs.

Generally speaking, I am again using my own guidelines on writing a driver, which you can read in the document I wrote all those years ago.

See at the bottom of this page for my original (50% translated version):
http://rudolfs-place.nl/BeOS/NVdriver/download.html

Update: Hmm, the actual method I use for writing a driver is described in chapter 6: but I still have to translate that. I guess if I do that I have at least one certain reader :slight_smile:

6 Likes