Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thanks first of all #2

Open
jpoa opened this issue Oct 5, 2016 · 37 comments
Open

Thanks first of all #2

jpoa opened this issue Oct 5, 2016 · 37 comments

Comments

@jpoa
Copy link

jpoa commented Oct 5, 2016

Greetings Bizzaro,

Thank you very much for you most generous contribution, its very kind of you to have documented all your efforts and shared them with us. I can tell you that following your indications I was able to get my x230 running within a Sunday morning. For the last couple of weeks I have been running along with it as a "mobile" workstation and I am very happy with it, so I am looking into solving the final issues I have, and perhaps contribute a little bit to the benefit of all.

Regarding the wireless I tried to rebrand another wireless card to show as an airport extreme, only to hit the wall with the whitelist present in the lenovos. The current solution is to flash another BIOS with the whitelist removed. As you might know, the x230 have signature procedure to prevent unauthorised flashes of the BIOS; I have tried to modify the firmware in the middle of the process to allow my device ID with no success (the version number gets increased but the check remains for the old ID, so I might be missing something).

The other alternatives are to use coreboot (open source BIOS), but with this I loose the hardware encryption of the drive (OPAL), and since it is not possible to use filevault 2 with OSX86, and non-encrypted drive is not an option in my scenario, I have to rely on the Lenovo BIOS. It is possible to flash it if you desolder the chip, flash a modified version and then use another card. You probably know this already, but in any case here it is. Im using the easy solution, external dongle with proprietary driver but I will not stop until this is fixed, even if I have to desolder the chip.

Now, about the bluetooth, I found someone on reddit mentioning that the new bluetooth adapters for the lenovos (4.0 version) work out-of-the-box with OSX and will pass the BIOS whitelist. I will order one and check, if it works I will let you know, the part in question is FRU P/N: 60Y3303. Again, at the moment I am using the easy solution, external dongle with OSX kernel drivers (OOB).

Card reader: Low priority for me, saw some discussions about the fact that this might be a lost cause, so I am leaving this to a very very boring day, ie, I dont care.

Fingerprint reader: My model does not have.

VGA output: I think this might work (pre 10.8, now I am not sure), would be nice if it did, I might give it a go but again, using the easy fix, adapter for the mini-DP port.

Sound issues after sleep: I experience the same thing as you mentioned, but its liveable, your fix works.

Sleep LED: I had some contact with similar issues on other boards and OSs, might be fixeable.

But anyway, this is just sharing some thoughts with you in case you have pursued anything in the last months about these issues.

Three quick questions though:

Brightness control is not working for me. Through any method I have tried. Do you have any hint where the problem might be? I am sure I messed something up, would appreciate a pointer on this.

The trackpad is sometimes slightly temperamental, no? I mean, it works nice, but its not the most rewarding experience. Any hints on that as well?

The screen, aren't you suspecting of some PWM (Pulse Width Modulation) on it? Don't your eyes get tired after a while?

Cheers!

@nouatzi
Copy link

nouatzi commented Oct 6, 2016

Hi,
I'm using a X230 too, and for the wireless rebranding, I didn't touch the BIOS at all.
Instead I've replaced the Intel Centrino N6205 with an Atheros AR5B95 wireless adapter (I've had a spare one).
And then, to pass the Lenovo whitelist control, I've flashed the Atheros wireless adapter EEPROM to match Device, Vendor ID & Subsystem IDs of the Intel.
Then, in OSX, I've used FakeID tools, to put back the Atheros Device, Vendor ID & Subsystem IDs in place.
If you have a spare Atheros wireless adapter, I can show you how, otherwise, yes it's mooore simpler to use a usb dongle ;-)

For the bluetooth, I use RehabMan BroadcomPatchRAM kexts, and it works well.

For the brightness control, what OSX version do you use ? 10.11.xx ? 10.12 ?
Because, first I've tried Sierra (10.12) and it didn't worked, so I went back to the latest El Capitan (10.11.6), and it worked. Just add the 2 brightness methods for (Fn keys) into the DSDST.

However, I do have a question regarding sound: did you install any extras kexts to make it work ? Or patch any kext ? Because for now, mine doesn't work...

