[{"data":1,"prerenderedAt":337},["ShallowReactive",2],{"notice":3,"post-fixing-ubuntu-screen-resolution-in-hyper-v":30},{"id":4,"title":5,"body":6,"description":22,"extension":23,"meta":24,"navigation":25,"path":26,"seo":27,"stem":28,"__hash__":29},"page\u002Fnotice.md","Site relaunch",{"type":7,"value":8,"toc":18},"minimark",[9],[10,11,12,13,17],"p",{},"🎉 ",[14,15,16],"strong",{},"Welcome to the all-new Red ALT Key site",", rebuilt from scratch! Video Notes are back, as well as a proper accessibility panel in the header. Still polishing corners — thanks for bearing with us.",{"title":19,"searchDepth":20,"depth":20,"links":21},"",2,[],"🎉 Welcome to the all-new Red ALT Key site, rebuilt from scratch! Video Notes are back, as well as a proper accessibility panel in the header. Still polishing corners — thanks for bearing with us.","md",{},true,"\u002Fnotice",{"title":5,"description":22},"notice","VKMJnU1ySGlgFLHqcmtMB3LTbmKa7RxzFMeX2jhSEc4",{"id":31,"title":32,"body":33,"date":323,"description":324,"extension":23,"image":325,"meta":326,"navigation":25,"path":327,"readingTime":328,"seo":329,"stem":330,"tags":331,"videoUrl":335,"__hash__":336},"posts\u002Fposts\u002Ffixing-ubuntu-screen-resolution-in-hyper-v.md","Fixing Ubuntu's Screen Resolution Problem in Hyper-V",{"type":7,"value":34,"toc":317},[35,38,43,59,70,74,77,95,101,177,183,187,197,289,299,303,310,313],[10,36,37],{},"Spin up a fresh Ubuntu VM in Hyper-V and it's a near-universal first annoyance: the desktop is stuck at a low, fixed resolution and won't resize with the window, no matter how you drag it. There are two real fixes here, and which one you need depends on whether you're using Enhanced Session Mode.",[39,40,42],"h2",{"id":41},"why-this-happens","Why This Happens",[10,44,45,46,50,51,54,55,58],{},"Hyper-V exposes video to a Linux guest through a synthetic framebuffer driver (",[47,48,49],"code",{},"hyperv_fb","). In a ",[14,52,53],{},"Basic Session"," (the default ",[47,56,57],{},"VMConnect"," window), that driver only advertises a small, fixed list of resolutions — it has no way to know how big your window actually is, so it just picks one and sticks with it.",[10,60,61,64,65,69],{},[14,62,63],{},"Enhanced Session Mode"," works completely differently: instead of a raw framebuffer, it tunnels an RDP-like session over a Hyper-V socket, which ",[66,67,68],"em",{},"does"," know your window's actual size and resizes dynamically, exactly like resizing a Remote Desktop window. This is the fix that makes the problem disappear entirely rather than working around it.",[39,71,73],{"id":72},"fix-1-turn-on-enhanced-session-mode-recommended","Fix 1: Turn On Enhanced Session Mode (Recommended)",[10,75,76],{},"This needs to be enabled in two places:",[10,78,79,82,83,86,87,90,91,94],{},[14,80,81],{},"On the Hyper-V host",", in Hyper-V Manager: right-click the host → ",[66,84,85],{},"Hyper-V Settings"," → ",[66,88,89],{},"Enhanced Session Mode Policy"," → check ",[14,92,93],{},"Allow enhanced session mode",".",[10,96,97,100],{},[14,98,99],{},"Inside the Ubuntu guest",", install the pieces that let it accept that session:",[102,103,107],"pre",{"className":104,"code":105,"language":106,"meta":19,"style":19},"language-bash shiki shiki-themes github-light github-dark","sudo apt update\nsudo apt install -y linux-virtual linux-tools-virtual linux-cloud-tools-virtual\nsudo apt install -y xrdp\nsudo systemctl enable --now xrdp\n","bash",[47,108,109,125,147,161],{"__ignoreMap":19},[110,111,114,118,122],"span",{"class":112,"line":113},"line",1,[110,115,117],{"class":116},"sScJk","sudo",[110,119,121],{"class":120},"sZZnC"," apt",[110,123,124],{"class":120}," update\n",[110,126,127,129,131,134,138,141,144],{"class":112,"line":20},[110,128,117],{"class":116},[110,130,121],{"class":120},[110,132,133],{"class":120}," install",[110,135,137],{"class":136},"sj4cs"," -y",[110,139,140],{"class":120}," linux-virtual",[110,142,143],{"class":120}," linux-tools-virtual",[110,145,146],{"class":120}," linux-cloud-tools-virtual\n",[110,148,150,152,154,156,158],{"class":112,"line":149},3,[110,151,117],{"class":116},[110,153,121],{"class":120},[110,155,133],{"class":120},[110,157,137],{"class":136},[110,159,160],{"class":120}," xrdp\n",[110,162,164,166,169,172,175],{"class":112,"line":163},4,[110,165,117],{"class":116},[110,167,168],{"class":120}," systemctl",[110,170,171],{"class":120}," enable",[110,173,174],{"class":136}," --now",[110,176,160],{"class":120},[10,178,179,180,182],{},"Reboot the VM. When you reconnect via ",[47,181,57],{},", it should now negotiate an enhanced session automatically — resize the window and the guest resolution follows immediately, the same way it would over RDP.",[39,184,186],{"id":185},"fix-2-manually-set-a-resolution-basic-session","Fix 2: Manually Set a Resolution (Basic Session)",[10,188,189,190,192,193,196],{},"If you're intentionally staying on a Basic Session (e.g. no GUI login manager, or a minimal\u002Fserver install), you can still get a usable resolution out of ",[47,191,49],{}," by generating a custom mode with ",[47,194,195],{},"cvt"," and adding it manually:",[102,198,200],{"className":104,"code":199,"language":106,"meta":19,"style":19},"cvt 1920 1080\n# Outputs a Modeline you can pass to xrandr, e.g.:\nxrandr --newmode \"1920x1080_60.00\" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync\nxrandr --addmode Virtual-1 \"1920x1080_60.00\"\nxrandr --output Virtual-1 --mode \"1920x1080_60.00\"\n",[47,201,202,212,218,261,274],{"__ignoreMap":19},[110,203,204,206,209],{"class":112,"line":113},[110,205,195],{"class":116},[110,207,208],{"class":136}," 1920",[110,210,211],{"class":136}," 1080\n",[110,213,214],{"class":112,"line":20},[110,215,217],{"class":216},"sJ8bj","# Outputs a Modeline you can pass to xrandr, e.g.:\n",[110,219,220,223,226,229,232,234,237,240,243,246,249,252,255,258],{"class":112,"line":149},[110,221,222],{"class":116},"xrandr",[110,224,225],{"class":136}," --newmode",[110,227,228],{"class":120}," \"1920x1080_60.00\"",[110,230,231],{"class":136}," 173.00",[110,233,208],{"class":136},[110,235,236],{"class":136}," 2048",[110,238,239],{"class":136}," 2248",[110,241,242],{"class":136}," 2576",[110,244,245],{"class":136}," 1080",[110,247,248],{"class":136}," 1083",[110,250,251],{"class":136}," 1088",[110,253,254],{"class":136}," 1120",[110,256,257],{"class":136}," -hsync",[110,259,260],{"class":120}," +vsync\n",[110,262,263,265,268,271],{"class":112,"line":163},[110,264,222],{"class":116},[110,266,267],{"class":136}," --addmode",[110,269,270],{"class":120}," Virtual-1",[110,272,273],{"class":120}," \"1920x1080_60.00\"\n",[110,275,277,279,282,284,287],{"class":112,"line":276},5,[110,278,222],{"class":116},[110,280,281],{"class":136}," --output",[110,283,270],{"class":120},[110,285,286],{"class":136}," --mode",[110,288,273],{"class":120},[10,290,291,292,295,296,298],{},"The output name (",[47,293,294],{},"Virtual-1"," above) varies — run ",[47,297,222],{}," on its own first to see what your VM calls its display. This survives until reboot; if you want it permanent, drop the same three commands into an Xorg startup script or a systemd unit.",[39,300,302],{"id":301},"which-one-should-you-use","Which One Should You Use?",[10,304,305,306,309],{},"If you have any GUI use for the VM at all, Enhanced Session Mode is worth the five minutes of setup — it's a proper fix rather than a workaround, it gives you clipboard sharing and drive redirection for free, and you'll never think about resolution again. Fix 2 is really only worth it for headless-adjacent setups where you occasionally need a GUI and don't want ",[47,307,308],{},"xrdp"," running permanently.",[10,311,312],{},"Full walkthrough with the exact host and guest settings is on the channel.",[314,315,316],"style",{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":19,"searchDepth":20,"depth":20,"links":318},[319,320,321,322],{"id":41,"depth":20,"text":42},{"id":72,"depth":20,"text":73},{"id":185,"depth":20,"text":186},{"id":301,"depth":20,"text":302},"2026-09-06","Ubuntu stuck at a tiny resolution inside a Hyper-V VM? Here's why it happens and the two real fixes, depending on whether you're using Enhanced Session Mode.",null,{},"\u002Fposts\u002Ffixing-ubuntu-screen-resolution-in-hyper-v","5 min read",{"title":32,"description":324},"posts\u002Ffixing-ubuntu-screen-resolution-in-hyper-v",[332,333,334],"Linux","Virtualization","Hyper-V","https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=gznEhg0xraY","1g4nMpL1yr-9OHr3oYynCwWhdxMk4onYL4UzC4UCuao",1788843378948]