Page 3 of 16 FirstFirst 1234513 ... LastLast
Results 21 to 30 of 153

Thread: Will Ubuntu work on the Surface Pro 2 like it did on the original?

  1. #21
    Join Date
    Jan 2007
    Beans
    96
    Distro
    Ubuntu

    Re: Will Ubuntu work on the Surface Pro 2 like it did on the original?

    Quote Originally Posted by ubootfanat View Post
    Quote Originally Posted by PointSource View Post
    I've compiled a custom kernel from Saucy's linux-source-3.11
    well I tried that as well. But I do not seem to get rid of the xhci_hcd driver.
    ...
    Can you point me in the right direction?
    I first started compiling custom kernels while I was using debian, and so I've kept to that method. This webpage: http://debian-handbook.info/browse/s...mpilation.html is a good guide to using the kernel-package program.

    As per section 8.10.3, copy in the config from the vanilla saucy kernel, then run "make menuconfig" to go disable xhci. Also, it can be made faster on multicore systems by prepending "CONCURRENCY_LEVEL=<num>".

  2. #22
    Join Date
    Jan 2007
    Beans
    96
    Distro
    Ubuntu

    Re: Will Ubuntu work on the Surface Pro 2 like it did on the original?

    Right-click with the Surface Pen can be enabled like this:
    1. Find the Pen input's X device:
      Code:
      $ xinput list
      ⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
      ⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
      ⎜   ↳ MICROSOFT SAM                           	id=9	[slave  pointer  (2)]
      ⎜   ↳ MICROSOFT SAM                           	id=10	[slave  pointer  (2)]
      ⎜   ↳ Atmel Atmel maXTouch Digitizer          	id=11	[slave  pointer  (2)]
      ⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
          ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
          ↳ Power Button                            	id=6	[slave  keyboard (3)]
          ↳ Video Bus                               	id=7	[slave  keyboard (3)]
          ↳ Power Button                            	id=8	[slave  keyboard (3)]
          ↳ Front LifeCam                           	id=12	[slave  keyboard (3)]
          ↳ Rear LifeCam                            	id=13	[slave  keyboard (3)]
      It's one of the "MICROSOFT SAM" devices, usually the first one, but...
    2. Verify you have the correct device:
      Code:
      $ xinput watch-props 9
      Device 'MICROSOFT SAM':
      	Device Enabled (134):	1
      	Coordinate Transformation Matrix (136):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
      	Device Accel Profile (259):	0
      	Device Accel Constant Deceleration (260):	1.000000
      	Device Accel Adaptive Deceleration (261):	1.000000
      	Device Accel Velocity Scaling (262):	10.000000
      	Device Product ID (251):	1118, 1961
      	Device Node (252):	"/dev/input/event6"
      	Evdev Axis Inversion (263):	0, 0
      	Evdev Axis Calibration (264):	<no items>
      	Evdev Axes Swap (265):	0
      	Axis Labels (266):	"Abs X" (256), "Abs Y" (257), "Abs Pressure" (258)
      	Button Labels (267):	"Button Left" (137), "Button Unknown" (254), "Button Right" (139), "Button Wheel Up" (140), "Button Wheel Down" (141)
      	Evdev Middle Button Emulation (268):	0
      	Evdev Middle Button Timeout (269):	50
      	Evdev Third Button Emulation (270):	0
      	Evdev Third Button Emulation Timeout (271):	1000
      	Evdev Third Button Emulation Button (272):	3
      	Evdev Third Button Emulation Threshold (273):	20
      	Evdev Wheel Emulation (274):	0
      	Evdev Wheel Emulation Axes (275):	0, 0, 4, 5
      	Evdev Wheel Emulation Inertia (276):	10
      	Evdev Wheel Emulation Timeout (277):	200
      	Evdev Wheel Emulation Button (278):	4
      	Evdev Drag Lock Buttons (279):	0
      ^C
      It will be the only one with a "Pressure" axis
    3. Swap "middle-click" and "right-click" button mappings around:
      Code:
      $ xinput get-button-map 9
      1 2 3 4 5 
      $ xinput set-button-map 9 1 3 2 4 5
      $ xinput get-button-map 9
      1 3 2 4 5

    The process will need to be repeated every X session.

  3. #23
    Join Date
    May 2008
    Beans
    14

    Re: Will Ubuntu work on the Surface Pro 2 like it did on the original?

    Quote Originally Posted by ubootfanat View Post
    I might be able to extend your patch to the hid driver to cover the touch cover 2 as well (as soon as I get the kernel compilation to work).
    as promised. Got the kernel compiled. there was just some old stuff residing in the boot directory that prevented the kernel to be properly installed.

    anyhow: the touchcover 2 works like a charme by slightly enhancing the changeset proposed by PointSource:
    Code:
    diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
    index e80da62..54f1cdb 100644
    --- a/drivers/hid/hid-core.c
    +++ b/drivers/hid/hid-core.c
    @@ -1869,6 +1869,9 @@ static const struct hid_device_id hid_have_special_driver[] = {
     	{ HID_USB_DEVICE(USB_VENDOR_ID_ZEROPLUS, 0x0030) },
     	{ HID_USB_DEVICE(USB_VENDOR_ID_ZYDACRON, USB_DEVICE_ID_ZYDACRON_REMOTE_CONTROL) },
     
    +/* MS TYPE AND TOUCH COVER 2 INSERTIONS*/
    +	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_2) },
    + 	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TOUCH_COVER_2) },
    +
     	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_PRESENTER_8K_BT) },
     	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO, USB_DEVICE_ID_NINTENDO_WIIMOTE) },
     	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO2, USB_DEVICE_ID_NINTENDO_WIIMOTE) },
    diff --git a/drivers/hid/hid-generic.c b/drivers/hid/hid-generic.c
    index e288a4a..fd59518 100644
    --- a/drivers/hid/hid-generic.c
    +++ b/drivers/hid/hid-generic.c
    @@ -24,8 +24,11 @@
     
     #include <linux/hid.h>
     
    +#include "hid-ids.h"
    +
     static const struct hid_device_id hid_table[] = {
     	{ HID_DEVICE(HID_BUS_ANY, HID_GROUP_GENERIC, HID_ANY_ID, HID_ANY_ID) },
    +	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_2), .driver_data = 0 },
    + 	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TOUCH_COVER_2), .driver_data = 0 },
     	{ }
     };
     MODULE_DEVICE_TABLE(hid, hid_table);
    diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
    index f0296a5..34b45a5 100644
    --- a/drivers/hid/hid-ids.h
    +++ b/drivers/hid/hid-ids.h
    @@ -603,6 +603,7 @@
     #define USB_DEVICE_ID_MS_PRESENTER_8K_USB	0x0713
     #define USB_DEVICE_ID_MS_DIGITAL_MEDIA_3K	0x0730
     #define USB_DEVICE_ID_MS_COMFORT_MOUSE_4500	0x076c
    +#define USB_DEVICE_ID_MS_TOUCH_COVER_2	0x07a7
    +#define USB_DEVICE_ID_MS_TYPE_COVER_2	0x07a9
     
     #define USB_VENDOR_ID_MOJO		0x8282
     #define USB_DEVICE_ID_RETRO_ADAPTER	0x3201
    thanks to PointSource again for working around the issues in the first place!


    anyhow: I just am onto a palmblock feature. Created a script that disables the touch input as soon as an event is sent to the deamon. After a certain time, touch is enabled again. The problem is that I have to somehow extract an event which shows me that the stylus is brought to the surface. Has anyone of you an idea on how to trigger a script when there is a motion event coming from the stylus?
    • motion event (via xbindkeys) alone will trigger with any mouse input (touchpad, touch and drag, stylus hovering, ...) so that does not work.
    • Accessing the /dev/input/mouse0 needs root privileges.

    Any other ideas?
    Last edited by ubootfanat; November 16th, 2013 at 05:39 PM.

  4. #24
    Join Date
    Oct 2013
    Beans
    10

    Re: Will Ubuntu work on the Surface Pro 2 like it did on the original?

    nice, using the efibootmgr worked. I got into ubuntu, installed the custom kernel, rebooted, within 3 seconds of ubuntu coming up it freezes, every time. I've wiped the partition, re-installed, went through it all again (strangely enough it worked this time without changing the boot order) and same thing, freezes the os when the new kernel is used , al though if i'm quick i can type and see the keyboard works. I think it's when it loads the wifi drivers. It pops up the wifi looking and freezes.

    I was messing with this through the live usb before and mounted everything to incorporate the wifi to see if i could straight download before and the that always froze the live setup too. it seems my surface does not like the ubuntu wifi set up.


    Quote Originally Posted by PointSource View Post
    I found I didn't need to use boot-repair, 13.10 was able to install grub in EFI mode and provide an entry for windows just fine.

    Yes, the windows boot manager did take over a couple times. When it did, I booted back through the liveUSB, and ran these commands:
    Code:
    # efibootmgr
    ...
    BootOrder: 0001,0002,0000
    Boot0000* USB Drive
    Boot0001* Windows Boot Manager
    Boot0002* ubuntu
    # efibootmgr --bootorder 0002,0001,0000
    ...
    Take note of the underlined bits: you can change the UEFI boot order by re-arranging the comma separated list of boot entry hex-codes.

    Although on a fairly regular basis, the Surface will boot to GRUB and the keyboard won't work until ubuntu loads. I've found powering into the BIOS configuration and then restarting again restores keyboard operation.

  5. #25
    Join Date
    Oct 2013
    Beans
    10

    Re: Will Ubuntu work on the Surface Pro 2 like it did on the original?

    N/M After 3 reboots or so it magically stopped freezing and now works fine. Thanks again for the help.

  6. #26
    Join Date
    Nov 2013
    Beans
    16

    Re: Will Ubuntu work on the Surface Pro 2 like it did on the original?

    Quote Originally Posted by PointSource View Post
    I've compiled a custom kernel from Saucy's linux-source-3.11, with:
    • a disabled CONFIG_USB_XHCI_HCD so that wifi works. No USB 3.0 for you.
    • and these patches to the HID drivers to make the type cover operational:

    You can download the compiled image here: https://owncloud.staers.homelinux.ne...fe27b56116becf
    But this is my home server, bandwidth speed and capacity is limited, so if someone would be kind enough to re-upload it to a file-sharing site or something, I'd appreciate it.

    The HID fix is a hack. Yes, it works (mostly), but I'll file a bug with the kernel developers and see if they can do a better job of it.

    Also, these issues still exist:
    Dear PointSource:

    Thank you very much for this. I have wiped Windows 8.1 on my Surface Pro 2 and after installing ubuntu-13.10-desktop-amd64.iso, I then installed your custom kernel.

    As mentioned by yourself and others, I confirm that Touch Cover 2 keyboard+touchpad (mouse), touch screen, and pen inputs all work. As does the Wi-Fi.

    However, when I put my Surface Pro 2 in hibernate mode, I cannot wake it up, and I am forced to power cycle (pressing power + volume buttons) it.

    Is there a way to invoke sleep mode (not hibernate) which a low power mode that stops the CPU but keeps DRAM power? I cannot find how to do this.

    Also, since I have a VMware licence, I need a copy of the Kernel headers, so that VMware can built its required kernel modules. I downloaded kernel headers for 3.11.3, these did not match. Would it be possible for you to share your copy of these headers, since a perfect match is needed? Thanks.

  7. #27
    Join Date
    Oct 2013
    Beans
    10

    Re: Will Ubuntu work on the Surface Pro 2 like it did on the original?

    nevermind on my nevermind. This thing has a personality disorder. I've gotten it to load ubuntu fine maybe 3 times. All others it freezes within 3 seconds of the gui coming up. I checked the boot logs, syslogs, kernal logs. Sometimes the logs just stop in the middle of what looks like specific memory checks, sometimes there are what look like bios warnings. No one else has freezing issues?

  8. #28
    Join Date
    Jan 2007
    Beans
    96
    Distro
    Ubuntu

    Re: Will Ubuntu work on the Surface Pro 2 like it did on the original?

    Quote Originally Posted by alicia4542 View Post
    I need a copy of the Kernel headers, so that VMware can built its required kernel modules. I downloaded kernel headers for 3.11.3, these did not match. Would it be possible for you to share your copy of these headers, since a perfect match is needed? Thanks.
    The kernel was compiled from the ubuntu package "linux-source-3.11.0", version 3.11.0-13.20, so the package "linux-headers-3.11.0-13" is the right kernel headers. I'm not sure why when compiled the package produced labels itself 3.11.3.

  9. #29
    Join Date
    Jan 2007
    Beans
    96
    Distro
    Ubuntu

    Re: Will Ubuntu work on the Surface Pro 2 like it did on the original?

    Quote Originally Posted by gunskilldreams View Post
    nevermind on my nevermind. This thing has a personality disorder. I've gotten it to load ubuntu fine maybe 3 times. All others it freezes within 3 seconds of the gui coming up. I checked the boot logs, syslogs, kernal logs. Sometimes the logs just stop in the middle of what looks like specific memory checks, sometimes there are what look like bios warnings. No one else has freezing issues?
    Yes, it has a personality disorder. I'd put it down to culture shock, coming from born-and-bred windows to linux.

    Quote Originally Posted by alicia4542 View Post
    However, when I put my Surface Pro 2 in hibernate mode, I cannot wake it up, and I am forced to power cycle (pressing power + volume buttons) it.

    Is there a way to invoke sleep mode (not hibernate) which a low power mode that stops the CPU but keeps DRAM power? I cannot find how to do this.
    As far as I know, both of these issues are the wifi's fault.

    @gunskilldreams; I've only ever managed to boot it while plugged into the power socket when wifi is enabled.

    @alicia4542: blacklisting the mwifiex + mwifiex-usb modules allows the device to suspend correctly.

    Hopefully, both of these issues will be sorted out with a new firmware for the wifi device. I have had some success with a firmware hacked out of windows, and can post the instructions to allow one to aquire it if you like, but YMMV and I take no responsibility for anything it might do to your Surface.

  10. #30
    Join Date
    Oct 2013
    Beans
    10

    Re: Will Ubuntu work on the Surface Pro 2 like it did on the original?

    Ahh, it does work if you boot with it charging. So ubuntu has a power routing issue then? As if it determined that battery power is not enough to take care of everything AND the wifi card? So if you don't boot with the charger connected or if you take the charger off while it's running it has no idea what to do and freezes

Page 3 of 16 FirstFirst 1234513 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •