In this original habeas corpus proceeding the relator contends that his life sentence under our recidivist statute, W. Va. Code, 61-11-18 and -19, is void. He further urges that his conviction for second degree sexual assault be set aside in that he was compelled to wear prison clothes at the time of the trial, in violation of the principle of Estelle v. Williams, 425 U.S. 501, 48 L. Ed. 2d 126, 96 S.Ct. 1691 (1976). Finally, he states this same principle applies to his witnesses, who were brought to the trial in prison garb and handcuffs.
The State admits that the life imprisonment sentence is void under the principles stated in the Syllabus of State v. McMannis, _ W. Va. _, 242 S.E.2d 571 (1978), which requires the State to prove “that each penitentiary offense, including the principal penitentiary offense, was committed subsequent to each preceding conviction and sentence.” We agree, and therefore do not discuss this assignment of error.
McMannis was confined in the State Penitentiary on a previous felony conviction. At the time of the present trial, he was returned to Mineral County to be tried for a sexual offense which allegedly occurred in the Mineral County Jail while he was awaiting a hearing on a writ of habeas corpus relating to a previous felony conviction. Throughout the present trial he was clothed in prison issue bearing the inscriptions “West Virginia Penitentiary” and “WVP” both on the seat of the pants and the back of the shirt.
Relator’s counsel did not object to this attire until after he had examined the first defense witness and had *132called his second witness, Ray Hott. At this point Hott, along with Robert Kerns, another defense witness, both of whom were inmates of the Penitentiary and had been fellow jail inmates with the defendant at the time the sexual assault occurred, were brought into the courtroom. Each was dressed in prison garb identical to that of the defendant and each was handcuffed.
At this juncture, defense counsel moved for a mistrial on the ground that the appearance of Hott and Kerns in prison garb identical to that worn by the accused, and in handcuffs, raised “an unfavorable opinion” and “inference” in the jurorV minds about the defendant.
Interpreting this contention as in part an assertion that the defendant himself ought not be wearing prison clothing, the trial court stated that “it’s been noted all through the trial that, and I assume that [it is] Richard Ray McMannis’ choice, in the best sense of the word, but it is his choice that he is here in prison garb. * * *” As to witnesses Hott and Kerns, the court ordered that the guards put on and remove their handcuffs outside the presence of the jury during the remainder of the trial. Thereupon, the trial resumed and Hott and Kerns testified.
I
Estelle v. Williams determined that a criminal defendant may not be compelled to wear prison attire at his trial.1 The basis of this rule was found to rest on the principle that “[T]he presumption of innocence, although not articulated in the Constitution, is a basic component of a fair trial under our system of criminal justice.” 425 U.S. at 503, 48 L. Ed. 2d at 130, 96 S.Ct. at 1692.
Estelle involved a Texas state trial where the defendant, who had been held in j ail because he was unable to make bond, was brought to the trial in prison garb. He *133had asked for his civilian clothes before trial, but this was denied by the jail authorities. At the trial during the voir dire, his attorney made reference to his attire, but did not make objection to the court that his client was compelled to attend the trial in prison attire.
Obviously, since it was dealing with a state conviction, the Court had to utilize the Due Process Clause of the Fourteenth Amendment to apply the constitutional standard to the states: “The right to a fair trial is a fundamental liberty secured by the Fourteenth Amendment.” 425 U.S. at 503, 48 L. Ed. 2d at 130, 96 S.Ct. at 1692.
After setting the issue on the constitutional pedestal, the Court indicated that it was not a fundamental right such that a knowing and intelligent waiver of the right must be shown, and concluded:
“Accordingly, although the State cannot, consistently with the Fourteenth Amendment, compel an accused to stand trial before a jury while dressed in identifiable prison clothes, the failure to make an objection to the court as to being tried in such clothes, for whatever reason, is sufficient to negate the presence of compulsion necessary to establish a constitutional violation.” [425 U.S. at 512-13, 48 L. Ed. 2d at 135, 96 S.Ct. at 1697]
We recognize that Estelle differs factually from the present situation, in that the defendant in Estelle was not being tried, as was the defendant McMannis, for a crime committed while he was in jail. Estelle noted that in this latter situation, courts have concluded that being tried in prison garb is not prejudicial, since the jury will learn of the defendant’s confinement in the course of the development of the evidence:
“In other situations, when, for example, the accused is being tried for an offense committed in confinement, or in an attempted escape, courts have refused to find error in the practice. In United States ex rel. Stahl v. Henderson, 472 F2d *134556(CA5), cert denied, 411 U.S. 971, 36 L Ed 2d 694, 93 S Ct 2166 (1973), the Court of Appeals declined to overturn a conviction where the defendant, albeit tried in jail clothes, was charged with having murdered another inmate while confined in prison. ‘No prejudice can result from seeing that which is already known.’ 472 F2d, at 557. In the present case, the Court of Appeals concluded:
“ ‘A different result may be appropriate where the defendant is on trial for an offense allegedly committed while he was in prison, because the jury would learn of his incarceration in any event.’ 500 F2d, at 209 n 5.
“Contra: People v Roman, 35 NY2d 978, 324 NE2d 885 (1975).” [425 U.S. at 507, 48 L. Ed. 2d at 132, 96 S.Ct. at 1694]
Here, there is no question that during the course of the trial on the sexual offense committed against a fellow prisoner, ample evidence was developed to show that the defendant McMannis was incarcerated at the time the offense was committed and at the time of his trial. Under United States ex rel. Stahl v. Henderson, 472 F.2d 556 (5th Cir. 1973), cert. denied, 411 U.S. 971, 36 L. Ed. 2d 694, 93 S.Ct. 2166, we can conclude that any prejudice arising from the prison garb was substantially diminished by the jury’s hearing the evidence that the offense was committed while the defendant was incarcerated. See, e.g., Shuman v. State, 578 P.2d 1183, 1187 (Nev. 1978).
We are not involved with a pure Estelle situation, where the defendant is compelled to wear prison attire in a trial which is unconnected with a prison offense. Here, the doctrine of harmless constitutional error can be applied. Chapman v. California, 386 U.S. 18, 17 L. Ed. 2d 705, 87 S.Ct. 824, 24 A.L.R.3d 1065 (1967); State v. Kirtley, -W. Ya. -, _ S.E.2d _ (No. 13912, November 28, 1978); State v. Thomas,_W. Va. _, 203 S.E.2d 445 (1974).
*135We, therefore, hold that a criminal defendant has the right under the Due Process Clause of our State and Federal Constitutions not to be forced to trial in identifiable prison attire. However, where a criminal defendant is tried in identifiable prison attire without any initial objection, and the offense for which he is tried is prison-related such that the jury necessarily knows from the evidence that he was in prison at the time of the commission of the offense, the error will be deemed not prejudicial under the doctrine of harmless constitutional error.
II
When we turn to the defense witnesses, Hott and Kerns, we find that objection was made to their appearance in prison attire and their being handcuffed as they were brought into the courtroom.
We do not extend Estelle’s constitutional principle to a defendant’s witnesses. The reason is simple: Estelle is bottomed on the defendant’s constitutionally sanctioned presumption of innocence, across which prison attire can cast a substantial shadow, since the attire communicates a condition of guilt. The defendant’s witnesses are not cloaked in his presumption of innocence, nor do they derive such shelter independently.
While the subject of the defendant’s witnesses attending court attired in prison clothes has not received extensive consideration, at least one court has indicated some Estelle implications contrary to our analysis. State v. Yates, 174 Conn. 16, 381 A.2d 536 (1977), after citing Estelle, went on to state:
“The logical extension of that principle applies to incarcerated witnesses who are required to testify while dressed in prison attire. [Footnote omitted] In the minds of the jurors the credibility of such witnesses can be affected in the same manner as the presumption of innocence can be diminished by the defendant’s appearance in *136prison garb. ..[174 Conn, at_, 381 A.2d at 537]
It seems apparent, however, that Yates did not elevate the defendant’s right to have his witness appear in civilian attire to a constitutional level as set in Estelle, since the court did not discuss the presumption of innocence, but merely rested its decision on the possible prejudice flowing to the defendant by having his witnesses appear in prison garb.
In United States v. Carter, 173 U.S. App. D.C. 54, 522 F.2d 666 (1975), the defendant objected to his co-conspirator being dressed in prison attire, and the court indicated that this could have a prejudicial impact on the defendant’s case. The court did not deem it necessary to consider the point as reversible error, but did condemn the practice and indicated that under some conditions it might be reversible error. Carter’s discussion was on the basis of affecting the credibility of the defendant’s case, on the ground that the co-conspirator is linked to the same crime committed by the defendant. We do not read Carter as elevating the issue to a constitutional level.
The few other courts which have considered this issue recognize that the defendant’s case may be prejudiced if his witnesses are forced to appear in prison attire, since this may substantially impair the credibility of their testimony in the jury’s mind. See, e.g., Eaddy v. People, 115 Colo. 458, 174 P.2d 717 (1946); Collins v. State, 70 Okla. Crim. 340, 106 P.2d 273 (1940); A.B.A. Advisory Committee on the Criminal Trial, Standards Relating to Trial by Jury (Approved Draft 1968), Standard 4.1(b).2 Again, there is no suggestion in these cases that a constitutional right is implicated where a prison witness other than the defendant is involved.
Consequently, because there is no constitutional right *137accorded to a defendant to have his prison witnesses appear at his trial in civilian attire, the relator is not entitled to attack his conviction on this basis in the present habeas corpus proceeding. We have consistently stated that “[a] habeas corpus proceeding is not a substitute for a writ of error or other appellate process .. Pyles v. Boles, 148 W. Va. 465, 490, 135 S.E.2d 692, 707 (1964), cert. denied, 379 U.S. 864, 13 L. Ed. 2d 67, 85 S.Ct. 130; State ex rel. Housden v. Adams, 143 W. Va. 601, 605, 103 S.E.2d 873, 875 — 76 (1958); State ex rel. Browning v. Tucker, 142 W. Va. 830, 833-34, 98 S.E.2d 740, 743 (1957). By this we mean that ordinary trial error not involving constitutional violations will not be reviewed in a habe-as corpus proceeding.
This is not to say, however, that the matter may not, in an appropriate case, constitute reversible error on appeal if a timely objection is made.3 The foregoing authorities plainly suggest this result.
Ill
The question of the prejudicial effect of the defendant’s witnesses appearing in the courtroom in handcuffs or shackles has received more attention. The traditional rule is that a criminal defendant has the right, absent some necessity relating to security or order, to have his witnesses appear at trial free of shackles.4 Kennedy v. Cardwell, 487 F.2d 101, 105 n. 5 (6th Cir. 1973), cert. denied, 416 U.S. 959, 40 L. Ed. 2d 310, 94 S.Ct. 1976 (1974); United States v. Esquer, 459 F.2d 431 (7th Cir. 1972), cert. denied, 414 U.S. 1006, 38 L. Ed. 2d 243, 94 S.Ct. 366 (1973); State v. Chavez, 98 Ariz. 236, 403 P.2d *138545 (1965); State v. Crawford, 99 Idaho 87, 577 P.2d 1135, 1146 (1978); Jessup v. State, 256 Ind. 409, 269 N.E.2d 374 (1971); Commonwealth v. Brown, 364 Mass. 471, 305 N.E.2d 830 (1973); State v. Coursolle, 255 Minn. 384, 97 N.W.2d 472, 75 A.L.R.2d 755 (1959); McVey v. State, 541 P.2d 273 (Okla. Crim. 1975); Annot., 75 A.L.R.2d 62 (1961).
Prior to Estelle, most if not all of the courts had evolved the same rule with regard to the defendant appearing at trial in shackles. The basis for the rule as to both the defendant and his witnesses was that physical restraints marked the person as a violent criminal, which would seriously affect his credibility in the jury’s mind.5
We have not been cited nor have we found any case subsequent to Estelle which has held that the defendant has a constitutional right, based on the presumption of innocence, not to be tried in physical restraints. In this case we are not required to determine whether Estelle’s constitutional principle applies to a defendant tried in *139physical restraints.6 The defendant was not so tried, but complains that his witnesses in handcuffs were brought into the courtroom in the presence of the jury and that this affected their credibility and prejudiced his case.7
Again, we do not elect to apply Estelle’s constitutional principle to the defendant’s witnesses, since they are not entitled to the benefit of his presumption of innocence. A criminal defendant has no constitutional right to have *140his witnesses appear at trial without physical restraints or in civilian attire.
As we have stated with respect to the witness prison garb issue, there may be occasions when forcing the defendant’s witnesses to testify in physical restraints may create sufficient prejudice that reversible error will occur. This type of trial error, as we have previously noted, is not reachable by a writ of habeas corpus. Pyles v. Boles, supra; State ex rel. Housden v. Adams, supra; State ex rel. Browning v. Tucker, supra.
We conclude that the recidivist portion of relator’s sentence is void under principles set out in State v. McMannis, _W. Va._, 242 S.E.2d 571 (1978), but that the underlying sexual offense sentence is not invalid. We have previously held that the void portion of a judgment can be attacked in a habeas corpus proceeding, but if there remains a valid portion of the sentence yet to be served, the relator is not entitled to a discharge. State ex rel. Bonnette v. Boles, 148 W. Va. 649, 654-55, 136 S.E.2d 873, 876-77 (1964); State ex rel. Robb v. Boles, 148 W. Va. 641, 647-48, 136 S.E.2d 891, 894-95 (1964).
The writ of habeas corpus is therefore discharged and the relator is remanded to serve the valid portion of his sentence of confinement.
Writ discharged; prisoner remanded.
For a summary of the pve-Estelle law with respect to prison garb, see Note, “Estelle v. Williams and the Waiver of Due Process Trial Protections,” 14 San Diego L. Rev. 1252, 1253-57 (1977).
Standard 4.1(b) reads:
“An incarcerated defendant or witness should not be required to appear in court in the distinctive attire of a prisoner or convict.”
Because prison witnesses do not appear in court without some prior arrangement with the custodial authorities, we believe that it is incumbent upon defense counsel, if he wishes to obtain prison witnesses, to make voluntary arrangements with the custodial authorities for them to appear in civilian attire. If a voluntary arrangement cannot be made, he should move the court for an order in advance of trial. Cf., e.g., Commonwealth v. Brown, 364 Mass. 471, 306 N.E.2d 830 (1973).
The term “shackles” is taken in its broadest sense to include all types of physical restraints.
Kennedy v. Cardwell, 487 F.2d 101 (6th Cir. 1973), cert. denied, 416 U.S. 959, 40 L. Ed. 2d 310, 94 S.Ct. 1976 (1974); United States v. Samuel, 431 F.2d 610, 614-16, 433 F.2d 663 (4th Cir. 1970), cert. denied, 401 U.S. 946, 28 L. Ed. 2d 229, 91 S.Ct. 964 (1971); Woodards v. Cardwell, 430 F.2d 978, 982 (6th Cir. 1970), cert. denied, 401 U.S. 911, 27 L. Ed. 2d 809, 91 S.Ct. 874 (1971); Loux v. United States, 389 F.2d 911, 919-20 (9th Cir. 1968), cert. denied, 393 U.S. 867, 21 L. Ed. 2d 135, 89 S.Ct. 151; Commonwealth v. Brown, 364 Mass. 471, 478-80, 305 N.E.2d 830, 836-37 (1973); State v. Roberts, 86 N.J. Super. 159, 206 A.2d 200 (1965); People v. Mendola, 2 N.Y.2d 270, 159 N.Y.S.2d 473, 140 N.E.2d 353 (1957).
Kennedy v. Cardwell, supra, involved the defendant being tried in shackles and suggested that the Due Process Clause might be implicated. It also cited several historical reasons advanced against shackling which related to the physical pain caused the defendant such that he could not effectively consult with counsel or could not calmly use his faculties.
Most courts prior to Estelle which considered the right of the defendant to be tried free of physical restraints (see note 4 supra) recognized that there might be occasions where courtroom security and order would require it. Illinois v. Allen, 397 U.S. 337, 25 L. Ed. 2d 353, 90 S.Ct. 1057 (1970), recognized that in an extreme situation a disorderly defendant could be tried while bound and gagged. The Court, however, suggested other alternatives, such as removal, and acknowledged that the defendant’s constitutional rights to confrontation and counsel could be affected. Estelle did not cite Illinois v. Allen, but obviously there is some tension between the presumption of innocence theory and the premise that for purposes of security a defendant may be tried in physical restraints.
Obviously the same type of procedural problem exists for the trial court as occurs when witnesses appear in prison attire. Most courts that have addressed the procedural problem recommend that a pretrial hearing be held if voluntary arrangements cannot be made on the use of physical restraints. The purpose of the hearing is to settle the issue in advance of trial so that the court is not suddenly confronted with the witnesses being brought into the courtroom in physical restraints. See, e.g., Kennedy v. Cardwell, supra; Commonwealth v. Brown, supra. The A.B.A. Advisory Committee on the Criminal Trial, Standards Relating to Trial by Jury (Approved Draft 1968), at 96 n. 9, sets forth the following factors that have been considered in determining whether to use physical restraints:
“(1) [TJhe seriousness of the present charge, (2) the person’s character, (3) the person’s past record, (4) past escapes by the person, (5) attempted escapes by the person, (6) evidence the person is planning an escape, (7) threats of harm to others, (8) threats to cause disturbance, (9) evidence the person is bent upon self-destruction, (10) risk of mob violence, (11) risk of attempted revenge by victim’s family, (12) other offenders still at large, * * *” [Citations omitted]
For reasons stated in note 3 supra, we believe it places no undue burden on defendant’s counsel, who is familiar with the status of the defendant and his witnesses, to initiate such hearing.