@jpoa
Copy link
Author

jpoa commented Oct 6, 2016

Hey there nouatzi,
Thats a cool feedback :)

I was thinking about that approach but since I was not so comfortable with the OSX side (FakeID) I decided to try the BIOS approach first. Does the AR5B95 works out-of-the-box with the OSX wireless manager? (after the FakeID change, that is)

I have a DW1510, but if your setup with the AR5B95 works well and you are kind enough to share the steps I will order one today.

Thanks for the tip on the bluetooth!

On the brightness issue, I am using the latest 10.11.6.

Yes, on the sound I also had some itches... Did you installed the kext in "AppleHDA 10.11.4 MODIFIED" folder of Bizzaro? I have also applied the DSDT patch for HDEF + IRQ, plus I have Codec Commander installed in S/L/E.

I have used this drag and drop tool for the kext to ensure that the permissions are fine, cache is cleaned and so on. I am not 100% sure, but I might have installed them, rebooted, installed again and then it worked.

Let me know if I can help you with anything else!

@nouatzi
Copy link

nouatzi commented Oct 6, 2016

Yes, after the FakeID changes, the AR5B95 works out-of-the-box, not other kext or DSDT patch needed. However, in tonymacx86.com, they advise wireless adapters more appropriate for OS X, like the BCM94352HMB. You can check in tonymacx86.com, what wireless adapter is better.
In any case, I will prepare a detailed step-by-step guide for the rebranding, and after that, you'll see if you want to try it.

For the brightness issue, did you use this DSDT patch:

into method label _Q15 replace_content
begin
Notify(_SB.PCI0.LPC.KBD, 0x0205)\n
Notify(_SB.PCI0.LPC.KBD, 0x0285)\n
end;

into method label _Q14 replace_content
begin
Notify(_SB.PCI0.LPC.KBD, 0x0206)\n
Notify(_SB.PCI0.LPC.KBD, 0x0286)\n
end;

Ok, for the sound, it's true, I didn't installed the modified AppleHDA, I'll try it ;-)

@mgraham
Copy link

mgraham commented Feb 13, 2017

I would love to see the rebranding steps as well - seems like a great solution :)

Would it work with other more OSX-appropriate cards as well? Or only the Atheros?

@jpoa
Copy link
Author

jpoa commented Feb 13, 2017

I have followed these steps for the DW1510: http://x220.mcdonnelltech.com/rebrand-dw1510/

At the moment I am lacking the Device, Vendor ID & Subsystem IDs of the original card, I had this noted down somewhere and cannot find it so I have been delaying the all thing.

@nouatzi wouldn't you by chance have these numbers right at hand (some that are in the BIOS whitelist)? Just asking in case its a two minute thing for you.

I should really write things down better...

@mgraham
Copy link

mgraham commented Feb 13, 2017

Thank you for the link!

On my x230, the built in wifi card reports this:

$ lspci -nn -s 03:00.0

03:00.0 Network controller [0280]: Intel Corporation Centrino Advanced-N 6205 [Taylor Peak] [8086:0085] (rev 34)

I'm not 100% sure, but I think that breaks down to this:

Device: 0280
Vendor ID: 8086
Subsystem ID: 0085

@nouatzi
Copy link

nouatzi commented Feb 15, 2017

Hi guys, sorry for the delay.
this link:
first link
and this one:
second link
describe how to identify vendor device and sub ids.
And mine was:
PCI\VEN_8086&DEV_0085&SUBSYS_13118086&REV_34
Which wireless card did you finally bought ?
Me, I've followed this guide, but maybe yours is easier...

@mgraham
Copy link

mgraham commented May 15, 2017

I have an Atheros 9280, which obviously fails the x230's whitelist check, but (as I understand it) would be a good card to use in OSX.

My plan is to flash the 9280 and rebrand it to pass the x230's whitelist check. To do this, I'm going to use a different laptop (an old Thinkpad x201 with a non-whitelist BIOS).

But what should I rebrand the card as?

The guide on tonymacx86 advises to keep the manufacturer id set to Atheros so that the Atheros tools still recognize the card.

Are there any Atheros cards whitelisted by the x230? Is there actually any definitive list of whitelisted cards anywhere?

@nouatzi
Copy link

nouatzi commented May 15, 2017

Well, I've rebranded as the same original intel n6205 card within the x230.
I've rebranded both vendor id and device id. But you can try only the device id.
DON'T FORGET TO SAVE both original(untouched) 9280 and n6205 EEPROMS on your laptop, in cas you need them back during the process.
If I remember right, there is 2 occurrences of vendor/device IDs present in the eeprom.
I hope you make it right the first time, because, if for some mistakes, you want to modify the ids again, you'll have to twist atheros source code a bit, in order for it to recognise the mistaken eeprom, and to rewrite it again.

@mgraham
Copy link

mgraham commented May 15, 2017

Yeah, I guess it is the "only one shot" part that's worrying me...

I'll try just the device id first and see if that works.

@nouatzi
Copy link

nouatzi commented May 15, 2017

Well, don't worry to much, it's just that the "mistaken" ids have to be put in the source code (then compiled), for the card to be recognised again by atheros tool. And then start again.

@mgraham
Copy link

mgraham commented May 15, 2017

ah ok - thanks.

@jpoa
Copy link
Author

jpoa commented May 15, 2017 via email

@nouatzi
Copy link

nouatzi commented May 16, 2017

Ok, I just bought the DW1510 on eBay (4$), in order to experiment on it, and get back to you guys with a proper and working tutorial on how to rebrand.
The wireless card shipping should take some time...

@nouatzi
Copy link

nouatzi commented May 16, 2017

Ok, I've finally found a spared AR9285 wireless card, so I've decided to give us guys the full tutorial:
My setup:

  • Lenovo Thinkpad X230 with its original Centrino Advanced-N 6205
  • Spared Laptop Asus G73JH-A1 with Ubuntu 16.04.2, and Atheros AR9285

On the spared laptop, first we need to identify both wireless cards. We start with the Centrino Advanced-N 6205. We put it inside the spared laptop.
Then, in terminal:
lspci
This will give us the pci slot used by the cards, for me: 03:00.0
Then we take a look at:
ls /sys/bus/pci/devices/
And we look for the same pci slot, for me: 03:00.0.
And then we use:
udevadm info /sys/bus/pci/devices/0000:03:00.0
Result:

P: /devices/pci0000:00/0000:00:1c.1/0000:03:00.0
E: DEVPATH=/devices/pci0000:00/0000:00:1c.1/0000:03:00.0
E: DRIVER=iwlwifi
E: ID_MODEL_FROM_DATABASE=Centrino Advanced-N 6205 [Taylor Peak] (Centrino Advanced-N 6205 AGN)
E: ID_PCI_CLASS_FROM_DATABASE=Network controller
E: ID_PCI_SUBCLASS_FROM_DATABASE=Network controller
E: ID_VENDOR_FROM_DATABASE=Intel Corporation
E: MODALIAS=pci:v00008086d00000085sv00008086sd00001311bc02sc80i00
E: PCI_CLASS=28000
E: PCI_ID=8086:0085
E: PCI_SLOT_NAME=0000:03:00.0
E: PCI_SUBSYS_ID=8086:1311
E: SUBSYSTEM=pci
E: USEC_INITIALIZED=6291525

This command give us enough informations about the card. We can see the PCI_ID and PCI_SUBSYS_ID. We'll modify both of them.
We save those informations somewhere, and we repeat this process with the other wireless card: remove the N6205 card, and put back the AR9285 inside the spared laptop.
Result:

