This appeal, here for further appellate review at the request of the Commonwealth, presents issues arising out of the Appeals Court’s concern that the trial judge did not conduct a hearing on the defendant’s competence to stand trial. The Appeals Court, which pursued the issue on its own motion, reversed the defendant’s convictions because it concluded that the trial judge should have conducted a competency hearing “in light of [the defendant’s] bizarre performance” while representing himself at trial. Commonwealth v. Simpson, 44 Mass. App. Ct. 154, 163 (1998). The Appeals Court then remanded the case for an evidentiary hearing on the defendant’s competence to stand trial and to conduct his own defense. Id. at 165-166. Only if he were found competent would there be a new trial.
The Appeals Court correctly summarized the conduct in February, 1993, that led to the defendant’s indictments, as follows:
“While the victim slept, Simpson struck her in the head with a hammer. Fortunately awakened rather than rendered unconscious, the victim jumped from her bed and saw Simpson with the hammer up, ready to strike again. Simpson switched weapons to a buck knife he was in the habit of carrying. With that he stabbed the victim several times in the neck and finished his work by slashing her left cheek from her ear almost to her mouth.”
Id. at 155. The defendant had lived with the victim in her home for some months.
The defendant was indicted for, and in June, 1994, found guilty of, (1) assault with a hammer with intent to murder, (2) assault with a knife with intent to murder, (3) assault and battery with a hammer, (4) assault and battery with a knife, and (5) mayhem. Only one appellate issue of substance, apart from the competence issue, is raised, a challenge to the imposition of an allegedly duplicative sentence on one of the five indictments. We deal with that issue at the end of this opinion. Our principal attention is given to the competency question.
A dissenting justice of the Appeals Court concluded that the question of the defendant’s competence to stand trial should be considered on a motion for a new trial after affirmation of the convictions. Id. at 166-167 (Spina, J., dissenting). He believed that the court should not act on the competency issue because *648the parties had not argued the point and “[n] either the experienced trial judge, stand-by defense counsel, nor the prosecutor ever expressed any concern about the defendant’s competence during trial.” Id. We turn first to the Commonwealth’s argument that the Appeals Court exceeded its authority in deciding the unargued competency question.
1. The Commonwealth asserts that the Appeals Court lacked jurisdiction to consider the question of the defendant’s competence to stand trial. It is true that the Appeals Court reversed the judgments and set aside the verdicts on a ground that was neither raised in the trial court nor argued in the briefs before the Appeals Court. It is clear, however, that the defendant’s appellate counsel, who was not trial counsel, was concerned about the defendant’s mental competence at trial. The defendant had instructed his appellate counsel not to argue on appeal that the trial judge erred in ruling that he was competent to stand trial, to waive counsel, or to defend himself. No doubt prompted by principles now expressed in S.J.C. Rule 3:07, Mass. R. Prof. C. 1.14, 426 Mass. 1361 (1998), concerning a client under a disability, counsel petitioned a single justice of the Appeals Court to appoint a guardian ad litem for the defendant who could authorize counsel to raise the competency issue on appeal. Counsel was unsuccessful, however, in persuading a single justice of the Appeals Court that the court had authority to appoint a guardian ad litem for the defendant. Defense counsel has appealed from that decision.
The Appeals Court, by acting on its own to consider the competency issue, made moot defense counsel’s appeal from the single justice’s order denying his motion for the appointment of a guardian ad litem. Although the Appeals Court had no explicit, and perhaps even no inherent, authority to appoint a guardian ad litem for the defendant, the single justice could have granted defense counsel leave to argue the competency question on appeal. Indeed, because counsel had the right, if not the duty, to advise the relevant courts of his or her concern about a client’s competency to stand trial, no leave to do so was necessary.1
The Appeals Court has authority to consider an issue appar*649ent on the record of a criminal case that is not properly preserved for appellate review and is not argued to it in any party’s appellate brief. At the least, it may consider whether the record shows a substantial risk of a miscarriage of justice. Commonwealth v. Freeman, 352 Mass. 556, 563-564 (1967). If the defendant was incompetent at the time of his trial, it was a miscarriage of justice to convict him, even if there was overwhelming evidence that he had committed the crimes charged. See Commonwealth v. Hill, 375 Mass. 50, 53 (1978). It is axiomatic that the trial, conviction, or sentencing of a legally incompetent person violates that person’s constitutional right to due process. Id. at 51-52. See Drope v. Missouri, 420 U.S. 162, 171-172 (1975); Dusky v. United States, 362 U.S. 402 (1960); Commonwealth v. Prater, 420 Mass. 569, 573 (1995); Commonwealth v. Vailes, 360 Mass. 522, 524 (1971). The appellate courts of the Commonwealth, therefore, must have and do have jurisdiction to consider, on their own motion, whether such a violation of constitutional rights has occurred. It was certainly within the authority of the Appeals Court to consider the possibility of the defendant’s incompetence. By our allowance of the Commonwealth’s application for further appellate review, we also may appropriately consider the issue. See Commonwealth v. Wotan, 422 Mass. 740, 741 (1996), and cases cited. The difficult question that we ultimately reach is what course an appellate court should follow when the issue of a defendant’s competence to stand trial surfaces for the first time on appeal.
2. We first set forth the factual ground of the competency *650question apparent in the record.2 On defense counsel’s request, slightly more than two months after the defendant had been indicted, a Superior Court judge ordered that the defendant be evaluated in the court clinic as to his competence to stand trial. A doctor evaluated the defendant and reported that she had concerns about his rational understanding of the proceedings against him and about his present ability to represent himself. She recommended further evaluation. The judge ordered the defendant’s evaluation at Bridgewater State Hospital.
As a result, two evaluation reports were submitted, neither of which reached a conclusion concerning the defendant’s competence because the defendant declined to participate sufficiently in the attempts at evaluation. Information in the reports certainly indicated that there might be a competency problem. In the meantime, a second judge had allowed the defendant’s first counsel to withdraw,3 and new counsel was appointed to serve, this time, as standby counsel.
On October 12, 1993, new defense counsel told a third Superior Court judge that the defendant was competent and that he had “very little, if any, doubt that [the defendant] knows what is going on.” Defense counsel said that the defendant would not cooperate in any further psychological evaluation. The judge set a trial date and indicated that there would be an evaluation of the defendant on the morning of trial.
On December 7, 1993, a fourth Superior Court judge set a new trial date. The prosecutor indicated that the Commonwealth might request that the defendant be seen on that date to “insure that he is still capable and in a position to represent himself.” Standby counsel reiterated his opinion that the defendant was competent to understand and to participate in the trial process and said that the defense would not assert a lack of criminal responsibility. The defendant stated that he had a right to represent himself. The following colloquy does not suggest any lack of competence:
The judge: “I do want to alert you to the difficulties that *651are involved in representing yourself. You understand that it is difficult to represent yourself?”
The defendant: “Your Honor, I understand — not being a student of jurisprudence I understand the difficulties of one representing oneself in a criminal matter of such gravity as this but I feel that no one is more acquainted with the details surrounding this case than myself, although I will need to rely heavily on the assistance of a lawyer and I do feel, thus far, very confident in the advice of [standby counsel].”
The case came before the trial judge on May 31, 1994. The judge and the defendant discussed documents that the defendant had not obtained. The defendant said that he did not know why he had been sent to Bridgewater. The defendant’s comments on this subject and on other pretrial matters raised no doubt as to whether he was competent to stand trial or to handle his own defense.
The judge then conducted a colloquy concerning the defendant’s competence to represent himself. The Appeals Court summarized it accurately. Commonwealth v. Simpson, 44 Mass. App. Ct. 154, 157 (1998). The inquiry was thorough. The answers gave no hint of any incompetence, indeed pointed toward the defendant’s alertness and thoroughness of preparation. The defendant said that he had never been treated for a mental illness or condition and that he was not aware of any mental illness or mental condition. The first day of trial ended with no indication that the defendant was not competent to stand trial.
The second day of trial began with a discussion of the defendant’s motion in limine to preclude use of his prior convictions to impeach him. The defendant’s discussion of the subject suggested alertness.4 The defendant then participated rationally, but unsuccessfully, in the resolution of his motion to suppress evidence that the police seized from the crime scene at the time *652of his arrest there. The balance of the day was consumed with uneventful jury selection.
On the third day of trial, after the judge had given the jury preliminary instructions, and the prosecutor had made an opening statement on behalf of the Commonwealth, the defendant made the opening statement that is set forth in the Appeals Court opinion. Commonwealth v. Simpson, supra at 158-160. That statement asserts that the defendant was the victim of conspiracies, that a cocaine-dependent Mafia prostitute had been “kiting scams” in his name, and that that is why people, including Waltham police officers, had been harassing him. He also asserted that he had acted in self-defense (even though the anticipated evidence was expected to show that he struck the sleeping victim on her head with a hammer and then attacked the defenseless victim with a buck knife). The defendant’s opening statement was implausible, rambling, considerably incriminatory, largely immaterial, and unquestionably ineffective.
We share with the Appeals Court the view that the defendant’s opening statement and subsequent trial conduct raised “a substantial question of possible doubt” whether he was competent to stand trial. Commonwealth v. Hill, 375 Mass. 50, 62 (1978). The standard test for competence is whether the defendant “has sufficient present ability to consult with his lawyer with a reasonable degree of rational understanding [and] a rational as well as a factual understanding of the proceedings against him.” Dusky v. United States, 362 U.S. 402, 402 (1960). See Commonwealth v. Lyons, 426 Mass. 466, 468-469 (1998).5
The trial judge was presented with a difficult situation. Jeopardy had attached. Standby counsel, who apparently had had more than casual contact with the defendant, had assured *653the judge that there was no competency problem. Initially, the defendant had conducted himself competently with no sign of a lack of understanding of the charges against him or of the conduct of the trial. The prosecution had not asked for a competency determination at the opening of trial. It was too late realistically to conduct a competency examination.6 The defendant had refused to cooperate in prior attempts to evaluate bim (a fact the trial judge may not have known) and had advised the judge through standby counsel that he would not participate in any future attempt to evaluate his competence. There is nothing explicit in the record to show that, prior to the crimes, the defendant had had mental health problems. The Commonwealth did not move for a mistrial, and the judge could reasonably conclude that there might be a subsequent claim that there was no manifest necessity for declaring a mistrial. It may even be that a competent defendant elected to proceed as he did, faced with what was an overwhelming case against him. The judge, unlike appellate judges, had the advantage of seeing and hearing the defendant. See Commonwealth v. DeMinico, 408 Mass. 230, 236 (1990).
3. The appropriate remedy for the absence of a needed competency hearing, and a decision on the defendant’s competence, is not immediately apparent. The Appeals Court concluded that, although perhaps Draconian, there was no practical alternative but to reverse the convictions. Commonwealth v. Simpson, supra at 163. The dissent, however, thought it better that the subject be aired in a postconviction proceeding. Id. at 167 (Spina, J., dissenting). It is certainly true, as the Appeals Court noted (id. at 163), that a retrospective determination of competence is not generally favored. In Commonwealth v. Hill, 375 Mass. 50, 62 (1978), we rejected a retrospective determination of competence, in the circumstances of that case, on the ground that the mental condition of the defendant at the time of *654trial could not reasonably be determined retrospectively. See Commonwealth v. Rise, 7 Mass. App. Ct. 106, 108 (1979). “The [fact finder] would not be able to observe the subject of [his or her] inquiry, and expert witnesses would have to testify solely from information contained in the printed record.” Pate v. Robinson, 383 U.S. 375, 387 (1966). See Drope v. Missouri, 420 U.S. 162, 183 (1975); Dusky v. United States, 362 U.S. 402, 403 (1960). Here, the trial judge did see the defendant, and we have the defendant’s own words available in the transcript.
The Commonwealth must prove the defendant’s competence at the time of trial by a preponderance of the evidence. See Commonwealth v. Prater, 420 Mass. 569, 573 (1995); Commonwealth v. Crowley, 393 Mass. 393, 401-402 (1984). We are reluctant to foreclose its chance to do so (however remote, some five years later) by reversing the convictions at the appellate level. In the normal course, we would expect the question of competence to be decided by a trial judge with appropriate findings of fact. See Commonwealth v. Nickerson, 388 Mass. 246, 250-251 (1983). This case on its record is unlike Commonwealth v. Hill, 375 Mass. 50, 55 (1978), and other cases cited in Commonwealth v. Nickerson, supra at 251, in which an appellate court vacated a conviction because of the absence of a proper competency determination where the defendant had a history of mental illness preceding the commission of the crime or crimes charged. The question of this defendant’s competence at the time of trial should be presented on a motion for a new trial.
The defendant has consistently declined to assert that he is or was incompetent to stand trial. Nevertheless, defense, counsel must file a motion for a new trial alleging that the defendant was incompetent at the time of trial. If the defendant is found now to be competent and he does not want to contest his competence at the time of trial, the judge may allow the defendant to withdraw the motion for a new trial on a finding of an appropriate waiver, equivalent in quality to a plea of guilty. If the defendant is then competent and he wishes to raise the issue of his competence at the time of trial, the judge should decide the new trial motion. If the defendant is not then competent, no evidentiary hearing may properly be held on the new trial motion.
4. We briefly consider the defendant’s challenges, not raised *655at trial, to the sentences imposed.7 We agree with the Appeals Court that the striking of the victim on her head with a hammer and the subsequent injury to her with a knife were separate acts that warranted two separate convictions of armed assault with intent to murder and a separate conviction of mayhem. Commonwealth v. Simpson, supra at 166. The imposition of a sentence for mayhem to follow a sentence for armed assault with intent to murder was, therefore, not duplicative.
In these circumstances, assault and battery by means of a dangerous weapon, a knife, is a lesser included offense of mayhem (second theory [G. L. c. 265, § 14]). Commonwealth v. Martin, 425 Mass. 718, 722 (1997). The conviction of assault and battery by means of a dangerous weapon, a knife, and the related sentence that was to be served concurrently with the sentence for mayhem should be vacated. Id. at 722-723. We may properly consider a claim of duplicative sentences argued on appeal although not raised at sentencing. See Commonwealth v. Gliniewicz, 398 Mass. 744, 750 (1986). The defendant does not here challenge as duplicative his conviction and the imposition of a sentence for assault and battery by means of a dangerous weapon, a hammer, which is to be served concurrently with his sentence for armed assault with intent to murder with a hammer. As to this concurrent sentence, we see no substantial risk of a miscarriage of justice, even if the sentence is duplica-tive.
5. The conviction and sentence on indictment no. 93-463-004, for assault and battery by means of a dangerous weapon, a knife, are vacated. All other convictions are affirmed, but with the recognition that a motion for a new trial must be filed by defense counsel (present counsel or his successor). The appeal from the Appeals Court single justice’s order denying defense counsel’s motion for the appointment of a guardian ad litem is dismissed as moot.
So ordered.
The defendant’s first trial counsel and his appellate counsel appropriately brought their good faith doubt about the defendant’s competency to the attention of the courts. To do so in general terms violates no rule of professional conduct. Supreme Judicial Court Rule 3:07, Mass. R. Prof. C. 1.14 (b), *649426 Mass. 1361 (1998), suggests that, in the circumstances of this case, defense counsel may raise the competency question “to protect the client.”
There is authority that a lawyer should bring such a concern to the attention of the court. See Schrock, Defense Counsel’s Role in Determining Competency to Stand Trial, 9 Geo. J. Legal Ethics 639, 645 (1996) (“courts generally find that an attorney has a duty to raise the issue of competency regardless of the accused’s desires”); ABA Criminal Justice Mental Health Standards, Standard 7-4.2(c) (1984) (“Defense counsel should move for evaluation of the defendant’s competence to stand trial whenever the defense counsel has a good faith doubt as to the defendant’s competence”). This obligation may exist even when the lawyer believes it is not in the best interests of the client to raise the competency question. See State v. Johnson, 133 Wis. 2d 207, 221 (1986) (“strategic considerations do not eliminate defense counsel’s duty to request a competency hearing”).
It is not clear how much, if anything, the trial judge knew of the circumstances relating to the defendant’s competence to stand trial that had occurred before the case came before him. He knew that the defendant had been sent to Bridgewater State Hospital and ultimately that certain reports concerning his competency had been filed.
The defendant sought the removal of his first counsel because counsel had raised the competency question.
For example, the defendant made the following comment (which may have been the product of discussions with standby counsel): “Your Honor I’m just not too clear on the concept of ‘impeachment.’ These past convictions, irregardless of how, irregardless of how one would look them, are not indicative to the defendant speaking the truth or lying or committing perjury, they’re not indicative to his character per se, just because he has convictions and came in conflict with the police or the law.”
A finding, such as that made in this case, that a defendant is competent to act as his own lawyer (with standby counsel) may require a greater showing than that the defendant is competent to stand trial. We have said that a waiver of counsel may be approved if the defendant is “adequately aware of the seriousness of the charges, the magnitude of his undertaking, the availability of advisory counsel, and the disadvantages of self-representation.” Commonwealth v. Jackson, 376 Mass. 790, 795 (1978). See Godinez v. Moran, 509 U.S. 389, 400, 402 (1993) (waiver of counsel requires no higher level of competence than that required to stand trial but waiver of counsel must also be knowing, voluntary, and intelligent); Commonwealth v. Martin, 425 Mass. 718, 720 (1997); Commonwealth v. Barnes, 399 Mass. 385, 389 n.3, 390-391 (1987).
Cases have suggested that, if, in the course of a trial, a judge should perceive that the defendant may lack competence to be tried, the judge should conduct a competency hearing. See, e.g., Commonwealth v. Hill, 375 Mass. 50, 62 (1978); Commonwealth v. Vailes, 360 Mass. 522, 524 (1971). The Hill case involved a jury-waived trial in which there was expert testimony that raised a question of the defendant’s competence. Indeed, one expert testified to his doubts about the defendant’s competence. Commonwealth v. Hill, supra at 57. At the time the problem of possible incompetence arose in this case, the possibility of holding such a hearing and then continuing with the trial, only if the defendant were shown to be competent, was nil.
The judge imposed concurrent sentences of from fifteen to eighteen years on each of the convictions of armed assault with intent to murder and a sentence concurrent with those of from nine to ten years on the conviction of assault and battery by means of a dangerous weapon, a hammer. He then imposed successive sentences to be served concurrently on and after the first group of sentences of from ten to fifteen years for mayhem and from nine to ten years for the second conviction of assault and battery by means of a dangerous weapon, a knife.