I don't know your specific jurisdiction, but I will tell you that generally speaking, unfortunately, the short answer is that the landlord can keep your half of the security deposit until the property is entirely vacated.
Regardless of whether the security deposit was paid in separate portions by the tenants, the tenants remain jointly and severally liable for all damages to the property. This means that in most situations a landlord need not return or itemize the security deposit until everyone in the property vacates. This is why lawyers will commonly advise tenants to have roommate agreements to settle this matter between them.
Was the security deposit paid separately by you and your roommate (separate checks)? If so, you can argue that the landlord, in accepting separate payments, implicitly acknowledged that each tenant was only responsible for 1/2 (or whatever the breakdown was) of the damages. But this is an argument you would likely have to make in court, it won't get you your money back anytime soon and in my experience would likely fail anyway.
One thing you can do now to protect your deposit, if not get it back, is to ask the landlord to perform an inspection when you leave to document the state of the unit now (compared to when the roommate finally leaves). You can also take pictures, etc.
You can also pursue your money from the roommate, arguing the roommate should now refund you your share of the deposit. Again, this would likely require taking your roommate to court and arguing you had an oral agreement, as well as any other causes of action you can throw in. But these are not easy, quick solutions unfortunately.