P: /devices/pci0000:00/0000:00:1c.1/0000:03:00.0
E: DEVPATH=/devices/pci0000:00/0000:00:1c.1/0000:03:00.0
E: DRIVER=ath9k
E: ID_MODEL_FROM_DATABASE=AR9285 Wireless Network Adapter (PCI-Express) (AW-NE785 / AW-NE785H 802.11bgn Wireless Full or Half-size Mini PCIe Card)
E: ID_PCI_CLASS_FROM_DATABASE=Network controller
E: ID_PCI_SUBCLASS_FROM_DATABASE=Network controller
E: ID_VENDOR_FROM_DATABASE=Qualcomm Atheros
E: MODALIAS=pci:v0000168Cd0000002Bsv00001A3Bsd00001089bc02sc80i00
E: PCI_CLASS=28000
E: PCI_ID=168C:002B
E: PCI_SLOT_NAME=0000:03:00.0
E: PCI_SUBSYS_ID=1A3B:1089
E: SUBSYSTEM=pci
E: USEC_INITIALIZED=6046558

We save those informations somewhere.
So finally we have:
PCI_ID=168C:002B which will become PCI_ID=8086:0085
PCI_SUBSYS_ID=1A3B:1089 which will become PCI_SUBSYS_ID=8086:1311

Now we will dump the AR9285 EEPROM into a file, modify that file(to make it look like the N6205), and copy it back to the wireless card.
We need a few tools.
sudo apt-get install build-essential ghex
ghex is a hexadecimal editor
Then, we download the tool source code that allows us to read and write EEPROMs: iwleeprom:

wget https://storage.googleapis.com/google-code-archive-source/v2/code.google.com/iwleeprom/source-archive.zip
unzip source-archive.zip 
cd iwleeprom/branches/atheros

Then we need to modify a bit of code inside ath9kio.c, around line 795:

if (dev->ops->eeprom_read16(dev, 128, &data) && (376 == data)) {
            short_eeprom_base = 128;
            short_eeprom_size = 376;
            goto ssize_ok;
}

change:

            short_eeprom_base = 128;
            short_eeprom_size = 376;

into:

            short_eeprom_base = 0;
            short_eeprom_size = 512;

save, and compile:
make

Make sure this is the AR9285 card that we are actually using.
Now we'll dump the AR9285 EEPROM into a file:
sudo ./iwleeprom -o ./AR9285-original.eeprom
Result:

Supported devices detected: 
  [1] 0000:03:00.0 [RW] AR9285 Wireless Adapter (PCI-E) (168c:002b, 1a3b:1089)
