Skip to content

Instantly share code, notes, and snippets.

@sagark
Created June 14, 2012 19:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sagark/2932416 to your computer and use it in GitHub Desktop.
Save sagark/2932416 to your computer and use it in GitHub Desktop.
Patch/Install Intel Driver
sudo apt-get build-dep xserver-xorg-video-intel
sudo apt-get source xserver-xorg-video-intel
cd xserver-xorg... #(the source you just downloaded, tab to autocomplete)
wget https://raw.github.com/liskin/patches/master/hacks/xserver-xorg-video-intel-2.18.0_virtual_crtc.patch
patch -p1 < xserver-xorg-video-intel-2.18.0_virtual_crtc.patch
sudo dpkg-buildpackage -b
cd ..
sudo dpkg --install xserver-xorg-video-intel_2.17.0-1ubuntu4_amd64.deb #(again, tab to autocomplete will let you avoid typing this long name)
@krlmlr
Copy link

krlmlr commented Jun 4, 2013

After line 5, you can execute dch -l+version to uniquely identify the patched version to the apt system, as outlined in a comment by Stephan Fabel. Replace +version with anything you like.

The command will ask you to provide a "changelog message", this is a good place to store the reference to the original instructions.

@mransaw
Copy link

mransaw commented Oct 17, 2017

When running:
patch -p1 < xserver-xorg-video-intel-2.18.0_virtual_crtc.patch
I get the following error:
can't find file to patch at input line 13
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:

|This is a patch that adds a single virtual CRTC to an intel driver. The
|motivation is that this output may be turned on and cloned (in userspace) to
|another X server, which may be running on a different graphics card. My usecase
|is a triple-head (with hotplug) setup on a NVIDIA Optimus laptop. See
|https://github.com/liskin/hybrid-screenclone.
|
| -- Tomáš Janoušek tomi@nomi.cz
|
|diff --git a/src/intel_display.c b/src/intel_display.c
|index 11d0e2b..dd12d5d 100644
|--- a/src/intel_display.c
|+++ b/src/intel_display.c

File to patch:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment