The Senate last night finally negotiated its way out of a week-long filibuster against the Democrats' high-priority fair housing bill as Congress, paralyzed by two civil rights disputes, had to abandon its plans to go home this weekend.

Still pending as the lame-duck Congress recessed for two days before resuming its adjournment push was its dispute with President Carter over over anti-busing legislation, although leaders were trying to negotiate their way out of that problem too.

The breakthrough on the fair housing bill came after lengthy behind-the-scenes talks, involving Attorney General Benjamin R. Civiletti as well as top Senate leaders of both parties, resulted in a plan to bring the measure to the floor for two make-or-break votes on Tuesday.

It followed collapse of talks on Substantive compromises in the legislation. Sen. Orrin G. Hatch (R-Utah) vowed to keep the filibuster going indefinitely, but Democratic leaders threatened to keep the Senate in round-the-clock sessions through the weekend if necessary to beat down the filibuster.

If civil rights activists win the votes on Tuesday, Democratic leaders will keep Congress in session until the bill is "disposed" of, one way or or the other," Senate Majority Leader Robert C. Byrd (D-W.Va.) told his colleagues -- a pledge that could keep a Congress in town until Christmas or later if conservative Republican opponents of the measure continue to drag out the proceedings. They have more than 200 amendements on file.

If the bill's backers lose those tests, including a cloture vote that requires approval of 60 senators to limit further debate, then the fair housing drive will be abandoned for the year, Byrd said.

The outcome was in some doubt, even though 62 senators voted for cloture Thursday in a preliminary skirmish on bringing up the bill. Sen. Edward M. Kennedy (D-Mass.), who has led the fight for the bill, said he planned to meet shortly with southerners who had broken with tradition to vote for cloture on Thursday but were reportedly concerned about some features of the bill. Some compromises were anticipated.

Democrats have made fair housing their swan song before relinquishing control of the Senate to Republicans next month, and Democrats in the House, which has already passed the bill, are going along even though the House is virtually ready to adjourn.

"It took us 100 years to get this far," one Senate Democrat was quoted as saying during yesterday's negotiations. "We sure as hell should be willing to spend two weeks [more].

The bill, backed by the Carter administration, would give the government broad new powers to enforce the 1968 Fair Housing Act. It would empower the Department of Housing and Urban Development to bring legal action against alleged violators of the 1968 law. Now HUD can little more than mediate disputes.

The main sticking point has been whether the government would have to prove an intent to discriminate -- as well as a discriminatory effect -- in bringing action against those accused of bias in housing transactions.

Meanwhile, Democratic congressional leaders also said President Carter apparently has the votes to sustain his promised veto of an antibusing measure, although action was delayed until next week.

In passing a $9.1 billion appropriations bill for the Justice, State and Commerce departments, Congress tacked a rider banning the Justice Department from filing or joining suits to require busing to overcome racial inbalance in public schools.

The full House and the Senate Approations Committee also incorporated the ban in a pending omnibus spending bill to sustain until next year agencies not covered by specific appropriations bills.

Carter said Thursday he will veto the appropriations bill and the stop-gap spending measure as well unless Congress takes out the busing restriction

Carter apparently has the upper hand because a veto of the continuing resolution, unless it is overridden by a two-thirds majority of both houses, would leave a number of federal agencies without funds to operate after Dec. 15, when a previous interim funding resolution expires.

House Speaker Thomas P. (Tip) O'Neill Jr. said yesterday that the House and Senate Appropriations committees will try to work out compromise language for the continuing resolution that is satisfactory to the the White House by Tuesday.

Theoretically, the appropriations bill would then be shelved and the Justice Department would continue to operate without its hands tied on school desegregation cases, at least until Congress resumes next year.

The chances for busing restrictions are good for 1981, however. Presiden-elect Ronald Reagan favors the litigation ban, and the ranks of antibusing forces have grown in both houses as a results of last month's elections.

Throughout most of yesterday, the filibuster continued in a desultory fashion in the Senate chamber. It was a far cry from the old Dixie theatricals of the 1960's, with the crisp accents of mountain-state Republicans in their cowboy boots, button-down shirts and three-piece suits replacing the heavy drawls of the old southern orators. About the only constant has been Sen Strom Thurmond (R-SC.), the next chairman of the Senate Judiciary Committee -- once a Democrat and now a Republican but always a reliable man for a civlil rights filibuster.

As for the rest, the reversal of roles has been dramatic.

In Thursday's successful cloture vote, at least one senator from every southern state except Mississippi voted to choke off debate, an action that would have been tantamount to political suicide for many southerners a generation ago. Five Democrats voted against limiting debate on the bill, but only two -- Herman E. Talmadge (D-Ga.) and John C. Stennis (D-Miss.) -- were from the South.

Even one of the old flibuster champs, Sen. Russell B. Long (D-lA.), supported cloture. The fight to win a vote on the housing bill was led by Majority leader Byrd, who talked 14 hours against the 1964 civil rights bill. m

At the same time, there were sharp divisions within Republican ranks, reflecting the internal strains that could eventually plague them as much as the reflecting the internal strains that could eventually plague them as much as the old civil rights wars within the Democratic Party. While Republicans supplied 27 of the 32 votes against cloture, 11 Republicans voted for it.