Select device [1-1] (or 0 to quit): 1
Using device 0000:03:00.0 [RW] AR9285 Wireless Adapter (PCI-E) 
IO driver: ath9k
HW: AR9285 (PCI-E) rev 0002
RF: integrated
Checking NVM size...
ath9k short eeprom base: 0  size: 512
Saving dump with byte order: LITTLE ENDIAN
0000 [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
...
...
0f80 [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]

EEPROM has been dumped to './AR9285-original.eeprom'

The file is owned by the root user, but you can change it back to a normal user owner (chown)...

We keep the original intact, and we'll work on a copy:
cp AR9285-original.eeprom AR9285-patched.eeprom

Now it's time to open the eeprom dump with ghex, find and replace vendor/device/subsystem IDs:
ghex AR9285-patched.eeprom
In the menu "View" --> "Group Data As" --> "Words", it's just a preference.

Now something IMPORTANT, the eeprom dump is byte-flipped, which means, if we want to look for "168C", we will look for "8C16".
So from:
PCI_ID=168C:002B will become PCI_ID=8086:0085
PCI_SUBSYS_ID=1A3B:1089 will become PCI_SUBSYS_ID=8086:1311

We obtain:
PCI_ID=8C16:2B00 will become PCI_ID=8680:8500
PCI_SUBSYS_ID=3B1A:8910 will become PCI_SUBSYS_ID=8680:1113

And a bit more clearly:
find 8C162B00 replace by 86808500
find 3B1A8910 replace by 86801113

There are 2 OCCURENCES of each to find and replace by.
Then save file.

And now we write back the modified eeprom dump file into the wireless card, using iwleeprom tool:
sudo ./iwleeprom -i AR9285-patched.eeprom

Now your AR9285 card is ready. Put it in the Thinkpad X230, and boot it. You should not see any warning from the BIOS.

However, the process is not finished. We've bypass the X230 BIOS. But now the AR9285 card is seen as an Intel N6205 card by Mac OS. So there is the process of put the right IDs back, by using FakePCIID kexts from rehabman.

@mgraham
Copy link

mgraham commented May 16, 2017

That is fantastic! Thank you @nouatzi!

I'm going to try this in the next couple of days when I get some free time.

Quick question - I have a triple boot system (OSX, Linux, Windows). After the id change, will the card work in Linux and Windows? Are there equivalent Fake ID tools for Linux or Windows?

@nouatzi
Copy link

nouatzi commented May 16, 2017

No, the card will not work natively in other installed OSs. Even in MacOS it won't work without the FakePCIID kexts magic. But yeah, maybe there is some equivalent in other OSs. I've never look it up, I only use MacOS.

@jpoa
Copy link
Author

jpoa commented Jun 5, 2017

@nouatzi thank you for your instructions.

I ended up finding the problem with the DW1510 approach. The tool used to modify the firmware ssb_sprom only allows to modify the susbsys IDs, it does not change the PCI ID.

This causes problems with the BIOS, understandingly. I am ditching the DW1510 approach, as it will never work without either changing this tool or the BIOS (unless anyone has other ideas, perhaps the dissasembler would work but I am not going down that road).

Getting an Atheros AR9285 and following your guide as soon as it arrives, thank you!

@mgraham
Copy link

mgraham commented Jun 9, 2017

Well, it turns out my 9280 isn't actually flashable. iwleeprom claims to have flashed it, but the contents of the eeprom don't actually change.

Now in search of a new card...

@mgraham
Copy link

mgraham commented Jun 30, 2017

So I seem to have lucked out. I ordered this card:

http://www.ebay.ca/itm/Lenevo-P-N-20002357-Atheros-AR5B95-802-11b-g-n-Wireless-PCIe-Half-AR9285/231394746180?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m2749.l2649

Because it said was Lenovo, I tried installing it in my x230 without flashing it first. And it turns out that it is whitelisted by the x230 bios!

Works fine under OSX after installing the following Kexts:

  • kexts/WLAN/AtherosWiFiInjector.kext
  • kexts/WLAN/IO80211Family.kext

...from this package:
https://www.tonymacx86.com/attachments/installeur-os-x-yosemite-zip.109298/

(As linked in this comment: https://www.tonymacx86.com/threads/wifi-scanning-does-not-work-ar9285-samsung-r580-laptop.145324/#post-900433).

Seems stable so far. I'm not yet sure if it is working with 5G networks, but that may be our dodgy router.

One nice thing about not having to flash it is that it also works under Linux (and presumably windows too - I haven't tested)

Edit: here's the PCI info for the card:

03:00.0 Network controller [0280]: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) [168c:002b] (rev 01)
~ » udevadm info /sys/bus/pci/devices/0000:03:00.0
P: /devices/pci0000:00/0000:00:1c.1/0000:03:00.0
E: DEVPATH=/devices/pci0000:00/0000:00:1c.1/0000:03:00.0
E: DRIVER=ath9k
E: ID_MODEL_FROM_DATABASE=AR9285 Wireless Network Adapter (PCI-Express)
E: ID_PCI_CLASS_FROM_DATABASE=Network controller
E: ID_PCI_SUBCLASS_FROM_DATABASE=Network controller
E: ID_VENDOR_FROM_DATABASE=Qualcomm Atheros
E: MODALIAS=pci:v0000168Cd0000002Bsv000017AAsd000030A1bc02sc80i00
E: PCI_CLASS=28000
E: PCI_ID=168C:002B
E: PCI_SLOT_NAME=0000:03:00.0
E: PCI_SUBSYS_ID=17AA:30A1
E: SUBSYSTEM=pci
E: USEC_INITIALIZED=89040

@jpoa
Copy link
Author

jpoa commented Jul 8, 2017

Awesome! Nicely done and thank you for the info!

@ivaniclixx
Copy link

Hi,

First off, thanks everyone for the info, specially Bizzaro.
I just wanted to provide an alternative method to bypass the BIOS whitelist check and proceed to rebrand the wifi card permanently.

It is as simple (and probably dangerous, so do it at your own risk) as booting to the bootloader with the original Intel wifi card, then, hot-switch it with the atheros one. I did it multiple times and it worked perfectly. This method will allow you to boot into Linux and rebrand the card without needing anothrr laptop without a whitelist BIOS.

Be sure to boot to the bootloader (Grub, Clover, or whatever). If you switch the card or insert it before the bootloader it won't be recognized).

Best luck to all.

@ivaniclixx
Copy link

Well, after having spent hours on trying various methods to make the rebranded Atheros into Intel card to work under Mac OS, i desisted.
I tried everything that came to my mind: editing IO80211Family.kext/Contents/PlugIns/AirPortAtheros40.kext/Contents/Plist.info to include the Intel pci8086,85 , FakePCIID, a modified FakePCIID__AR9280_as_AR946x.kext, etc... to no avail.

Have you really made it to work under Mac OS?

@ivaniclixx
Copy link

Nevermind, i finally did it ! I Just used mgraham device IDs, then modified IO80211Family.kext/Contents/PlugIns/AirPortAtheros40.kext/Contents/Plist.info to include pci168c,2b and it's working flawlessly ! Thank you everyone, so happy!

@jcamaney
Copy link

Hello ivaniclixx
do you actually get intel get to work?

if so, would you share the kext?

@ivaniclixx
Copy link

@jcamaney no, the Intel card has no drivers. You must replace the card with a supported one (like the Atheros i used).

Read carefully and good luck.

@jcamaney
Copy link

@ivaniclixx That is to bad,

Thank you for the advice i will look for and atheros

@technicalflaw
Copy link

Just wanted to thank everyone for their work. I've just successfully flashed a blacklisted AR5B95 by changing the PCI_SUBSYS_ID to 17AA:30A1 (the Lenovo one). Since it was blacklisted on all of my laptops I had insert the card on the bootloader (GRUB) menu (not on the x230), which surprisingly worked.

The iwleeprom utility works, but take care when writing your patched eeprom. You will be asked to confirm the write by entered Y, and if like me you enter a lower case y it will silently exit. Instead use a capital Y and wait for the confirmation.

@mikethebos
Copy link

@mgraham I saw your GitHub post about the whitelisted card you found for the X230. I ordered the same card, but it was blocked on my ThinkPad. Which bios are you using?

@ivaniclixx
Copy link

ivaniclixx commented Jul 25, 2018 via email

@mgraham
Copy link

mgraham commented Jul 25, 2018

@mikethebos - that sucks :( Sorry.

I'll check my bios version the next time I get a chance to reboot (hopefully today)

@mikethebos
Copy link

@mgraham I'd be curious about EC version too.

@mikethebos
Copy link

@mgraham @ivaniclixx No luck on 2.68 and there is no way to downgrade. :(

On to a wifi dongle...

@mgraham
Copy link

mgraham commented Aug 17, 2018

Sorry for the delay - I finally rebooted. My BIOS version is 2.67. Embedded Controller Version is 1.14.

@alyyasser
Copy link

alyyasser commented Aug 20, 2018

hi @ivaniclixx , i tried your hot-switch method, and unfortunately, it didn't work for me. idk if i did it wrong or anything. so, what i did is, i boot the ubuntu live usb, then, on grub loader page, i switched the card, after that, continue to boot the ubuntu by choosing "try ubuntu blablabla", blank screen and after few sec my x230 just shutdown. am i doing it wrong? can you guide me through the process?

@ivaniclixx
Copy link

ivaniclixx commented Aug 20, 2018 via email

@Jan-E
Copy link

Jan-E commented Jul 22, 2019

@mgraham

So I seem to have lucked out. I ordered this card:

http://www.ebay.ca/itm/Lenevo-P-N-20002357-Atheros-AR5B95-802-11b-g-n-Wireless-PCIe-Half-AR9285/231394746180?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m2749.l2649

Because it said was Lenovo, I tried installing it in my x230 without flashing it first. And it turns out that it is whitelisted by the x230 bios!

I ordered a similar one: https://www.ebay.com/itm/253470855059
But it is not my lucky day. It was blacklisted in the BIOS of my X230T i7, version 2.73.

When I have the time I will try to patch it in my whitelisted X220.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants